diff --git a/tmtc/reaction_wheels.py b/tmtc/reaction_wheels.py index babb4bd..ce8211a 100644 --- a/tmtc/reaction_wheels.py +++ b/tmtc/reaction_wheels.py @@ -17,7 +17,7 @@ from tmtccmd.tc.pus_3_fsfw_hk import ( generate_one_diag_command, make_sid, enable_periodic_hk_command_with_interval, - disable_periodic_hk_command + disable_periodic_hk_command, ) from spacepackets.ecss.tc import PusTelecommand from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes, Subservices @@ -137,9 +137,16 @@ def pack_single_rw_test_into( object_id: bytes, rw_idx: int, q: DefaultPusQueueHelper, op_code: str ): if op_code in OpCodesDevs.SPEED: - speed = int(input("Specify speed [0.1 RPM, 0 or range [-65000, -1000] and [1000, 65000]: ")) + speed = int( + input( + "Specify speed [0.1 RPM, 0 or range [-65000, -1000] and [1000, 65000]: " + ) + ) ramp_time = int(input("Specify ramp time [ms, range [10, 20000]]: ")) - q.add_log_cmd(f"RW {rw_idx}: {InfoDevs.SPEED}") + q.add_log_cmd( + f"RW {rw_idx}: {InfoDevs.SPEED} with target " + f"speed {speed / 10.0} RPM and {ramp_time} ms ramp time" + ) q.add_pus_tc(pack_set_speed_command(object_id, speed, ramp_time)) if op_code in OpCodesDevs.ON: @@ -175,15 +182,17 @@ def pack_single_rw_test_into( q.add_log_cmd(f"RW {rw_idx}: {InfoDevs.ENABLE_STATUS_HK}") interval = float(input("Please enter HK interval in floating point seconds: ")) cmds = enable_periodic_hk_command_with_interval( - True, - make_sid(object_id, RwSetIds.STATUS_SET_ID), - interval + True, make_sid(object_id, RwSetIds.STATUS_SET_ID), interval ) for cmd in cmds: q.add_pus_tc(cmd) if op_code in OpCodesDevs.DISABLE_STATUS_HK: q.add_log_cmd(f"RW {rw_idx}: {InfoDevs.DISABLE_STATUS_HK}") - q.add_pus_tc(disable_periodic_hk_command(True, make_sid(object_id, RwSetIds.STATUS_SET_ID))) + q.add_pus_tc( + disable_periodic_hk_command( + True, make_sid(object_id, RwSetIds.STATUS_SET_ID) + ) + ) def pack_rw_ass_cmds(q: DefaultPusQueueHelper, object_id: bytes, op_code: str):