mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 06:48:37 -07:00
Merge branch 'ofw-dev' into dev
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
#include <stdio.h>
|
||||
#include <m-dict.h>
|
||||
|
||||
#include <bt/bt_service/bt.h>
|
||||
|
||||
#define TAG "RpcSrv"
|
||||
|
||||
typedef enum {
|
||||
@@ -316,6 +318,15 @@ static int32_t rpc_session_worker(void* context) {
|
||||
session->closed_callback(session->context);
|
||||
}
|
||||
furi_mutex_release(session->callbacks_mutex);
|
||||
|
||||
if(session->owner == RpcOwnerBle) {
|
||||
// Disconnect BLE session
|
||||
FURI_LOG_E("RPC", "BLE session closed due to a decode error");
|
||||
Bt* bt = furi_record_open(RECORD_BT);
|
||||
bt_set_profile(bt, BtProfileSerial);
|
||||
furi_record_close(RECORD_BT);
|
||||
FURI_LOG_E("RPC", "Finished disconnecting the BLE session");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user