mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-20 04:54:45 -07:00
BLE/GAP fixes (#3533)
* hal: fixed ble_gap race on queue init * fbt: removed deprecated path_as_posix * hal: fixed inconsistencies between f7/f18 APIs * hal: fixed excessively strict event handler re-init checks Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -50,14 +50,14 @@ BleEventFlowStatus ble_event_dispatcher_process_event(void* payload) {
|
||||
}
|
||||
|
||||
void ble_event_dispatcher_init(void) {
|
||||
furi_assert(!initialized);
|
||||
|
||||
GapSvcEventHandlerList_init(handlers);
|
||||
initialized = true;
|
||||
if(!initialized) {
|
||||
GapSvcEventHandlerList_init(handlers);
|
||||
initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
void ble_event_dispatcher_reset(void) {
|
||||
furi_assert(initialized);
|
||||
furi_check(initialized);
|
||||
furi_check(GapSvcEventHandlerList_size(handlers) == 0);
|
||||
|
||||
GapSvcEventHandlerList_clear(handlers);
|
||||
|
||||
@@ -90,7 +90,7 @@ bool ble_gatt_characteristic_update(
|
||||
uint16_t svc_handle,
|
||||
BleGattCharacteristicInstance* char_instance,
|
||||
const void* source) {
|
||||
furi_assert(char_instance);
|
||||
furi_check(char_instance);
|
||||
const BleGattCharacteristicParams* char_descriptor = char_instance->characteristic;
|
||||
FURI_LOG_D(TAG, "Updating %s char", char_descriptor->name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user