complete RW HK handling

This commit is contained in:
Robin Müller 2022-05-05 13:39:20 +02:00
parent 0be25b10f3
commit 7e460d05c3
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -29,7 +29,8 @@ def handle_rw_hk_data(
)
current_idx += inc_len
pw.dlog(
f"Speed {speed} rpm | Reference Speed {ref_speed} rpm | State {state} | CLC Mode {clc_mode}"
f"Speed {speed} rpm | Reference Speed {ref_speed} rpm | State {state} | "
f"CLC Mode {clc_mode}"
)
if set_id == RwSetIds.LAST_RESET:
pw.dlog(
@ -100,8 +101,8 @@ def handle_rw_hk_data(
)
pw.dlog("UART COM information:")
pw.dlog(
f"NumBytesWritten | NumBytesRead | ParityErr | NoiseErr | FrameErr | "
f"RegOverrunErr | TotalErr"
f"NumBytesWritten | NumBytesRead | ParityErrs | NoiseErrs | FrameErrs | "
f"RegOverrunErrs | TotalErrs"
)
pw.dlog(
f"{uart_num_of_bytes_written} | {uart_num_of_bytes_read} | {uart_num_parity_errors} | "
@ -109,6 +110,11 @@ def handle_rw_hk_data(
f"{uart_total_num_errors}"
)
pw.dlog("SPI COM Info:")
pw.dlog(f"NumBytesWritten | NumBytesRead | RegOverrunErrs | TotalErrs")
pw.dlog(
f"{spi_num_bytes_written} | {spi_num_bytes_read} | {spi_num_reg_overrun_errors} | "
f"{spi_total_num_errors}"
)
if current_idx > 0:
printer.print_validity_buffer(
validity_buffer=hk_data[current_idx:], num_vars=27