Add device lock support and demo mode

Device lock (hardware lock of the DSP, independent of the app lock):
- detect a locked DSP from the 0x2C answer during connect and wait for the code
- unlock with 0x2D, optionally remember the code and unlock automatically
- set a new code (0x2F) from the device settings
- simulator: --lock CODE

Demo mode:
- switch in the settings starts a simulated DSP 204/408 inside the server
- real DSPs are disconnected and greyed out meanwhile and resume afterwards
- demo devices are never saved or exported; sim.py ships with the Pi image and EXEs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
GivouandClaude Opus 5.5 committed 2026-11-01 21:14:04 +01:00
1 parent fe13f261f7
commit 61400df667
13 files changed
+426 -38

No files matched your search

+20
View File
@@ -442,3 +442,23 @@ body.locked #statusbar :is(button, select):not([data-view-ok]) { cursor: not-all
.limled.h { width: auto; height: auto; margin: 0; padding: 2px 6px; font-size: 10px; font-weight: 700; letter-spacing: .06em;
color: color-mix(in srgb, var(--led-o) 45%, transparent); }
.limled.h.on { color: #1a1000; }
/* ---- demo mode */
.demo-badge { font-size: 10px; font-weight: 700; letter-spacing: .08em; color: #1a1000 !important;
background: var(--warn) !important; border-radius: 5px; padding: 1px 6px; }
.devtab.demo { border-color: var(--warn); }
.devtab.paused, .card.paused { opacity: .45; }
.devtab.paused { cursor: not-allowed; }
.card.demo-on { border-color: var(--warn); }
/* ---- device lock (hardware) */
input.code { width: 7.5em; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace;
font-size: 20px; letter-spacing: .3em; text-transform: uppercase; }
.dialog input.code { display: block; margin: 8px auto 4px; }
.lockbox .row { align-items: center; gap: 8px; margin: 6px 0; }
.lockbox .sub { margin-top: 10px; }
.dot.locked { background: var(--warn); }
.dialog label.chk { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; }
.dialog label.chk input { width: 20px; height: 20px; }
.dialog .err { text-align: center; }
.lockbox input.code { flex: none; width: 7.5em; }