Просмотр исходного кода

PcMonitor: Store keys in app storage

Willy-JL 1 год назад
Родитель
Сommit
59ebc5ba9a
2 измененных файлов с 5 добавлено и 0 удалено
  1. 4 0
      pc_monitor/pc_monitor.c
  2. 1 0
      pc_monitor/pc_monitor.h

+ 4 - 0
pc_monitor/pc_monitor.c

@@ -168,6 +168,8 @@ int32_t pc_monitor_app(void* p) {
     // Wait 2nd core to update nvm storage
     furi_delay_ms(200);
 
+    bt_keys_storage_set_storage_path(app->bt, APP_DATA_PATH(".bt_serial.keys"));
+
     BleProfileSerialParams params = {
         .device_name_prefix = "PC Mon",
         .mac_xor = 0x0002,
@@ -202,6 +204,8 @@ int32_t pc_monitor_app(void* p) {
     // Wait 2nd core to update nvm storage
     furi_delay_ms(200);
 
+    bt_keys_storage_set_default_path(app->bt);
+
     furi_check(bt_profile_restore_default(app->bt));
 
     pc_monitor_free(app);

+ 1 - 0
pc_monitor/pc_monitor.h

@@ -9,6 +9,7 @@
 #include <gui/elements.h>
 #include <notification/notification_messages.h>
 #include <input/input.h>
+#include <storage/storage.h>
 
 #define TAG "PCMonitor"
 #define BT_SERIAL_BUFFER_SIZE 128