From 08feec1c9f2fae7161fd08d295a952a8a01ccd4f Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 16 Sep 2026 08:35:28 -0700 Subject: [PATCH] calibration: persist through the backend calibration service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- flows.json | 64 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 59 insertions(+), 5 deletions(-) diff --git a/flows.json b/flows.json index 14d918e..144d53a 100644 --- a/flows.json +++ b/flows.json @@ -2734,11 +2734,16 @@ "t": "eq", "v": "imager/image", "vt": "str" + }, + { + "t": "eq", + "v": "calibration/save", + "vt": "str" } ], "checkall": "true", "repair": false, - "outputs": 9, + "outputs": 10, "x": 550, "y": 220, "wires": [ @@ -2768,6 +2773,9 @@ ], [ "a56a8820702f4610" + ], + [ + "ca11ba7100000002" ] ] }, @@ -2783,7 +2791,7 @@ "width": "0", "height": "0", "head": "", - "format": "\n\n\n\n", + "format": "\n\n\n\n", "storeOutMessages": true, "passthru": true, "resendOnRefresh": true, @@ -3612,7 +3620,7 @@ "width": 0, "height": 0, "head": "", - "format": "\n\n\n\n", + "format": "\n\n\n\n", "storeOutMessages": true, "passthru": true, "resendOnRefresh": true, @@ -4037,11 +4045,16 @@ "t": "eq", "v": "imager/image", "vt": "str" + }, + { + "t": "eq", + "v": "calibration/save", + "vt": "str" } ], "checkall": "true", "repair": false, - "outputs": 2, + "outputs": 3, "x": 550, "y": 440, "wires": [ @@ -4052,6 +4065,9 @@ [ "d103a3c7e312d1f1", "7f4d54e564ca69d7" + ], + [ + "d103a3c7e312d1f1" ] ] }, @@ -7614,7 +7630,7 @@ "width": "0", "height": "0", "head": "", - "format": "\n\n\n\n", + "format": "\n\n\n\n", "storeOutMessages": true, "passthru": true, "resendOnRefresh": true, @@ -9301,5 +9317,43 @@ "wires": [ [] ] + }, + { + "id": "ca11ba7100000001", + "type": "mqtt in", + "z": "6d6a011bf1913637", + "name": "", + "topic": "status/calibration", + "qos": "0", + "datatype": "json", + "broker": "8dc3722c.06efa8", + "nl": false, + "rap": false, + "inputs": 0, + "x": 80, + "y": 400, + "wires": [ + [ + "db1ef284071e60a1" + ] + ] + }, + { + "id": "ca11ba7100000002", + "type": "mqtt out", + "z": "6d6a011bf1913637", + "name": "MQTT - calibration", + "topic": "", + "qos": "", + "retain": "", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "8dc3722c.06efa8", + "x": 790, + "y": 520, + "wires": [] } ] \ No newline at end of file