commands to set and get pcdu parameters

This commit is contained in:
2022-06-10 11:02:08 +02:00
parent bfc9b17f10
commit 2a245b1714
7 changed files with 89 additions and 16 deletions

View File

@ -180,13 +180,13 @@ def handle_pdu_data(
current_list = []
for idx in range(len(PDU1_CHANNELS_NAMES)):
current_list.append(
struct.unpack("!h", hk_data[current_idx : current_idx + 2])[0]
struct.unpack("!h", hk_data[current_idx: current_idx + 2])[0]
)
current_idx += 2
voltage_list = []
for idx in range(len(PDU1_CHANNELS_NAMES)):
voltage_list.append(
struct.unpack("!H", hk_data[current_idx : current_idx + 2])[0]
struct.unpack("!H", hk_data[current_idx: current_idx + 2])[0]
)
current_idx += 2
output_enb_list = []
@ -205,7 +205,7 @@ def handle_pdu_data(
fmt_str = "!IBh"
inc_len = struct.calcsize(fmt_str)
(boot_count, batt_mode, temperature) = struct.unpack(
fmt_str, hk_data[current_idx : current_idx + inc_len]
fmt_str, hk_data[current_idx: current_idx + inc_len]
)
info = (
f"Boot Count {boot_count} | Battery Mode {batt_mode} | "