Add taring for load cells - #71
Merged
Merged
Conversation
…ed two plot pages
…not strand a stale kg offset
…nge beside the run
…eld to absolute weight
… the absolute one
… and why it is not a zero
.gitignore covered build/ but not build-ns/, so 15 MB of CMake cache, ninja logs and static libs sat in every `git status` as untracked noise.
… valve polarities the stand actually wires The load-cell half is a prerequisite for exercising the LC tare: the profile declared [boards.lc_board] and [boards.lc_board_2] but mapped no roles onto them, so digital-twin surfaced no load-cell channels at all and there was nothing to tare. Adds Fuel Scale on lc_board and LOX Scale on lc_board_2, both cubic. Alongside that, the profile had drifted from the stand: - LOX Upstream PT was missing entirely -- added on pt_board channel 5 with a cubic model and a pressure bar. - Dome CTRL and Ox Upstream were declared NO but are NC valves; fuel vent and lox vent were declared NC but are NO. Every one of those four was inverted, so the state machine drove them backwards. - fuel vent and lox vent had no rows in the actuator tables, leaving them unowned by the state machine. Added, with Vent opening both and Fuel Tank Vent opening only the fuel side. - Ox Upstream now opens in LOX Press, which is the point of that state. - Dome Vent, High Press Vent, Fuel Tank Vent and Ready could not reach Press Standby, so the only way out of a vent state was back through Vent.
… own name
findSeries() walked a REVERSE alias when a board-scoped key had no data, and the
walk could leave the board it was asked about:
ask LC2_Cal.CH1.force_kg_tared (LOX Scale, board dead)
-> reverse index -> canonical LC_Cal.CH1.force_kg_tared
-> that canonical's fallbacks are [LC1_Cal.CH1..., LC2_Cal.CH1...]
-> first with data wins -> LC1 (Fuel Scale, alive)
Two LC boards routinely declare the same connector number -- 41 and 42 both on
CH1 on this stand -- so the generic LC_Cal.CH1 name is claimed by both. Panes are
board-scoped precisely to dodge that, but the ambiguity was reachable underneath
them, in the cache.
The result on the stand: board 42 died mid-session and the Force plot kept drawing
Fuel Scale's live weight in LOX Scale's colour, under LOX Scale's label, while the
readout beside it correctly showed nothing -- the readout resolves through the
store, which has no reverse path. An operator reading the plot saw a healthy LOX
load cell that had been off the network for twenty minutes.
Only the canonical itself is tried now. The reverse index guarantees the key we
were asked for is already among that canonical's fallbacks, so every other entry
is by construction a DIFFERENT BOARD's stream; walking them is never the right
answer. A dead channel reads as dead.
The test fails against the old walk (the dead column comes back finite instead of
NaN) and a second case pins the behaviour worth keeping: a generic LC_Cal.CH1
still resolves while only one LC board is enabled.
…cting format-check runs clang-format 19 over the tree and the branch's own new C++ had never been through it: LcTareStore.hpp, test_lc_tare.cpp and the tare command handling in calibration_main.cpp. Whitespace only -- `./format.sh` output taken verbatim, no hand edits. Build is clean and ctest is 14/14 after it. Produced with clang-format 19.1.7 and black 25.11.0, the versions daq-server-ci.yml pins; Python was already clean.
…tare be replaced The panel named its channels "LC41 Ch1" -- a board id and a connector number, which say nothing about which tank an operator is looking at. It never consulted the role map, though the RTD rows three lines above already did; they now read "Fuel Scale" and "LOX Scale". The generated label is still the fallback, and it carries the board scope for the case where a role is missing. Absolute and tared weight looked identical: 6.4 kg reads the same either way, and the only statement of which one you had was an 11px grey line at the top of the panel driven by anyTared -- so it announced "Tared" for the whole panel while one cell was still absolute. That line is gone. Each readout now carries its own chip, amber Tared or slate Absolute, with an amber border while a tare stands. The numeral keeps its channel colour: that colour is the series' identity in the plot below, and recolouring it on tare would make a readout and its own trace disagree about which load cell is which. Tare and Clear were 10px and easy to miss mid-procedure. They move into their own box under each readout, sized to split the width, and "Tare all" joins the section header. Tare is now offered while a tare is already standing: the service takes a fresh capture and derives the offset from the ABSOLUTE ADC code, so it zeroes at the current load whatever was there before. Clearing first was never required -- it just added a step and left the channel reading gross in between.
star-admin
force-pushed
the
worktree-daq-loadcell-tare
branch
from
September 16, 2026 22:39
a7607d5 to
4886099
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.