Battery monitor: "not available" values decode as NAN
Each battery monitor field has a reserved "not available" raw value: voltage 0x7FFF, aux 0xFFFF, current 0x3FFFFF, consumed Ah 0xFFFFF and SOC 0x3FF. The parser decoded them as readings, so an unsynchronised shunt reported SOC 102.3 % and an unavailable current came out as -0.001 A after sign extension. They are now NAN in the C core. Time-to-go stays an integer, with 0xFFFF named VICTRONBLE_TTG_NA. The Arduino wrapper maps the new NANs to 0, as it already did for aux. Adds a host test vector with every field not available, and notes in the README that a battery monitor has now been decoded live on Zephyr (ESP32-S3, Heltec WiFi LoRa 32 V3).
This commit is contained in:
1 parent
318e221170
commit
560ea24f60
9 files changed
+108
-31
No files matched your search
@@ -1,5 +1,20 @@
|
||||
# Version History
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Fixed
|
||||
- Battery monitor fields that carry Victron's "not available" value are now
|
||||
NAN in the C core: voltage (0x7FFF), current (0x3FFFFF), aux voltage and
|
||||
temperature (0xFFFF), consumed Ah (0xFFFFF) and SOC (0x3FF). Before this,
|
||||
an unsynchronised shunt reported SOC 102.3 % and an unavailable current
|
||||
decoded as -0.001 A. Time-to-go keeps its integer 0xFFFF, now named
|
||||
`VICTRONBLE_TTG_NA`. The Arduino wrapper maps the new NANs to 0, matching
|
||||
its existing convention.
|
||||
- Host test vector for a battery monitor with every field not available.
|
||||
|
||||
### Tested
|
||||
- Battery monitor decoded live on Zephyr (ESP32-S3, Heltec WiFi LoRa 32 V3).
|
||||
|
||||
## 0.7.1 (2026-10-09)
|
||||
|
||||
### Fixed
|
||||
|
||||
Reference in new issue
Block a user