Compare commits

...

1 Commits

Author SHA1 Message Date
c9d35df277 fixed type of pdu temperature 2022-06-10 11:25:27 +02:00

View File

@@ -202,14 +202,14 @@ def handle_pdu_data(
f"{voltage_list[idx]:05} | {current_list[idx]:04}"
)
pw.dlog(content_line)
fmt_str = "!IBh"
fmt_str = "!IBf"
inc_len = struct.calcsize(fmt_str)
(boot_count, batt_mode, temperature) = struct.unpack(
fmt_str, hk_data[current_idx: current_idx + inc_len]
)
info = (
f"Boot Count {boot_count} | Battery Mode {batt_mode} | "
f"Temperature {temperature / 10.0}"
f"Temperature {temperature}"
)
pw.dlog(info)