Code reorg.
This commit is contained in:
parent
408d63825a
commit
de63bdac39
@ -356,23 +356,14 @@ WS2812FX strip = WS2812FX();
|
|||||||
#define WLED_CONNECTED (WiFi.status() == WL_CONNECTED)
|
#define WLED_CONNECTED (WiFi.status() == WL_CONNECTED)
|
||||||
#define WLED_WIFI_CONFIGURED (strlen(clientSSID) >= 1 && strcmp(clientSSID, DEFAULT_CLIENT_SSID) != 0)
|
#define WLED_WIFI_CONFIGURED (strlen(clientSSID) >= 1 && strcmp(clientSSID, DEFAULT_CLIENT_SSID) != 0)
|
||||||
|
|
||||||
//debug macros
|
//debug macro variable definitions
|
||||||
#ifdef WLED_DEBUG
|
#ifdef WLED_DEBUG
|
||||||
#define DEBUG_PRINT(x) Serial.print(x)
|
|
||||||
#define DEBUG_PRINTLN(x) Serial.println(x)
|
|
||||||
#define DEBUG_PRINTF(x) Serial.printf(x)
|
|
||||||
unsigned long debugTime = 0;
|
unsigned long debugTime = 0;
|
||||||
int lastWifiState = 3;
|
int lastWifiState = 3;
|
||||||
unsigned long wifiStateChangedTime = 0;
|
unsigned long wifiStateChangedTime = 0;
|
||||||
int loops = 0;
|
int loops = 0;
|
||||||
#else
|
|
||||||
#define DEBUG_PRINT(x)
|
|
||||||
#define DEBUG_PRINTLN(x)
|
|
||||||
#define DEBUG_PRINTF(x)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
WLED::WLED() {
|
WLED::WLED() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -381,28 +381,23 @@ int getSignalQuality(int rssi);
|
|||||||
class WLED
|
class WLED
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
WLED();
|
||||||
static WLED &instance()
|
static WLED &instance()
|
||||||
{
|
{
|
||||||
static WLED instance;
|
static WLED instance;
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
WLED();
|
|
||||||
|
|
||||||
void reset();
|
|
||||||
void loop();
|
|
||||||
|
|
||||||
|
|
||||||
//boot starts here
|
//boot starts here
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
wledInit();
|
wledInit();
|
||||||
}
|
}
|
||||||
|
void loop();
|
||||||
|
void reset();
|
||||||
|
|
||||||
public: // TODO: privacy
|
|
||||||
void wledInit();
|
void wledInit();
|
||||||
void beginStrip();
|
void beginStrip();
|
||||||
|
|
||||||
void handleConnection();
|
void handleConnection();
|
||||||
void initAP(bool resetAP = false);
|
void initAP(bool resetAP = false);
|
||||||
void initConnection();
|
void initConnection();
|
||||||
|
Loading…
Reference in New Issue
Block a user