File tree Expand file tree Collapse file tree 6 files changed +18
-5
lines changed Expand file tree Collapse file tree 6 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ lib_compat_mode = soft ; can be strict once pio detects SleepyDog on RP2040
132132extends = common:esp32
133133board = esp32dev
134134board_build.partitions = default_8MB.csv
135- build_flags = -DARDUINO_ESP32_DEV -DOFFLINE_MODE_DEBUG -DOFFLINE_MODE_WOKWI
135+ build_flags = -DARDUINO_ESP32_DEV -DOFFLINE_MODE_DEBUG -DOFFLINE_MODE_WOKWI -DBUILD_OFFLINE_ONLY
136136board_build.filesystem = littlefs
137137upload_speed = 921600
138138
Original file line number Diff line number Diff line change @@ -1241,8 +1241,9 @@ void Wippersnapper_V2::connect() {
12411241#endif
12421242 // Call the TL signal decoder to parse the incoming JSON data
12431243 callDecodeB2D ();
1244-
1244+ # ifndef OFFLINE_MODE_WOKWI
12451245 WsV2._fileSystemV2 ->WriteFileConfig ();
1246+ #endif // OFFLINE_MODE_WOKWI used for CI test simulations, lacks TinyUSB
12461247 WS_DEBUG_PRINTLN (" [APP] Hardware configured!" );
12471248 // Blink status LED to green to indicate successful configuration
12481249 setStatusLEDColor (0x00A300 , WsV2.status_pixel_brightnessV2 );
Original file line number Diff line number Diff line change 11// Adafruit IO WipperSnapper
2+ // USE ONLY WITH DEVICES WITHOUT A NETWORK ADAPTER LIKE RP2040 PICO
23//
34// Adafruit invests time and resources providing this open source code.
45// Please support Adafruit and open source hardware by purchasing
56// products from Adafruit!
67//
7- // Brent Rubell for Adafruit Industries, 2020- 2025
8+ // Brent Rubell for Adafruit Industries, 2025
89//
910// All text above must be included in any redistribution.
1011
1112#include " ws_adapters.h"
12- ws_adapter_wifi wipper;
13-
13+ ws_adapter_offline wipper;
1414#define WS_DEBUG // Enable debug output!
1515
1616void setup () {
Original file line number Diff line number Diff line change @@ -767,9 +767,11 @@ bool I2cController::Handle_I2cDeviceAddOrReplace(pb_istream_t *stream) {
767767 // Use the "default" types from the sensor driver
768768 drv->SetSensorTypes (true );
769769 drv->SetPeriod (DEFAULT_SENSOR_PERIOD);
770+ #ifndef OFFLINE_MODE_WOKWI
770771 WsV2._fileSystemV2 ->AddI2cDeviceToFileConfig (
771772 device_descriptor.i2c_device_address , driverName,
772773 drv->GetSensorTypeStrings (), drv->GetNumSensorTypes ());
774+ #endif
773775 did_find_driver = true ;
774776 break ;
775777 }
Original file line number Diff line number Diff line change @@ -64,7 +64,12 @@ ws_sdcard::ws_sdcard() {
6464 if (!did_init) {
6565 if (InitSdCard (SD_CS_PIN)) {
6666 // Attempt to update the config file with the default pin
67+ #ifndef OFFLINE_MODE_WOKWI
6768 did_init = WsV2._fileSystemV2 ->AddSDCSPinToFileConfig (SD_CS_PIN);
69+ #else // WOKWI Test Mode
70+ WsV2.pin_sd_cs = 15 ;
71+ did_init = true ;
72+ #endif
6873 }
6974 }
7075
@@ -714,6 +719,7 @@ bool ws_sdcard::ParseFileConfig() {
714719 WS_DEBUG_PRINTLN (" [SD] Deserializing config.json..." );
715720 JsonDocument &doc = WsV2._fileSystemV2 ->GetDocCfg ();
716721#else
722+ JsonDocument doc;
717723 // Use test data, not data from the filesystem
718724 if (!_use_test_data) {
719725 WS_DEBUG_PRINTLN (" [SD] Parsing Serial Input..." );
Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ typedef ws_wifi_airlift ws_adapter_wifi;
3030#define SD_CS_PIN 15
3131#include "adapters/wifi/ws_wifi_esp8266.h"
3232typedef ws_wifi_esp8266 ws_adapter_wifi ;
33+ #elif defined(ARDUINO_ESP32_DEV ) || defined(ESP32_DEV )
34+ #define SD_CS_PIN 15
35+ #include "adapters/wifi/ws_wifi_esp32.h"
36+ typedef ws_wifi_esp32 ws_adapter_offline ;
3337// ESP32 networking adapter
3438#elif defined(ARDUINO_ARCH_ESP32 )
3539#define SD_CS_PIN 33
You can’t perform that action at this time.
0 commit comments