Skip to content
Draft
1 change: 1 addition & 0 deletions ci
Submodule ci added at da37d5
5 changes: 4 additions & 1 deletion src/Wippersnapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@
*/

#include "Wippersnapper.h"
#include "Wippersnapper_Networking.h"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be via Wippersnapper.h now so drop this include


Wippersnapper WS;
// Define the global WS instance as the platform-specific derived class
// This ensures virtual methods like _connect() route to the correct implementation
Wippersnapper_WiFi WS;

Wippersnapper::Wippersnapper() {
_mqtt = 0; // MQTT Client object
Expand Down
7 changes: 6 additions & 1 deletion src/Wippersnapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,11 @@ class Wippersnapper {
wippersnapper_signal_v1_CreateSignalRequest
_outgoingSignalMsg; /*!< Outgoing signal message from device */
};
extern Wippersnapper WS; ///< Global member variable for callbacks

// Include networking to get the platform-specific Wippersnapper_WiFi typedef
#include "Wippersnapper_Networking.h"

// // Global WS instance - defined as platform-specific type in Wippersnapper.cpp
// extern Wippersnapper_WiFi WS; ///< Global member variable for callbacks
Copy link
Member Author

@tyeth tyeth Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this, but leave comment: global WS now is a Wippersnapper_WiFi which comes via Wippersnapper_Networking.h, but needs to be extern'd in each cpp file.


#endif // ADAFRUIT_WIPPERSNAPPER_H
1 change: 0 additions & 1 deletion src/components/analogIO/Wippersnapper_AnalogIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,5 @@ class Wippersnapper_AnalogIO {
int32_t _totalAnalogInputPins; /*!< Total number of analog input pins */
analogInputPin *_analog_input_pins; /*!< Array of analog pin objects */
};
extern Wippersnapper WS; /*!< Wippersnapper variable. */

#endif // WIPPERSNAPPER_DIGITALGPIO_H
1 change: 0 additions & 1 deletion src/components/digitalIO/Wippersnapper_DigitalGPIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,5 @@ class Wippersnapper_DigitalGPIO {
int32_t
_totalDigitalInputPins; /*!< Total number of digital-input capable pins */
};
extern Wippersnapper WS;

#endif // WIPPERSNAPPER_DIGITALGPIO_H
6 changes: 3 additions & 3 deletions src/components/display/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#include "Wippersnapper.h"
#include "hardware.h"

class Wippersnapper_V2; ///< Forward declaration
class DisplayHardware; ///< Forward declaration
class Wippersnapper; ///< Forward declaration
class DisplayHardware; ///< Forward declaration

/**************************************************************************/
/*!
Expand All @@ -43,5 +43,5 @@ class DisplayController {
_hw_instances; ///< Holds pointers to DisplayHardware instances
unsigned long _last_bar_update; ///< Timestamp of last status bar update
};
extern Wippersnapper Ws; ///< Global WS instance

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class drvDispThinkInkGrayscale4Eaamfgn : public dispDrvBase {
}
} else if (message[i] == 0xC2 && message[i + 1] == 0xB0) {
// Degree symbol
_display->write(char(248));
_display->write(char(247));
i++;
} else {
_display->print(message[i]);
Expand Down
3 changes: 2 additions & 1 deletion src/components/display/drivers/dispDrvThinkInkGrayscale4T5.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ class dispDrvThinkInkGrayscale4T5 : public dispDrvBase {
i++;
}
} else if (message[i] == 0xC2 && message[i + 1] == 0xB0) {
_display->write(char(248));
// Degree symbol
_display->write(char(247));
i++;
} else {
_display->print(message[i]);
Expand Down
1 change: 0 additions & 1 deletion src/components/ds18x20/ws_ds18x20.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,5 @@ class ws_ds18x20 {
std::vector<ds18x20Obj *>
_ds18xDrivers; ///< Vec. of ptrs. to ds18x driver objects
};
extern Wippersnapper WS;

#endif // WIPPERSNAPPER_DS18X20_H
1 change: 0 additions & 1 deletion src/components/i2c/WipperSnapper_I2C.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,5 @@ class WipperSnapper_Component_I2C {
WipperSnapper_I2C_Driver_Out_SH1107 *_sh1107 = nullptr;
WipperSnapper_I2C_Driver_Out_Ssd1306 *_ssd1306 = nullptr;
};
extern Wippersnapper WS;

#endif // WipperSnapper_Component_I2C_H
1 change: 0 additions & 1 deletion src/components/ledc/ws_ledc.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,5 @@ class ws_ledc {
bool analogWrite(uint8_t pin, int value);
uint32_t tone(uint8_t pin, uint32_t freq);
};
extern Wippersnapper WS;

#endif // ws_ledc_H
2 changes: 1 addition & 1 deletion src/components/pixels/ws_pixels.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ class ws_pixels {
void publishAddStrandResponse(bool is_success, char *pixels_pin_data);
uint32_t getGammaCorrectedColor(uint32_t pixel_color, strand_s strand);
};
extern Wippersnapper WS;

#endif // WS_PIXELS
1 change: 0 additions & 1 deletion src/components/pwm/ws_pwm.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,5 @@ class ws_pwm {
private:
ws_ledc *_ledcMgr = nullptr; ///< pointer to ws_ledc
};
extern Wippersnapper WS;

#endif // WS_PWM
2 changes: 0 additions & 2 deletions src/components/register/Wippersnapper_Register.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
*/
#include "Wippersnapper.h"

extern Wippersnapper WS;

/****************************************************************************/
/*!
@brief Encodes hardware registration request message and publishes
Expand Down
1 change: 0 additions & 1 deletion src/components/servo/ws_servo.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,5 @@ class ws_servo {
servoComponent _servos[MAX_SERVO_NUM]; ///< Container of servo objects and
///< their associated pin #s
};
extern Wippersnapper WS;

#endif // WS_SERVO
1 change: 0 additions & 1 deletion src/components/statusLED/Wippersnapper_StatusLED.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "Wippersnapper_StatusLED.h"
#include "Wippersnapper.h"

extern Wippersnapper WS;
#ifdef USE_STATUS_NEOPIXEL
Adafruit_NeoPixel *statusPixel = new Adafruit_NeoPixel(
STATUS_NEOPIXEL_NUM, STATUS_NEOPIXEL_PIN, NEO_GRB + NEO_KHZ800);
Expand Down
1 change: 0 additions & 1 deletion src/network_interfaces/Wippersnapper_AIRLIFT.h
Copy link
Member Author

@tyeth tyeth Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all these need fixing up like esp32 (other Arch builds not tested)

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#define SPIWIFI SPI /*!< Instance of SPI interface used by an AirLift. */
#endif

extern Wippersnapper WS;
/****************************************************************************/
/*!
@brief Class for using the AirLift Co-Processor network iface.
Expand Down
5 changes: 4 additions & 1 deletion src/network_interfaces/Wippersnapper_ESP32.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
#include "WiFiMulti.h"
#include <NetworkClient.h>
#include <NetworkClientSecure.h>
extern Wippersnapper WS;

class Wippersnapper_ESP32;
extern Wippersnapper_ESP32 WS;

/****************************************************************************/
/*!
Expand Down Expand Up @@ -359,5 +361,6 @@ class Wippersnapper_ESP32 : public Wippersnapper {
}
};


#endif // ARDUINO_ARCH_ESP32_H
#endif // Wippersnapper_ESP32_H
2 changes: 0 additions & 2 deletions src/network_interfaces/Wippersnapper_ESP8266.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
// static const char *fingerprint PROGMEM = "47 D2 CB 14 DF 38 97 59 C6 65 1A
// 1F 3E 00 1E 53 CC A5 17 E0";

extern Wippersnapper WS;

/******************************************************************************/
/*!
@brief Class for interacting with the Espressif ESP8266's network
Expand Down
1 change: 0 additions & 1 deletion src/network_interfaces/ws_networking_pico.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "Arduino.h"
#include <WiFiClient.h>
#include <WiFiClientSecure.h>
extern Wippersnapper WS;

/****************************************************************************/
/*!
Expand Down
1 change: 0 additions & 1 deletion src/provisioning/littlefs/WipperSnapper_LittleFS.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,4 @@ class WipperSnapper_LittleFS {
void fsHalt(String msg);
};

extern Wippersnapper WS;
#endif // WIPPERSNAPPER_LITTLEFS_H
1 change: 0 additions & 1 deletion src/provisioning/tinyusb/Wippersnapper_FS.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,4 @@ class Wippersnapper_FS {
WipperSnapper, False otherwise. */
};

extern Wippersnapper WS;
#endif // WIPPERSNAPPER_FS_H
Loading