FindMy: Resume at system boot if enabled

This commit is contained in:
Willy-JL
2024-03-09 19:42:12 +00:00
parent 4c80a50cbe
commit a5ae1397d9
3 changed files with 21 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ App(
"updater_app",
"storage_move_to_sd",
"js_app",
"findmy_startup",
# "archive",
],
)

View File

@@ -13,3 +13,12 @@ App(
fap_version="1.0",
fap_description="BLE FindMy Location Beacon",
)
App(
appid="findmy_startup",
targets=["f7"],
apptype=FlipperAppType.STARTUP,
entry_point="findmy_startup",
sources=["findmy_startup.c", "findmy_state.c"],
order=1000,
)

View File

@@ -0,0 +1,11 @@
#include "findmy_state.h"
#include <furi_hal.h>
void findmy_startup() {
if(!furi_hal_is_normal_boot()) return;
FindMyState state;
if(findmy_state_load(&state)) {
findmy_state_apply(&state);
}
}