Merge remote-tracking branch 'origin/develop' into mueller/gps-hk-parsing
This commit is contained in:
@ -42,6 +42,10 @@ def add_gps_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
)
|
||||
|
||||
|
||||
class SetIds:
|
||||
HK = 0
|
||||
|
||||
|
||||
def pack_gps_command(object_id: bytes, tc_queue: TcQueueT, op_code: str):
|
||||
if op_code in OpCodes.RESET_GNSS:
|
||||
# TODO: This needs to be re-implemented
|
||||
|
@ -136,8 +136,7 @@ def pack_single_rw_test_into(
|
||||
speed = int(input("Specify speed [0.1 RPM]: "))
|
||||
ramp_time = int(input("Specify ramp time [ms]: "))
|
||||
tc_queue.appendleft((QueueCommands.PRINT, f"RW {rw_idx}: {InfoDevs.SPEED}"))
|
||||
command = pack_set_speed_command(object_id, speed, ramp_time)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=40, app_data=command)
|
||||
command = pack_set_speed_command(object_id, speed, ramp_time, 40)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code in OpCodesDevs.ON:
|
||||
@ -196,17 +195,21 @@ def pack_rw_ass_cmds(tc_queue: TcQueueT, object_id: bytes, op_code: str):
|
||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
||||
|
||||
|
||||
def pack_set_speed_command(object_id: bytes, speed: int, ramp_time: int) -> bytearray:
|
||||
def pack_set_speed_command(
|
||||
object_id: bytes, speed: int, ramp_time: int, ssc: int
|
||||
) -> PusTelecommand:
|
||||
"""With this function a command is packed to set the speed of a reaction wheel
|
||||
:param object_id: The object id of the reaction wheel handler.
|
||||
:param speed: Valid speeds are [-65000, -1000] and [1000, 65000]. Values are
|
||||
specified in 0.1 * RPM
|
||||
:param ramp_time: The time after which the reaction wheel will reached the commanded speed.
|
||||
:param ramp_time: The time after which the reaction wheel will reach the commanded speed.
|
||||
Valid times are 10 - 10000 ms
|
||||
:param ssc: Source sequence count
|
||||
"""
|
||||
command_id = RwCommandIds.SET_SPEED
|
||||
command = bytearray()
|
||||
command += object_id + command_id
|
||||
command = command + struct.pack("!i", speed)
|
||||
command = command + ramp_time.to_bytes(length=2, byteorder="big")
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=ssc, app_data=command)
|
||||
return command
|
||||
|
@ -85,6 +85,10 @@ class StarTrackerActionIds:
|
||||
FIRMWARE_UPDATE = 84
|
||||
|
||||
|
||||
class SetIds:
|
||||
TEMPERATURE = 25
|
||||
|
||||
|
||||
class FileDefs:
|
||||
download_path = "/mnt/sd0/startracker"
|
||||
json_file = "/mnt/sd0/startracker/full.json"
|
||||
|
2
pus_tc/devs/sus.py
Normal file
2
pus_tc/devs/sus.py
Normal file
@ -0,0 +1,2 @@
|
||||
class SetIds:
|
||||
HK = 3
|
Reference in New Issue
Block a user