mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 05:38:35 -07:00
FindMy: Resume at system boot if enabled
This commit is contained in:
@@ -6,6 +6,7 @@ App(
|
||||
"updater_app",
|
||||
"storage_move_to_sd",
|
||||
"js_app",
|
||||
"findmy_startup",
|
||||
# "archive",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
11
applications/system/findmy/findmy_startup.c
Normal file
11
applications/system/findmy/findmy_startup.c
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user