Conversation
The three calibration copies saved by calling the controllers directly, and
imager/image {action:"save_settings"} no longer exists — it was removed when
calibration persistence moved to the backend. All three now publish
calibration/save with the values they converged on.
Preview also hydrates from retained status/calibration, which populates
acq_led_intensity on page load, so the LED toggle comes back at the calibrated
brightness instead of full scale after a reboot or an off/on cycle.
Requires fairscope/PlanktoScope#1013.
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.
Companion to fairscope/PlanktoScope#1013 — they have to land together. That PR removes
imager/image {action:"save_settings"}from the imager, which is what all three calibrationcopies call today, so on its own it would leave calibration silently not persisting.
calibration/saveinstead ofcalling the controllers directly
status/calibrationintoacq_led_intensityandgains, which iswhat restores LED brightness after a reload —
on_led_togglealready sentvalue: this.acq_led_intensity, that field was just never populatedmqtt in(status/calibration), one newmqtt out, and acalibration/saverule on the two switch nodes that whitelist topicsGains are divided by 100 on the way out: the flows carry them ×100, calibration.json stores
true gains, the backend multiplies back up for the imager.
The three copies are still triplicated. Each is now a single line calling one backend
procedure, which is the precondition for collapsing them — worth its own PR.