Add sound demo to Faceclaw; use CFW mode 6 (headerless 4bpp) for images

This commit is contained in:
James Babcock committed 2026-07-03 23:32:46 -07:00
1 parent 116e8891e7
commit acda9cdd7e
15 files changed
+262 -22

No files matched your search

+15
View File
@@ -14,9 +14,11 @@ export type NightscoutSettings = {
siteUrl: string;
apiToken: string;
};
export type BatteryDisplayMode = "icon" | "percentage";
export type SystemCardSettings = {
showFaceclawLogo: boolean;
showBatteryIndicators: boolean;
batteryDisplayMode: BatteryDisplayMode;
showAndroidNotifications: boolean;
showSignalStrength: boolean;
};
@@ -197,6 +199,15 @@ export const showBatteryIndicatorsSetting = new ConfigSettingBoolean({
defaultValue: true,
});
export const batteryDisplayModeSetting = new ConfigSettingEnum<BatteryDisplayMode>({
id: "batteryDisplayMode",
label: "Battery display",
storageKey: "dashboard.systemCard.batteryDisplayMode",
defaultValue: "icon",
values: ["icon", "percentage"],
formatValue: batteryDisplayModeLabel,
});
export const showAndroidNotificationsSetting = new ConfigSettingBoolean({
id: "showAndroidNotifications",
label: "Show Android Notifications",
@@ -267,6 +278,10 @@ export function screenTimeoutLabel(value: ScreenTimeoutSetting): string {
return value === "never" ? "Never" : value;
}
export function batteryDisplayModeLabel(value: BatteryDisplayMode): string {
return value === "icon" ? "Icon" : "Percentage";
}
export function loadNightscoutSettings(): NightscoutSettings {
return {
siteUrl: nightscoutSiteUrlSetting.get(),