Skip to content

Commit 544b78c

Browse files
committed
WIP: autoConfig getting written as null to config.json
1 parent bf1498f commit 544b78c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/components/i2c/controller.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,6 +1054,9 @@ bool I2cController::Handle_I2cDeviceAddOrReplace(pb_istream_t *stream) {
10541054
GPSController *drv_uart_gps = nullptr;
10551055

10561056
if (strcmp(device_name, "UNKNOWN_SCAN") == 0) {
1057+
if (!WsV2._global_auto_config) {
1058+
return true;
1059+
}
10571060
WS_DEBUG_PRINTLN("Attempting to autoconfig device found in scan...");
10581061
if (device_descriptor.i2c_device_address == 0x68 ||
10591062
device_descriptor.i2c_device_address == 0x70) {

src/provisioning/sdcard/ws_sdcard.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -856,9 +856,9 @@ bool ws_sdcard::ParseExportedFromDevice(JsonDocument &doc) {
856856
return false;
857857
}
858858

859-
if (exportedFromDevice["autoConfig"].as<bool>() == false) {
860-
WsV2._global_auto_config = false;
861-
}
859+
bool global_auto_config = true;
860+
global_auto_config = exportedFromDevice["autoConfig"].as<bool>();
861+
WsV2._global_auto_config = global_auto_config;
862862

863863
return true;
864864
}

0 commit comments

Comments
 (0)