forked from Blendman974/faceclaw
Enable incremental frames; add config setting for controlling custom firmware debug flags
This commit is contained in:
1 parent
2bc53b8c0e
commit
1533c550b4
7 files changed
+92
-8
No files matched your search
@@ -30,6 +30,7 @@ import {
|
||||
import {
|
||||
elevenLabsApiKeySetting,
|
||||
nightscoutApiTokenSetting,
|
||||
firmwareDebugFlagsSetting,
|
||||
nightscoutSiteUrlSetting,
|
||||
onAnySettingChanged,
|
||||
rawScreenshotsEnabledSetting,
|
||||
@@ -188,7 +189,18 @@ class DashboardController {
|
||||
});
|
||||
// Settings toggled from the glasses can change what the phone UI shows
|
||||
// (e.g. the raw-screenshot button), so re-emit the snapshot on any change.
|
||||
onAnySettingChanged(() => this.emit());
|
||||
onAnySettingChanged(() => {
|
||||
this.emit();
|
||||
// Apply a firmware-debug-flags toggle live while connected (Java dedups).
|
||||
this.pushFirmwareDebugFlags();
|
||||
});
|
||||
}
|
||||
|
||||
private pushFirmwareDebugFlags(): void {
|
||||
if (!this.communicator) return;
|
||||
void this.communicator
|
||||
.setFirmwareDebugFlags(firmwareDebugFlagsSetting.get())
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -346,6 +358,11 @@ class DashboardController {
|
||||
// phone can sleep normally while they charge.
|
||||
void this.communicator?.setG2ScreenOn(false).catch(() => {});
|
||||
}
|
||||
if (mappedPhase === "connected" && this.phase !== "connected") {
|
||||
// Push the CFW firmware-debug-flags overlay preference; Java emits the
|
||||
// mode-7 control message once the dashboard container is warmed up.
|
||||
this.pushFirmwareDebugFlags();
|
||||
}
|
||||
this.setPhase(mappedPhase);
|
||||
this.setStatus(state.status);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user