Merge pull request 'Feature: 3V3 stack power switching' (#182) from feature_3v3_stack_switching into main

Reviewed-on: #182
This commit is contained in:
Robin Müller 2023-04-04 11:17:37 +02:00
commit 71bc121deb
3 changed files with 11 additions and 3 deletions

View File

@ -14,6 +14,10 @@ list yields a list of all related PRs for each release.
- Add boot mode command for EIVE system.
## Changed
- PCDU switcher set now includes the 3V3 stack switcher state.
# [v2.20.1] 2023-04-01
## Fixed

View File

@ -71,6 +71,7 @@ class PcduSwitches(enum.IntEnum):
PDU2_CH8_PAYLOAD_CAMERA = 17
P60_DOCK_5V_STACK = 18
P60_DOCK_3V3_STACK = 19
def pack_power_commands(q: DefaultPusQueueHelper, op_code: str):

View File

@ -566,7 +566,9 @@ def handle_pcdu_hk(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
current_idx += len(PDU1_CHANNELS_NAMES)
pdu2_vals = [hk_data[i + current_idx] for i in range(len(PDU2_CHANNELS_NAMES))]
current_idx += len(PDU2_CHANNELS_NAMES)
p60_stack_val = hk_data[current_idx]
p60_stack_5v_val = hk_data[current_idx]
current_idx += 1
p60_stack_3v3_val = hk_data[current_idx]
current_idx += 1
pw.dlog("PDU1 Switcher States")
for name, val in zip(PDU1_CHANNELS_NAMES, pdu1_vals):
@ -574,5 +576,6 @@ def handle_pcdu_hk(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
pw.dlog("PDU2 Switcher States")
for name, val in zip(PDU2_CHANNELS_NAMES, pdu2_vals):
pw.dlog(f"{name.ljust(25)}: {val}")
pw.dlog(f"{'P60 Dock 5V Stack'.ljust(25)}: {p60_stack_val}")
pw.printer.print_validity_buffer(hk_data[current_idx:], 3)
pw.dlog(f"{'P60 Dock 5V Stack'.ljust(25)}: {p60_stack_5v_val}")
pw.dlog(f"{'P60 Dock 3V3 Stack'.ljust(25)}: {p60_stack_3v3_val}")
pw.printer.print_validity_buffer(hk_data[current_idx:], 4)