diff --git a/config/hook_implementations.py b/config/hook_implementations.py index fb87d57..4809a50 100644 --- a/config/hook_implementations.py +++ b/config/hook_implementations.py @@ -70,6 +70,7 @@ class EiveHookObject(TmTcHookBase): "2": ("Reaction Wheel: Set mode on", {OpCodeDictKeys.TIMEOUT: 2.0}), "3": ("Reaction Wheel: Set mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}), "4": ("Reaction Wheel: Set mode off", {OpCodeDictKeys.TIMEOUT: 2.0}), + "5": ("Reaction Wheel: Send get-telemetry-command", {OpCodeDictKeys.TIMEOUT: 2.0}), } service_rw_tuple = ("Reaction Wheel", op_code_dict_srv_rw) diff --git a/pus_tc/reaction_wheels.py b/pus_tc/reaction_wheels.py index 2470f12..f20240d 100644 --- a/pus_tc/reaction_wheels.py +++ b/pus_tc/reaction_wheels.py @@ -27,6 +27,7 @@ class RwCommandIds: SET_SPEED = bytearray([0x0, 0x0, 0x0, 0x06]) # Reads temperature from reaction wheel into dataset with id 8 GET_TEMPERATURE = bytearray([0x0, 0x0, 0x0, 0x08]) + GET_TM = bytearray([0x0, 0x0, 0x0, 0x09]) class SpeedDefinitions: @@ -69,6 +70,12 @@ def pack_single_rw_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: mode_data = pack_mode_data(object_id, 0, 0) command = PusTelecommand(service=200, subservice=1, ssc=43, app_data=mode_data) tc_queue.appendleft(command.pack_command_tuple()) + + if op_code == "5": + tc_queue.appendleft((QueueCommands.PRINT, "Reaction Wheel: Send get-telemetry-command")) + command = object_id + RwCommandIds.GET_TM + command = PusTelecommand(service=8, subservice=128, ssc=44, app_data=command) + tc_queue.appendleft(command.pack_command_tuple()) return tc_queue