Skip to content

Commit e8918b9

Browse files
committed
feat: always restore settings on new connections
1 parent f5b2dd3 commit e8918b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pgpemu-esp32/main/pgp_gap.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "pgp_gap.h"
22

3+
#include "config_storage.h"
34
#include "esp_log.h"
45
#include "log_tags.h"
56
#include "pgp_handshake_multi.h"
@@ -68,6 +69,9 @@ void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t* par
6869
break;
6970
case ESP_GAP_BLE_AUTH_CMPL_EVT:
7071
ESP_LOGI(BT_GAP_TAG, "New bonding done with device %d", esp_ble_get_bond_device_num());
72+
73+
read_stored_settings(true);
74+
7175
break;
7276
case ESP_GAP_BLE_PASSKEY_REQ_EVT:
7377
case ESP_GAP_BLE_SEC_REQ_EVT:

0 commit comments

Comments
 (0)