added event handler for reboot events
This commit is contained in:
parent
3bb0a08e95
commit
4083a3090f
@ -10,6 +10,10 @@ list yields a list of all related PRs for each release.
|
||||
|
||||
# [unreleased]
|
||||
|
||||
## Added
|
||||
|
||||
- Event handling for reboot counter events.
|
||||
|
||||
# [v3.1.0] 2023-04-16
|
||||
|
||||
## Added
|
||||
|
@ -80,6 +80,18 @@ def handle_event_packet(raw_tm: bytes, printer: FsfwTmTcPrinter):
|
||||
pw.dlog(
|
||||
f"Mode Number {event_def.param1}, Mode Name {mode_name}, Submode: {event_def.param2}"
|
||||
)
|
||||
if info.name == "INDIVIDUAL_BOOT_COUNTS":
|
||||
boot_count_00 = (event_def.param1 >> 16) & 0xFFFF
|
||||
boot_count_01 = event_def.param1 & 0xFFFF
|
||||
boot_count_10 = (event_def.param2 >> 16) & 0xFFFF
|
||||
boot_count_11 = event_def.param2 & 0xFFFF
|
||||
pw.dlog(f"Boot count 0 0: {boot_count_00}")
|
||||
pw.dlog(f"Boot count 0 1: {boot_count_01}")
|
||||
pw.dlog(f"Boot count 1 0: {boot_count_10}")
|
||||
pw.dlog(f"Boot count 1 1: {boot_count_11}")
|
||||
if info.name == "REBOOT_COUNTER":
|
||||
boot_count = (event_def.param1 << 32) | event_def.param2
|
||||
pw.dlog(f"Total boot count: {boot_count}")
|
||||
if info.name == "VERSION_INFO":
|
||||
specific_handler = True
|
||||
ver_major = (event_def.param1 >> 24) & 0xFF
|
||||
|
Loading…
Reference in New Issue
Block a user