mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-14 08:08:36 -07:00
Fix FindMy crash on boot when core2 is broken
This commit is contained in:
@@ -1,9 +1,15 @@
|
|||||||
#include "findmy_state.h"
|
#include "findmy_state.h"
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
|
#include <bt/bt_service/bt.h>
|
||||||
|
|
||||||
void findmy_startup() {
|
void findmy_startup() {
|
||||||
if(!furi_hal_is_normal_boot()) return;
|
if(!furi_hal_is_normal_boot()) return;
|
||||||
|
|
||||||
|
// Wait for BT init and check core2
|
||||||
|
furi_record_open(RECORD_BT);
|
||||||
|
furi_record_close(RECORD_BT);
|
||||||
|
if(!furi_hal_bt_is_gatt_gap_supported()) return;
|
||||||
|
|
||||||
FindMyState state;
|
FindMyState state;
|
||||||
if(findmy_state_load(&state)) {
|
if(findmy_state_load(&state)) {
|
||||||
findmy_state_apply(&state);
|
findmy_state_apply(&state);
|
||||||
|
|||||||
Reference in New Issue
Block a user