Revert some settings handling to how they work in OFW

This commit is contained in:
Willy-JL
2024-08-06 19:34:49 +02:00
parent 9adb1478e6
commit 083c17f09d
26 changed files with 72 additions and 81 deletions

View File

@@ -471,26 +471,24 @@ static NotificationApp* notification_app_alloc(void) {
app->settings.display_off_delay_ms = 30000;
app->settings.vibro_on = true;
// malloc() also does memset(0), no need to init 0 values
_Static_assert(LayerInternal == 0, "need to init layer values");
// app->display.value[LayerInternal] = 0x00;
// app->display.value[LayerNotification] = 0x00;
// app->display.index = LayerInternal;
app->display.value[LayerInternal] = 0x00;
app->display.value[LayerNotification] = 0x00;
app->display.index = LayerInternal;
app->display.light = LightBacklight;
// app->led[0].value[LayerInternal] = 0x00;
// app->led[0].value[LayerNotification] = 0x00;
// app->led[0].index = LayerInternal;
app->led[0].value[LayerInternal] = 0x00;
app->led[0].value[LayerNotification] = 0x00;
app->led[0].index = LayerInternal;
app->led[0].light = LightRed;
// app->led[1].value[LayerInternal] = 0x00;
// app->led[1].value[LayerNotification] = 0x00;
// app->led[1].index = LayerInternal;
app->led[1].value[LayerInternal] = 0x00;
app->led[1].value[LayerNotification] = 0x00;
app->led[1].index = LayerInternal;
app->led[1].light = LightGreen;
// app->led[2].value[LayerInternal] = 0x00;
// app->led[2].value[LayerNotification] = 0x00;
// app->led[2].index = LayerInternal;
app->led[2].value[LayerInternal] = 0x00;
app->led[2].value[LayerNotification] = 0x00;
app->led[2].index = LayerInternal;
app->led[2].light = LightBlue;
app->settings.version = NOTIFICATION_SETTINGS_VERSION;

View File

@@ -2,6 +2,7 @@
#include <furi_hal.h>
#include "notification.h"
#include "notification_messages.h"
#include "notification_settings_filename.h"
#define NOTIFICATION_LED_COUNT 3
#define NOTIFICATION_EVENT_COMPLETE 0x00000001U
@@ -34,7 +35,6 @@ typedef struct {
#define NOTIFICATION_SETTINGS_VERSION 0x02
#define NOTIFICATION_SETTINGS_MAGIC 0x16
#define NOTIFICATION_SETTINGS_PATH CFG_PATH("notification.settings")
typedef struct {
uint8_t version;

View File

@@ -0,0 +1,5 @@
#pragma once
#define NOTIFICATION_SETTINGS_FILE_NAME ".notification.settings"
#define NOTIFICATION_SETTINGS_PATH INT_PATH(NOTIFICATION_SETTINGS_FILE_NAME)