summaryrefslogtreecommitdiff
path: root/api_layers/arduino_layer.py
diff options
context:
space:
mode:
authorChristian Kolset <ckolset@colostate.edu>2026-07-29 13:12:17 -0600
committerChristian Kolset <ckolset@colostate.edu>2026-07-29 13:12:17 -0600
commitbf9c7746ba60613b66ce8d1e9a68c5480f2b93d1 (patch)
tree21c49fa5d5c51e8935c98e7bf240b9e469287ff0 /api_layers/arduino_layer.py
parentb407a079000f6a4b04ecf38eca17c57719e7a7ec (diff)
Sync Mark-10 gauge's live unit into ChannelConfig instead of a fixed default
Mark10Layer._parse() already tracked whichever unit suffix the gauge last reported (lb/kgF/N/ozF — the gauge's physical unit button cycles these independently of this app). serial_device.py hardcoded the "force" channel's unit to "N" and never updated it, so switching units on the gauge itself was invisible here. Adds Mark10Layer.current_unit and has SerialDevice.read_channels() keep the "force" ChannelConfig's unit in sync with it on every poll. This fixes the unit shown in anything that reads ChannelConfig.unit live — new plots, channel pickers, CSV log headers — but does not relabel the Y-axis of an already-open plot pane, since plot axis labels are baked into PlotConfig.y_label once at plot-build time, not re-read from the channel live. Making an open pane's axis relabel itself would need new signal plumbing from the device through AcquisitionEngine to the strip chart — a bigger, separate change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'api_layers/arduino_layer.py')
0 files changed, 0 insertions, 0 deletions