From 8e20c2ab0879e5b483308d0feb4aeb5951ce00c9 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 12 May 2022 20:07:31 +0200 Subject: [PATCH] added command parameter to identify extenral cmds --- pus_tc/devs/heater.py | 5 +++++ pus_tm/verification_handler.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pus_tc/devs/heater.py b/pus_tc/devs/heater.py index c85e4d1..4dc9ef5 100644 --- a/pus_tc/devs/heater.py +++ b/pus_tc/devs/heater.py @@ -46,6 +46,10 @@ class Info: HEATER_HEALTHY_CMD = "Set to healthy" +# Needed in OBSW to differentiate between external and internal heater commands +COMMAND_SOURCE_PARAM_EXTERNAL = 1 + + class ActionIds(enum.IntEnum): SWITCH_HEATER = 0 @@ -214,6 +218,7 @@ def pack_switch_heater_command( command = bytearray() command.append(switch_nr) command.append(switch_action) + command.append(COMMAND_SOURCE_PARAM_EXTERNAL) return generate_action_command( object_id=object_id, action_id=ActionIds.SWITCH_HEATER, app_data=command ) diff --git a/pus_tm/verification_handler.py b/pus_tm/verification_handler.py index 2b81825..6182f9d 100644 --- a/pus_tm/verification_handler.py +++ b/pus_tm/verification_handler.py @@ -23,7 +23,7 @@ def handle_service_1_packet(printer: FsfwTmTcPrinter, raw_tm: bytes): ) else: retval_string = ( - f"Error Code information for code {srv1_packet.error_code}| " + f"Error Code information for code {srv1_packet.error_code} | " f"Name: {retval_info.name} | Info: {retval_info.info}" ) LOGGER.info(retval_string)