Fix live wiresheet config/runtime slot alignment and cap float display to 2 decimals
Slots with no flags (sensor, controlSignal, out_*) were not skipped
during config property reads, consuming bytes that the device never
sent and misaligning every subsequent config value (setpoint,
proportionalBand, etc.) into tiny denormalized floats like 2.36875e-41.
Changed the filter in _apply_props from "skip if runtime" to "skip if
not config" so only explicitly config-flagged slots are read from config
messages. Also switched iter("slot") to findall("slot") in the slot
registry builder to avoid picking up nested descendants.
Float display now defaults to 2 decimal places everywhere (wiresheet
and properties panel), honouring the precision facet when one exists.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -374,7 +374,7 @@ def display_text(slot, raw):
|
||||
precision = slot["facets"].get("precision")
|
||||
if isinstance(precision, int) and 0 <= precision <= 12:
|
||||
return f"{number:.{precision}f}"
|
||||
return str(number)
|
||||
return f"{number:.2f}"
|
||||
|
||||
if slot_type in INTEGER_TYPES:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user