mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Improve beacon state handling
This commit is contained in:
Submodule applications/external updated: 746531bdf1...3dbd298b07
@@ -176,7 +176,10 @@ static void js_blebeacon_stop(struct mjs* mjs) {
|
||||
blebeacon->saved_prev_active = true;
|
||||
blebeacon->prev_active = furi_hal_bt_extra_beacon_is_active();
|
||||
}
|
||||
furi_hal_bt_extra_beacon_stop();
|
||||
if(!furi_hal_bt_extra_beacon_stop()) {
|
||||
ret_int_err(mjs, "Failed stopping beacon");
|
||||
return;
|
||||
}
|
||||
|
||||
mjs_return(mjs, MJS_UNDEFINED);
|
||||
}
|
||||
@@ -209,7 +212,7 @@ static void js_blebeacon_destroy(void* inst) {
|
||||
JsBlebeaconInst* blebeacon = inst;
|
||||
if(!blebeacon->keep_alive) {
|
||||
if(furi_hal_bt_extra_beacon_is_active()) {
|
||||
furi_hal_bt_extra_beacon_stop();
|
||||
furi_check(furi_hal_bt_extra_beacon_stop());
|
||||
}
|
||||
if(blebeacon->saved_prev_cfg && blebeacon->prev_cfg_set) {
|
||||
furi_check(furi_hal_bt_extra_beacon_set_config(&blebeacon->prev_cfg));
|
||||
|
||||
Reference in New Issue
Block a user