Merge branch 'ofw-dev' into dev

This commit is contained in:
MX
2023-09-02 13:33:32 +03:00
50 changed files with 538 additions and 322 deletions

View File

@@ -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");
}
}
}