mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-15 20:01:54 -07:00
RGB Backlight: Load settings on SD insert
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@
|
||||
- Settings: Show free flash amount in internal storage info (by @Willy-JL)
|
||||
- Services:
|
||||
- OFW: On SD insert load BT, Desktop, Dolphin, Expansion, Notification, Region files (by @gsurkov)
|
||||
- On SD insert also load Momentum Settings, Asset Packs, FindMy Flipper, NameSpoof, Power, SubGHz options, and migrate files (by @Willy-JL)
|
||||
- On SD insert also load Momentum Settings, Asset Packs, FindMy Flipper, NameSpoof, RGB Backlight, Power, SubGHz options, and migrate files (by @Willy-JL)
|
||||
- Furi: Re-enabled `FURI_TRACE` since LFS removal frees DFU, will get better crash messages with source code path (by @Willy-JL)
|
||||
- OFW: Sub-GHz: Add Dickert MAHS garage door protocol (by @OevreFlataeker)
|
||||
- OFW: RFID: Add GProxII support (by @BarTenderNZ)
|
||||
|
||||
@@ -62,11 +62,16 @@ static struct {
|
||||
};
|
||||
|
||||
void rgb_backlight_load_settings(bool enabled) {
|
||||
if(rgb_state.settings_loaded) return;
|
||||
rgb_state.enabled = enabled;
|
||||
rgb_state.mutex = furi_mutex_alloc(FuriMutexTypeRecursive);
|
||||
// This function is called from momentum_settings_load()
|
||||
// No need to setup storage pubsub, just expect multiple calls
|
||||
|
||||
// Do not load data from internal memory when booting in DFU mode
|
||||
rgb_state.settings_loaded = false;
|
||||
rgb_state.enabled = enabled;
|
||||
if(!rgb_state.mutex) {
|
||||
rgb_state.mutex = furi_mutex_alloc(FuriMutexTypeRecursive);
|
||||
}
|
||||
|
||||
// Do not load and apply settings when booting in update/RAM mode
|
||||
if(!furi_hal_is_normal_boot()) {
|
||||
rgb_state.settings_loaded = true;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user