small refactoring

This commit is contained in:
Robin Müller 2023-01-11 14:28:45 +01:00
parent 7d2c639f01
commit 87607aa681
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -152,11 +152,7 @@ def pack_core_commands(q: DefaultPusQueueHelper, op_code: str):
) )
if op_code in OpCodes.REBOOT_FULL: if op_code in OpCodes.REBOOT_FULL:
q.add_log_cmd(f"Core Command: {Info.REBOOT_FULL}") q.add_log_cmd(f"Core Command: {Info.REBOOT_FULL}")
q.add_pus_tc( q.add_pus_tc(create_full_reboot_cmds())
make_fsfw_action_cmd(
object_id=CORE_CONTROLLER_ID, action_id=ActionIds.FULL_REBOOT
)
)
if op_code in OpCodes.XSC_REBOOT_SELF: if op_code in OpCodes.XSC_REBOOT_SELF:
add_xsc_reboot_cmd(q=q, reboot_self=True) add_xsc_reboot_cmd(q=q, reboot_self=True)
if op_code in OpCodes.XSC_REBOOT_0_0: if op_code in OpCodes.XSC_REBOOT_0_0:
@ -271,6 +267,12 @@ def reset_specific_boot_counter(q: DefaultPusQueueHelper, chip: int, copy: int):
) )
def create_full_reboot_cmds() -> PusTelecommand:
return make_fsfw_action_cmd(
object_id=CORE_CONTROLLER_ID, action_id=ActionIds.FULL_REBOOT
)
def determine_reboot_params() -> (bool, Chip, Copy): def determine_reboot_params() -> (bool, Chip, Copy):
chip_select = -1 chip_select = -1
copy_select = -1 copy_select = -1