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
132
132
extends = common:esp32
133
133
board = esp32dev
134
134
board_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
136
136
board_build.filesystem = littlefs
137
137
upload_speed = 921600
138
138
Original file line number Diff line number Diff line change @@ -1241,8 +1241,9 @@ void Wippersnapper_V2::connect() {
1241
1241
#endif
1242
1242
// Call the TL signal decoder to parse the incoming JSON data
1243
1243
callDecodeB2D ();
1244
-
1244
+ # ifndef OFFLINE_MODE_WOKWI
1245
1245
WsV2._fileSystemV2 ->WriteFileConfig ();
1246
+ #endif // OFFLINE_MODE_WOKWI used for CI test simulations, lacks TinyUSB
1246
1247
WS_DEBUG_PRINTLN (" [APP] Hardware configured!" );
1247
1248
// Blink status LED to green to indicate successful configuration
1248
1249
setStatusLEDColor (0x00A300 , WsV2.status_pixel_brightnessV2 );
Original file line number Diff line number Diff line change 1
1
// Adafruit IO WipperSnapper
2
+ // USE ONLY WITH DEVICES WITHOUT A NETWORK ADAPTER LIKE RP2040 PICO
2
3
//
3
4
// Adafruit invests time and resources providing this open source code.
4
5
// Please support Adafruit and open source hardware by purchasing
5
6
// products from Adafruit!
6
7
//
7
- // Brent Rubell for Adafruit Industries, 2020- 2025
8
+ // Brent Rubell for Adafruit Industries, 2025
8
9
//
9
10
// All text above must be included in any redistribution.
10
11
11
12
#include " ws_adapters.h"
12
- ws_adapter_wifi wipper;
13
-
13
+ ws_adapter_offline wipper;
14
14
#define WS_DEBUG // Enable debug output!
15
15
16
16
void setup () {
Original file line number Diff line number Diff line change @@ -767,9 +767,11 @@ bool I2cController::Handle_I2cDeviceAddOrReplace(pb_istream_t *stream) {
767
767
// Use the "default" types from the sensor driver
768
768
drv->SetSensorTypes (true );
769
769
drv->SetPeriod (DEFAULT_SENSOR_PERIOD);
770
+ #ifndef OFFLINE_MODE_WOKWI
770
771
WsV2._fileSystemV2 ->AddI2cDeviceToFileConfig (
771
772
device_descriptor.i2c_device_address , driverName,
772
773
drv->GetSensorTypeStrings (), drv->GetNumSensorTypes ());
774
+ #endif
773
775
did_find_driver = true ;
774
776
break ;
775
777
}
Original file line number Diff line number Diff line change @@ -64,7 +64,12 @@ ws_sdcard::ws_sdcard() {
64
64
if (!did_init) {
65
65
if (InitSdCard (SD_CS_PIN)) {
66
66
// Attempt to update the config file with the default pin
67
+ #ifndef OFFLINE_MODE_WOKWI
67
68
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
68
73
}
69
74
}
70
75
@@ -714,6 +719,7 @@ bool ws_sdcard::ParseFileConfig() {
714
719
WS_DEBUG_PRINTLN (" [SD] Deserializing config.json..." );
715
720
JsonDocument &doc = WsV2._fileSystemV2 ->GetDocCfg ();
716
721
#else
722
+ JsonDocument doc;
717
723
// Use test data, not data from the filesystem
718
724
if (!_use_test_data) {
719
725
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;
30
30
#define SD_CS_PIN 15
31
31
#include "adapters/wifi/ws_wifi_esp8266.h"
32
32
typedef 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 ;
33
37
// ESP32 networking adapter
34
38
#elif defined(ARDUINO_ARCH_ESP32 )
35
39
#define SD_CS_PIN 33
You can’t perform that action at this time.
0 commit comments