Skip to content

Commit

Permalink
Fix FindMy crash on boot when core2 is broken
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Mar 22, 2024
1 parent 7424373 commit c1cdba4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions applications/system/findmy/findmy_startup.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#include "findmy_state.h"
#include <furi_hal.h>
#include <bt/bt_service/bt.h>

void findmy_startup() {
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;
if(findmy_state_load(&state)) {
findmy_state_apply(&state);
Expand Down

0 comments on commit c1cdba4

Please sign in to comment.