some refactoring for PCDU cmds
This commit is contained in:
@ -273,12 +273,14 @@ def generic_on_cmd(
|
||||
object_id: bytes, q: DefaultPusQueueHelper, info_str: str, out_idx: int
|
||||
):
|
||||
q.add_log_cmd(info_str + " on")
|
||||
q.add_pus_tc(
|
||||
pack_set_u8_param_command(
|
||||
object_id,
|
||||
OUT_ENABLE_LIST[out_idx].parameter_address,
|
||||
Channel.on,
|
||||
)
|
||||
q.add_pus_tc(create_generic_on_cmd(object_id, out_idx))
|
||||
|
||||
|
||||
def create_generic_on_cmd(object_id: bytes, out_idx: int):
|
||||
return pack_set_u8_param_command(
|
||||
object_id,
|
||||
OUT_ENABLE_LIST[out_idx].parameter_address,
|
||||
Channel.on,
|
||||
)
|
||||
|
||||
|
||||
@ -286,12 +288,14 @@ def generic_off_cmd(
|
||||
object_id: bytes, q: DefaultPusQueueHelper, info_str: str, out_idx: int
|
||||
):
|
||||
q.add_log_cmd(info_str + " off")
|
||||
q.add_pus_tc(
|
||||
pack_set_u8_param_command(
|
||||
object_id,
|
||||
OUT_ENABLE_LIST[out_idx].parameter_address,
|
||||
Channel.off,
|
||||
)
|
||||
q.add_pus_tc(create_generic_off_cmd(object_id, out_idx))
|
||||
|
||||
|
||||
def create_generic_off_cmd(object_id: bytes, out_idx: int):
|
||||
return pack_set_u8_param_command(
|
||||
object_id,
|
||||
OUT_ENABLE_LIST[out_idx].parameter_address,
|
||||
Channel.off,
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user