From eb7cb3f28cf404908bf05b8d32c4b654d555f8a7 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 18 Oct 2022 13:32:22 +0200 Subject: [PATCH] all speed up and down command --- tmtc/reaction_wheels.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tmtc/reaction_wheels.py b/tmtc/reaction_wheels.py index cc8c408..6a3da07 100644 --- a/tmtc/reaction_wheels.py +++ b/tmtc/reaction_wheels.py @@ -8,6 +8,7 @@ import struct from typing import List from pus_tm.defs import PrintWrapper +from config.object_ids import RW1_ID, RW2_ID, RW3_ID, RW4_ID from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry from tmtccmd.config.tmtc import tmtc_definitions_provider from tmtccmd.tc import DefaultPusQueueHelper @@ -45,12 +46,16 @@ class OpCodesAss: ON = ["0", "on"] NML = ["1", "nml"] OFF = ["2", "off"] + ALL_SPEED_UP = ["3", "speed_up"] + ALL_SPEED_OFF = ["4", "speed_off"] class InfoAss: ON = "Mode On: 3/4 RWs min. on" NML = "Mode Normal: 3/4 RWs min. normal" OFF = "Mode Off: All RWs off" + ALL_SPEED_UP = "Speed up consecutively" + ALL_SPEED_OFF = "Speed down to 0" class RwSetIds: @@ -182,6 +187,10 @@ def pack_rw_ass_cmds(q: DefaultPusQueueHelper, object_id: bytes, op_code: str): service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=data ) ) + if op_code in OpCodesAss.ALL_SPEED_UP: + rw_speed_up_cmd_consec(q, [RW1_ID, RW2_ID, RW3_ID, RW4_ID], 65000, 10000) + if op_code in OpCodesAss.ALL_SPEED_OFF: + rw_speed_down_cmd_consec(q, [RW1_ID, RW2_ID, RW3_ID, RW4_ID], 10000) def pack_set_speed_command(