Add in-app demo mode toggle, enable alignment assistant in demo data

CAMPER_DEMO=1 only works when Xcode or simctl launches the process, so
a build installed locally and opened from the home screen had no way
to enable demo mode at all. Demo mode is now also a persisted toggle
under Settings > Entwicklung (Debug builds only), checked alongside the
environment variable. Takes effect after an app restart since
DeviceStore/BluetoothManager only read it at init.

Also mark the demo leveling sensor as live-connected - it had a level
reading but never a live link state, which left the Ausrichtungs-
Assistent button (and Live Activity toggle) disabled in demo mode.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
fototeddy
2026-09-05 14:55:47 +02:00
co-authored by Claude Sonnet 5
parent 8d975d2c4d
commit 7fc9442aeb
3 changed files with 37 additions and 5 deletions
@@ -280,6 +280,10 @@ final class BluetoothManager: NSObject {
bluetoothStatusText = "Demo-Modus"
//fridgeStates[DemoData.fridge.id] = DemoData.fridgeState
levelStates[DemoData.level.id] = DemoData.levelState
// Ohne "live" bleibt der Ausrichtungs-Assistent (und die Live
// Activity) im Demo-Modus deaktiviert, weil beide echte Messwerte
// voraussetzen.
linkStates[DemoData.level.id] = .live
solarStates[DemoData.solar.id] = DemoData.solarState
linkStates[DemoData.solar.id] = .live