From 158e1ccf03f17e01bcc618c3a2d6237483671f7e Mon Sep 17 00:00:00 2001 From: janik Date: Tue, 7 Jul 2026 17:06:00 +0700 Subject: [PATCH] stm32_link: sync iin_avg_ma comment with live firmware protocol Firmware now runs BOTH iin limits (IIN_MAX reverse-feed and the IIN_MIN forward OCP, raised to -47A) on the 8-sample boxcar; wire format is unchanged (verified field-by-field against the live code64 console, including a synthetic-frame decode). Note the field is a raw int16 mA cast and wraps at +-32.768A (observed +26.5A at a true -39.0A) -- the float iin field is the honest monitor above that. Co-Authored-By: Claude Fable 5 --- testbench/stm32_link.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testbench/stm32_link.py b/testbench/stm32_link.py index 3b68ea1..048cd85 100644 --- a/testbench/stm32_link.py +++ b/testbench/stm32_link.py @@ -164,7 +164,7 @@ class BroadcastData: param_value: int = 0 # raw bits; interpret via decode_param_bits(param_type, ...) pong: int = 0 # increments when the MCU processes CMD_PING sys_current_ma: int = 0 # Vout-rail housekeeping current, mA - iin_avg_ma: int = 0 # 8-sample boxcar of iin, mA (the IIN_MAX trip quantity) + iin_avg_ma: int = 0 # 8-sample boxcar of iin, mA (the IIN_MAX/IIN_MIN trip quantity) timestamp: float = field(default_factory=time.time) @property