@robotical/webapp-types 3.25.7 → 3.25.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-types/package.json +1 -1
- package/dist-types/src/components/oneoffs/calibration-screens/ColourSensorCalibration/messages.d.ts +6 -3
- package/dist-types/src/components/oneoffs/calibration-screens/ColourSensorCalibration/messages.js +6 -3
- package/dist-types/src/screens/configuration/marty/Diagnostics/ColourSensorDiagnostics/messages.js +1 -1
- package/dist-types/src/utils/colour-calibration-reconnect.d.ts +1 -0
- package/dist-types/src/utils/colour-calibration-reconnect.js +3 -2
- package/package.json +1 -1
package/dist-types/package.json
CHANGED
package/dist-types/src/components/oneoffs/calibration-screens/ColourSensorCalibration/messages.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ declare const english: {
|
|
|
10
10
|
readonly introduction: "Keep Marty connected to USB power. We will collect {{count}} readings each for air and white, then save the calibration. Keep the lighting the same throughout.";
|
|
11
11
|
readonly sensor: "Colour sensor";
|
|
12
12
|
readonly selectSensor: "Select a colour sensor";
|
|
13
|
+
readonly selectReplacementSensor: "The sensor selected in diagnostics is no longer attached. Select the colour sensor you want to calibrate.";
|
|
13
14
|
readonly step: "Step {{number}} of 2";
|
|
14
15
|
readonly air: "Lift Marty about 30 cm above the surface with both feet clear. Hold it steady and capture the air readings.";
|
|
15
16
|
readonly white: "Place the foot with the selected colour sensor flat on a matt white surface, with the sensor fully over it. Hold Marty steady and capture the white readings.";
|
|
@@ -25,7 +26,8 @@ declare const english: {
|
|
|
25
26
|
readonly captureAir: "Capture air readings";
|
|
26
27
|
readonly captureWhite: "Capture white and save calibration";
|
|
27
28
|
readonly startAgain: "Start again";
|
|
28
|
-
readonly restartCalibration: "
|
|
29
|
+
readonly restartCalibration: "Start air and white calibration";
|
|
30
|
+
readonly calibrationRequired: "Calibrate the colour sensor";
|
|
29
31
|
readonly saved: "Calibration saved on Marty: {{count}} readings each for air and white.";
|
|
30
32
|
readonly reconnectStep: "Final step: reconnect Marty";
|
|
31
33
|
readonly reconnect: "Disconnect Marty below, then use Connect Marty to connect the same robot again. Your calibration is saved. Colour diagnostics will unlock once Marty has loaded the new sensor settings.";
|
|
@@ -33,8 +35,9 @@ declare const english: {
|
|
|
33
35
|
readonly disconnecting: "Disconnecting Marty…";
|
|
34
36
|
readonly loadingCalibration: "Marty has reconnected. Waiting for the new sensor settings and fresh readings…";
|
|
35
37
|
readonly calibrationCheckDelayed: "Marty is connected, but the sensor check is taking longer than expected. The app is retrying automatically. Keep the sensor attached and Marty on USB power. If this continues, disconnect and reconnect Marty.";
|
|
36
|
-
readonly calibrationSensorChanged: "
|
|
37
|
-
readonly calibrationSettingsChanged: "
|
|
38
|
+
readonly calibrationSensorChanged: "A different colour sensor is attached. Start calibration for this sensor using air and white.";
|
|
39
|
+
readonly calibrationSettingsChanged: "Marty could not load the saved calibration. Start calibration again using air and white.";
|
|
40
|
+
readonly previousCalibrationChanged: "An earlier calibration no longer matches this sensor. Start a new calibration using air and white.";
|
|
38
41
|
readonly disconnectFailed: "Marty could not be disconnected. Try the disconnect button again.";
|
|
39
42
|
readonly reconnected: "Calibration complete. Marty has reconnected and loaded the saved sensor settings. Use Settings → Diagnostics to check all five cards and air.";
|
|
40
43
|
readonly download: "Download a copy (optional)";
|
package/dist-types/src/components/oneoffs/calibration-screens/ColourSensorCalibration/messages.js
CHANGED
|
@@ -10,6 +10,7 @@ var english = {
|
|
|
10
10
|
introduction: "Keep Marty connected to USB power. We will collect {{count}} readings each for air and white, then save the calibration. Keep the lighting the same throughout.",
|
|
11
11
|
sensor: "Colour sensor",
|
|
12
12
|
selectSensor: "Select a colour sensor",
|
|
13
|
+
selectReplacementSensor: "The sensor selected in diagnostics is no longer attached. Select the colour sensor you want to calibrate.",
|
|
13
14
|
step: "Step {{number}} of 2",
|
|
14
15
|
air: "Lift Marty about 30 cm above the surface with both feet clear. Hold it steady and capture the air readings.",
|
|
15
16
|
white: "Place the foot with the selected colour sensor flat on a matt white surface, with the sensor fully over it. Hold Marty steady and capture the white readings.",
|
|
@@ -25,7 +26,8 @@ var english = {
|
|
|
25
26
|
captureAir: "Capture air readings",
|
|
26
27
|
captureWhite: "Capture white and save calibration",
|
|
27
28
|
startAgain: "Start again",
|
|
28
|
-
restartCalibration: "
|
|
29
|
+
restartCalibration: "Start air and white calibration",
|
|
30
|
+
calibrationRequired: "Calibrate the colour sensor",
|
|
29
31
|
saved: "Calibration saved on Marty: {{count}} readings each for air and white.",
|
|
30
32
|
reconnectStep: "Final step: reconnect Marty",
|
|
31
33
|
reconnect: "Disconnect Marty below, then use Connect Marty to connect the same robot again. Your calibration is saved. Colour diagnostics will unlock once Marty has loaded the new sensor settings.",
|
|
@@ -33,8 +35,9 @@ var english = {
|
|
|
33
35
|
disconnecting: "Disconnecting Marty…",
|
|
34
36
|
loadingCalibration: "Marty has reconnected. Waiting for the new sensor settings and fresh readings…",
|
|
35
37
|
calibrationCheckDelayed: "Marty is connected, but the sensor check is taking longer than expected. The app is retrying automatically. Keep the sensor attached and Marty on USB power. If this continues, disconnect and reconnect Marty.",
|
|
36
|
-
calibrationSensorChanged: "
|
|
37
|
-
calibrationSettingsChanged: "
|
|
38
|
+
calibrationSensorChanged: "A different colour sensor is attached. Start calibration for this sensor using air and white.",
|
|
39
|
+
calibrationSettingsChanged: "Marty could not load the saved calibration. Start calibration again using air and white.",
|
|
40
|
+
previousCalibrationChanged: "An earlier calibration no longer matches this sensor. Start a new calibration using air and white.",
|
|
38
41
|
disconnectFailed: "Marty could not be disconnected. Try the disconnect button again.",
|
|
39
42
|
reconnected: "Calibration complete. Marty has reconnected and loaded the saved sensor settings. Use Settings → Diagnostics to check all five cards and air.",
|
|
40
43
|
download: "Download a copy (optional)",
|
package/dist-types/src/screens/configuration/marty/Diagnostics/ColourSensorDiagnostics/messages.js
CHANGED
|
@@ -30,7 +30,7 @@ var colourDiagnosticsEnglish = {
|
|
|
30
30
|
sensorDisconnected: "The selected sensor disconnected. Reconnect Marty and select the sensor again.",
|
|
31
31
|
sensorInitialising: "Marty is still loading the sensor settings. Wait a few seconds and try again.",
|
|
32
32
|
sensorBusy: "The sensor is completing another check. Wait a moment and take the snapshot again.",
|
|
33
|
-
calibrationReconnectRequired: "
|
|
33
|
+
calibrationReconnectRequired: "Complete colour sensor calibration before taking snapshots.",
|
|
34
34
|
sensorAsleep: "Marty's sensor power is asleep. Taking a snapshot wakes the sensors before collecting readings.",
|
|
35
35
|
sensorOffline: "The colour sensor is offline. Take a snapshot to wake it. If it stays offline, check the sensor connection.",
|
|
36
36
|
sensorPowerFailed: "Marty's colour sensor did not wake up. No snapshot was saved. Check that Marty is powered on and the sensor is connected, then try again.",
|
|
@@ -88,7 +88,8 @@ export var getPendingColourCalibration = function (sensor) {
|
|
|
88
88
|
}
|
|
89
89
|
var parsed = JSON.parse(value);
|
|
90
90
|
if (typeof parsed.connectionInstanceId !== "string" || typeof parsed.serialNumber !== "string" ||
|
|
91
|
-
!/^[a-f0-9]{16}$/.test(parsed.whiteCalibrationHex)
|
|
91
|
+
!/^[a-f0-9]{16}$/.test(parsed.whiteCalibrationHex) ||
|
|
92
|
+
(parsed.savedAtMs !== undefined && (!Number.isFinite(parsed.savedAtMs) || parsed.savedAtMs <= 0)))
|
|
92
93
|
throw new Error("Invalid pending calibration");
|
|
93
94
|
cached.set(key, parsed);
|
|
94
95
|
return parsed;
|
|
@@ -99,7 +100,7 @@ export var getPendingColourCalibration = function (sensor) {
|
|
|
99
100
|
}
|
|
100
101
|
};
|
|
101
102
|
export var markColourCalibrationPending = function (sensor, serialNumber, whiteCalibrationHex, calibrationRecord) {
|
|
102
|
-
var pending = { connectionInstanceId: sensor.raft.connectionInstanceId || "", serialNumber: serialNumber, whiteCalibrationHex: whiteCalibrationHex, calibrationRecord: calibrationRecord };
|
|
103
|
+
var pending = { connectionInstanceId: sensor.raft.connectionInstanceId || "", serialNumber: serialNumber, whiteCalibrationHex: whiteCalibrationHex, savedAtMs: Date.now(), calibrationRecord: calibrationRecord };
|
|
103
104
|
restorePendingColourCalibration(sensor, pending);
|
|
104
105
|
};
|
|
105
106
|
export var restorePendingColourCalibration = function (sensor, pending) {
|