Add overlay toggle to calibration dialog, fix serial reconnect on edge test

Add a 💡 button in the calibration modal header (CSS mode only) that
toggles the LED overlay visualization. Auto-stops overlay on modal close
if started from the dialog. Checks and reflects current overlay status
on modal open.

Fix serial devices creating a new connection on every edge test toggle,
which triggered Arduino bootloader resets. Now reuses the cached idle
client for all device types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 17:22:15 +03:00
parent 67a15776b2
commit a6253e8d96
4 changed files with 70 additions and 24 deletions

View File

@@ -120,7 +120,7 @@ import {
showCalibration, closeCalibrationModal, forceCloseCalibrationModal, saveCalibration,
updateOffsetSkipLock, updateCalibrationPreview,
setStartPosition, toggleEdgeInputs, toggleDirection, toggleTestEdge,
showCSSCalibration,
showCSSCalibration, toggleCalibrationOverlay,
} from './features/calibration.js';
// Layer 6: tabs
@@ -345,6 +345,7 @@ Object.assign(window, {
toggleDirection,
toggleTestEdge,
showCSSCalibration,
toggleCalibrationOverlay,
// tabs
switchTab,