diff --git a/main/ble.h b/main/ble.h index 58d0fe6..8d0eaf3 100644 --- a/main/ble.h +++ b/main/ble.h @@ -9,6 +9,9 @@ #include #endif +#define FEATURE_BLE +#define FEATURE_WIRELESS_CONFIG + // local includes #include "globals.h" #include "futurecpp.h" @@ -262,9 +265,9 @@ void WirelessSettingsCallbacks::onWrite(NimBLECharacteristic* pCharacteristic) return; } - const char* write_type = doc["type"].as(); + auto write_type = doc["type"].as(); - if (strcmp(write_type, "wifi") == 0) { + if (write_type == "wifi") { const int index = doc["wifi_index"].as(); ESP_LOGI(TAG, "[ble_config]: Set wifi%i: WiFi-SSID: %s, WiFi-Password: ***", doc["wifi_index"].as(), doc["wifi_ssid"].as()); stringSettings.wifis[index].ssid = doc["wifi_ssid"].as();