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

+1 -1
View File
@@ -19,7 +19,7 @@ import server
OS_LIST_URL = "https://downloads.raspberrypi.com/os_list_imagingutility_v4.json"
IMAGE_NAMES = {64: "Raspberry Pi OS Lite (64-bit)", 32: "Raspberry Pi OS Lite (32-bit)"}
APP_FILES = ["server.py", "dsp", "static"] # what gets installed on the Pi
APP_FILES = ["server.py", "sim.py", "dsp", "static"] # what gets installed on the Pi
USER_AGENT = "DSP-Control-Pi-Writer/1.0"
# Pi models offered in the writer: (name, description, os bits)