display new firmware format correctly

This commit is contained in:
Laura Klünder 2023-10-06 03:08:25 +02:00
parent ba454ac99b
commit 369b270534
4 changed files with 10 additions and 9 deletions

View file

@ -37,11 +37,11 @@
{% if msg.get_message_type_display == "CONFIG_FIRMWARE" %} {% if msg.get_message_type_display == "CONFIG_FIRMWARE" %}
<strong>Chip:</strong> {{ msg.parsed.get_chip_display }} rev{{ msg.parsed.revision_major }}.{{ msg.parsed.revision_minor }} <strong>Chip:</strong> {{ msg.parsed.get_chip_display }} rev{{ msg.parsed.revision_major }}.{{ msg.parsed.revision_minor }}
<br> <br>
<strong>Firmware:</strong> {{ msg.parsed.project_name }} {{ msg.parsed.version }} (IDF {{ msg.parsed.idf_version }}) <strong>Firmware:</strong> {{ msg.parsed.app_desc.project_name }} {{ msg.parsed.app_desc.version }} (IDF {{ msg.parsed.app_desc.idf_version }})
<br> <br>
<strong>Compile Date:</strong> {{ msg.parsed.compile_date }} {{ msg.parsed.compile_time }} <strong>Compile Date:</strong> {{ msg.parsed.app_desc.compile_date }} {{ msg.parsed.app_desc.compile_time }}
<br> <br>
<strong>SHA256:</strong> <small>{{ msg.parsed.app_elf_sha256 }}</small> <strong>SHA256:</strong> <small>{{ msg.parsed.app_desc.app_elf_sha256 }}</small>
{% elif msg.get_message_type_display == "CONFIG_UPLINK" %} {% elif msg.get_message_type_display == "CONFIG_UPLINK" %}
<strong>Enabled:</strong> {{ msg.parsed.enabled }}, <strong>Enabled:</strong> {{ msg.parsed.enabled }},

View file

@ -42,11 +42,11 @@
<strong>Chip:</strong> {{ node.last_messages.CONFIG_FIRMWARE.parsed.get_chip_display }} <strong>Chip:</strong> {{ node.last_messages.CONFIG_FIRMWARE.parsed.get_chip_display }}
rev{{ node.last_messages.CONFIG_FIRMWARE.parsed.revision_major }}.{{ node.last_messages.CONFIG_FIRMWARE.parsed.revision_minor }} rev{{ node.last_messages.CONFIG_FIRMWARE.parsed.revision_major }}.{{ node.last_messages.CONFIG_FIRMWARE.parsed.revision_minor }}
<br> <br>
<strong>Firmware:</strong> {{ node.last_messages.CONFIG_FIRMWARE.parsed.project_name }} {{ node.last_messages.CONFIG_FIRMWARE.parsed.version }} (IDF {{ node.last_messages.CONFIG_FIRMWARE.parsed.idf_version }}) <strong>Firmware:</strong> {{ node.last_messages.CONFIG_FIRMWARE.parsed.app_desc.project_name }} {{ node.last_messages.CONFIG_FIRMWARE.parsed.version }} (IDF {{ node.last_messages.CONFIG_FIRMWARE.parsed.app_desc.idf_version }})
<br> <br>
<strong>Compile Date:</strong> {{ node.last_messages.CONFIG_FIRMWARE.parsed.compile_date }} {{ node.last_messages.CONFIG_FIRMWARE.parsed.compile_time }} <strong>Compile Date:</strong> {{ node.last_messages.CONFIG_FIRMWARE.parsed.app_desc.compile_date }} {{ node.last_messages.CONFIG_FIRMWARE.parsed.app_desc.compile_time }}
<br> <br>
<strong>SHA256:</strong> <small>{{ node.last_messages.CONFIG_FIRMWARE.parsed.app_elf_sha256 }}</small> <strong>SHA256:</strong> <small>{{ node.last_messages.CONFIG_FIRMWARE.parsed.app_desc.app_elf_sha256 }}</small>
</p> </p>
</div> </div>
<div> <div>

View file

@ -49,8 +49,8 @@
<small>rev{{ node.last_messages.CONFIG_FIRMWARE.parsed.revision_major }}.{{ node.last_messages.CONFIG_FIRMWARE.parsed.revision_minor }}</small> <small>rev{{ node.last_messages.CONFIG_FIRMWARE.parsed.revision_major }}.{{ node.last_messages.CONFIG_FIRMWARE.parsed.revision_minor }}</small>
</td> </td>
<td> <td>
{{ node.last_messages.CONFIG_FIRMWARE.parsed.version }} {{ node.last_messages.CONFIG_FIRMWARE.parsed.app_desc.version }}
<small>(IDF {{ node.last_messages.CONFIG_FIRMWARE.parsed.idf_version }})</small> <small>(IDF {{ node.last_messages.CONFIG_FIRMWARE.parsed.app_desc.idf_version }})</small>
</td> </td>
<td> <td>
{% blocktrans trimmed with timesince=node.last_msg|timesince %} {% blocktrans trimmed with timesince=node.last_msg|timesince %}

View file

@ -182,7 +182,8 @@ class StructType:
def __init_subclass__(cls, /, union_type_field=None, existing_c_struct=None, **kwargs): def __init_subclass__(cls, /, union_type_field=None, existing_c_struct=None, **kwargs):
cls.union_type_field = union_type_field cls.union_type_field = union_type_field
if cls.existing_c_struct is not None: if cls.existing_c_struct is not None:
raise TypeError('subclassing an external c struct is not possible') # TODO: can we make it possible? does it even make sense? # TODO: can we make it possible? does it even make sense?
raise TypeError('subclassing an external c struct is not possible')
cls.existing_c_struct = existing_c_struct cls.existing_c_struct = existing_c_struct
if union_type_field: if union_type_field:
if union_type_field in cls._union_options: if union_type_field in cls._union_options: