special event handling

This commit is contained in:
Robin Müller 2022-08-22 10:42:51 +02:00
parent 57dbef741b
commit 820bd9e428
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -47,6 +47,12 @@ def handle_event_packet(
generic_event_string = ( generic_event_string = (
f"Object {obj_name} generated Event {tm.event_id} | {info.name}" f"Object {obj_name} generated Event {tm.event_id} | {info.name}"
) )
if info.name == "SUPV_UPDATE_PROGRESS":
additional_event_info = (
f"Additional info: {info.info} | "
f"Percent: {tm.param_1 >> 24 & 0xff} | Sequence Count: {tm.param_1 & 0xffff} | Bytes Written: {tm.param_2}"
)
else:
if info.info != "": if info.info != "":
additional_event_info = ( additional_event_info = (
f"Additional info: {info.info} | P1: {tm.param_1} | P2: {tm.param_2}" f"Additional info: {info.info} | P1: {tm.param_1} | P2: {tm.param_2}"