File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,7 @@ class Wippersnapper_V2 {
220
220
void errorWriteHangV2 (const char *error);
221
221
222
222
bool _is_offline_mode; // /< Global flag for if the device is in offline mode
223
+ bool _global_auto_config = true ; // /< Support no auto config for exportedDevice
223
224
224
225
// TODO: Do we need this?
225
226
ws_board_status_t _boardStatusV2 =
Original file line number Diff line number Diff line change
1
+ # 1 " C:\\ Users\\ tyeth\\ AppData\\ Local\\ Temp\\ tmp97kub74s"
2
+ #include < Arduino.h>
3
+ # 1 " C:/dev/arduino/Adafruit_Wippersnapper_Arduino/src/Wippersnapper_demo.ino"
4
+ # 12 " C:/dev/arduino/Adafruit_Wippersnapper_Arduino/src/Wippersnapper_demo.ino"
5
+ #include " ws_adapters.h"
6
+ #if defined(OFFLINE_MODE_WOKWI)
7
+ ws_adapter_wifi wipper;
8
+ #elif defined(WS_WIFI_ADAPTER)
9
+ ws_adapter_wifi wipper;
10
+ #elif defined(WS_OFFLINE_ADAPTER)
11
+ ws_adapter_offline wipper;
12
+ #else
13
+ #error "No valid ws_adapter_wifi or ws_adapter_offline defined! Please check your board configuration."
14
+ #endif
15
+ #define WS_DEBUG
16
+ void setup ();
17
+ void loop ();
18
+ #line 24 "C:/dev/arduino/Adafruit_Wippersnapper_Arduino/src/Wippersnapper_demo.ino"
19
+ void setup () {
20
+ Serial.begin (115200 );
21
+ while (!Serial);
22
+ wipper.provision ();
23
+ wipper.connect ();
24
+ }
25
+
26
+ void loop () {
27
+ wipper.run ();
28
+ }
Original file line number Diff line number Diff line change @@ -829,6 +829,10 @@ bool ws_sdcard::ParseExportedFromDevice(JsonDocument &doc) {
829
829
return false ;
830
830
}
831
831
832
+ if (exportedFromDevice[" autoConfig" ].as <bool >() == false ) {
833
+ WsV2._global_auto_config = false ;
834
+ }
835
+
832
836
return true ;
833
837
}
834
838
@@ -889,6 +893,12 @@ bool ws_sdcard::ParseFileConfig() {
889
893
return false ;
890
894
}
891
895
896
+ // If global skip (exportedFromDevice.autoConfig == false) then just continue
897
+ if (!WsV2._global_auto_config ) {
898
+ WS_DEBUG_PRINTLN (" [SD] Auto config is disabled, skipping I2C scan." );
899
+ return true ;
900
+ }
901
+
892
902
// Add the results of I2C scan to the shared buffer
893
903
if (!AddI2cScanResultsToBuffer ()) {
894
904
WS_DEBUG_PRINTLN (" [SD] Error: Unable to add I2C scan results to "
You can’t perform that action at this time.
0 commit comments