corrections and improvements for ACS code
This commit is contained in:
parent
13014eb250
commit
47fef53ac1
@ -273,7 +273,7 @@ def pack_acs_ctrl_command(p: ServiceProviderParams):
|
||||
elif op_code in OpCodes.REQUEST_RAW_GYR_HK:
|
||||
q.add_log_cmd(Info.REQUEST_RAW_GYR_HK)
|
||||
q.add_pus_tc(
|
||||
generate_one_hk_command(make_sid(ACS_CONTROLLER, SetId.GYR_RAW_SET))
|
||||
create_request_one_diag_command(make_sid(ACS_CONTROLLER, SetId.GYR_RAW_SET))
|
||||
)
|
||||
elif op_code in OpCodes.ENABLE_RAW_GYR_HK:
|
||||
q.add_log_cmd(Info.ENABLE_RAW_GYR_HK)
|
||||
|
@ -5,6 +5,7 @@ import struct
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
|
||||
import eive_tmtc.config.object_ids as obj_ids
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import create_mode_command, Mode
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import create_request_one_hk_command, make_sid
|
||||
from tmtccmd.config.tmtc import (
|
||||
tmtc_definitions_provider,
|
||||
@ -25,6 +26,8 @@ from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
|
||||
class OpCode:
|
||||
NML = "normal"
|
||||
OFF = "off"
|
||||
CORE_HK = "core_hk"
|
||||
CFG_HK = "cfg_hk"
|
||||
|
||||
@ -66,7 +69,13 @@ def handle_gyr_cmd(q: DefaultPusQueueHelper, op_code: str):
|
||||
core_hk_id = AdisGyroSetId.CORE_HK
|
||||
else:
|
||||
core_hk_id = L3gGyroSetId.CORE_HK
|
||||
if op_code == OpCode.CORE_HK:
|
||||
if op_code == OpCode.NML:
|
||||
q.add_log_cmd(f"Gyro {gyr_info[0]} NORMAL mode")
|
||||
q.add_pus_tc(create_mode_command(gyr_obj_id, Mode.NORMAL, 0))
|
||||
if op_code == OpCode.OFF:
|
||||
q.add_log_cmd(f"Gyro {gyr_info[0]} OFF mode")
|
||||
q.add_pus_tc(create_mode_command(gyr_obj_id, Mode.OFF, 0))
|
||||
elif op_code == OpCode.CORE_HK:
|
||||
q.add_log_cmd(f"Gyro {gyr_info[0]} Core HK")
|
||||
q.add_pus_tc(create_request_one_hk_command(make_sid(gyr_obj_id, core_hk_id)))
|
||||
elif op_code == OpCode.CFG_HK:
|
||||
@ -166,4 +175,6 @@ def add_gyr_cmd_defs(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=OpCode.CORE_HK, info="Request Core HK")
|
||||
oce.add(keys=OpCode.CFG_HK, info="Request CFG HK")
|
||||
oce.add(keys=OpCode.NML, info="Normal Mode")
|
||||
oce.add(keys=OpCode.OFF, info="Off Mode")
|
||||
defs.add_service(CustomServiceList.GYRO, info="Gyro", op_code_entry=oce)
|
||||
|
Loading…
Reference in New Issue
Block a user