v1.9.0 #53

Merged
muellerr merged 354 commits from develop into master 2022-04-07 17:39:42 +02:00
3 changed files with 25 additions and 10 deletions
Showing only changes of commit e2e503bb5d - Show all commits

View File

@ -104,6 +104,11 @@ def add_pl_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
keys=OpCodes.SWITCH_ADC_NORMAL,
info="Switch PL PCDU ADC normal, submode ADC ON"
)
add_op_code_entry(
op_code_dict=op_code_dict,
keys=OpCodes.SWITCH_OFF,
info="Switch PL PCDU off"
)
add_op_code_entry(
op_code_dict=op_code_dict,
keys=OpCodes.SWITCH_ALL_NORMAL,

View File

@ -17,13 +17,14 @@ LOGGER = get_console_logger()
class OpCodes:
SWITCH_ON = ["0", "switch-adc-on"]
SWITCH_ADC_NORMAL = ["1", "switch-adc-normal"]
SWITCH_ALL_NORMAL = ["2", "switch-all-normal"]
UPDATE_DRO_TO_X8_WAIT = ["3", "dro-to-x8-wait"]
UPDATE_X8_TO_TX_WAIT_TIME = ["4", "x8-to-tx-wait"]
UPDATE_TX_TO_MPA_WAIT_TIME = ["5", "tx-to-mpa-wait"]
UPDATE_MPA_TO_HPA_WAIT_TIME = ["6", "mpa-to-hpa-wait"]
SWITCH_ON = ["0", "on"]
SWITCH_ADC_NORMAL = ["1", "adc-normal"]
SWITCH_ALL_NORMAL = ["2", "all-normal"]
SWITCH_OFF = ["3", "off"]
UPDATE_DRO_TO_X8_WAIT = ["6", "dro-to-x8-wait"]
UPDATE_X8_TO_TX_WAIT_TIME = ["7", "x8-to-tx-wait"]
UPDATE_TX_TO_MPA_WAIT_TIME = ["8", "tx-to-mpa-wait"]
UPDATE_MPA_TO_HPA_WAIT_TIME = ["9", "mpa-to-hpa-wait"]
INJECT_SSR_TO_DRO_FAILURE = ["10", "inject-ssr-dro-fault"]
INJECT_DRO_TO_X8_FAILURE = ["11", "inject-dro-x8-fault"]
@ -78,9 +79,18 @@ class ParamIds(enum.IntEnum):
def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
if op_code in OpCodes.SWITCH_ON:
tc_queue.appendleft((QueueCommands.PRINT, "Switching PL PCDU ADC module on"))
tc_queue.appendleft((QueueCommands.PRINT, "Switching PL PCDU on"))
mode_data = pack_mode_data(
object_id=PL_PCDU_ID, mode=Modes.ON, submode=Submodes.ADC_ON
object_id=PL_PCDU_ID, mode=Modes.ON, submode=0
)
mode_cmd = PusTelecommand(
service=200, subservice=Subservices.SWITCH_MODE, app_data=mode_data
)
tc_queue.appendleft(mode_cmd.pack_command_tuple())
if op_code in OpCodes.SWITCH_OFF:
tc_queue.appendleft((QueueCommands.PRINT, "Switching PL PCDU off"))
mode_data = pack_mode_data(
object_id=PL_PCDU_ID, mode=Modes.OFF, submode=0
)
mode_cmd = PusTelecommand(
service=200, subservice=Subservices.SWITCH_MODE, app_data=mode_data

@ -1 +1 @@
Subproject commit e8f505469862f89fbd9d11241a542f37a883f0b7
Subproject commit 8a5087875af176335abd9ffc6056f49705cf076b