Comment cleanup and line reduction.

This commit is contained in:
Travis J Dean 2020-03-30 04:21:47 -04:00
parent d2f55e1064
commit 3e1eb02f54

View File

@ -1,41 +1,39 @@
#ifndef WLED_H #ifndef WLED_H
#define WLED_H #define WLED_H
/* /*
Main sketch, global variable declarations Main sketch, global variable declarations
*/ @title WLED project sketch
/* @version 0.9.1
* @title WLED project sketch @author Christian Schwinne
* @version 0.9.1
* @author Christian Schwinne
*/ */
//ESP8266-01 (blue) got too little storage space to work with all features of WLED. To use it, you must use ESP8266 Arduino Core v2.4.2 and the setting 512K(No SPIFFS). // ESP8266-01 (blue) got too little storage space to work with all features of WLED. To use it, you must use ESP8266 Arduino Core v2.4.2 and the setting 512K(No SPIFFS).
//ESP8266-01 (black) has 1MB flash and can thus fit the whole program. Use 1M(64K SPIFFS). // ESP8266-01 (black) has 1MB flash and can thus fit the whole program. Use 1M(64K SPIFFS).
//Uncomment some of the following lines to disable features to compile for ESP8266-01 (max flash size 434kB): // Uncomment some of the following lines to disable features to compile for ESP8266-01 (max flash size 434kB):
// Alternatively, with platformio pass your chosen flags to your custom build target in platformio.ini.override
//You are required to disable over-the-air updates: // You are required to disable over-the-air updates:
//#define WLED_DISABLE_OTA //saves 14kb //#define WLED_DISABLE_OTA //saves 14kb
//You need to choose some of these features to disable: // You need to choose some of these features to disable:
//#define WLED_DISABLE_ALEXA //saves 11kb //#define WLED_DISABLE_ALEXA //saves 11kb
//#define WLED_DISABLE_BLYNK //saves 6kb //#define WLED_DISABLE_BLYNK //saves 6kb
//#define WLED_DISABLE_CRONIXIE //saves 3kb //#define WLED_DISABLE_CRONIXIE //saves 3kb
//#define WLED_DISABLE_HUESYNC //saves 4kb //#define WLED_DISABLE_HUESYNC //saves 4kb
//#define WLED_DISABLE_INFRARED //there is no pin left for this on ESP8266-01, saves 12kb //#define WLED_DISABLE_INFRARED //there is no pin left for this on ESP8266-01, saves 12kb
#define WLED_ENABLE_MQTT //saves 12kb #define WLED_ENABLE_MQTT //saves 12kb
#define WLED_ENABLE_ADALIGHT //saves 500b only #define WLED_ENABLE_ADALIGHT //saves 500b only
//#define WLED_ENABLE_DMX //uses 3.5kb //#define WLED_ENABLE_DMX //uses 3.5kb
#define WLED_DISABLE_FILESYSTEM //SPIFFS is not used by any WLED feature yet #define WLED_DISABLE_FILESYSTEM //SPIFFS is not used by any WLED feature yet
//#define WLED_ENABLE_FS_SERVING //Enable sending html file from SPIFFS before serving progmem version //#define WLED_ENABLE_FS_SERVING //Enable sending html file from SPIFFS before serving progmem version
//#define WLED_ENABLE_FS_EDITOR //enable /edit page for editing SPIFFS content. Will also be disabled with OTA lock //#define WLED_ENABLE_FS_EDITOR //enable /edit page for editing SPIFFS content. Will also be disabled with OTA lock
//to toggle usb serial debug (un)comment the following line // to toggle usb serial debug (un)comment the following line
//#define WLED_DEBUG //#define WLED_DEBUG
//library inclusions // Library inclusions.
#include <Arduino.h> #include <Arduino.h>
#ifdef ESP8266 #ifdef ESP8266
#include <ESP8266WiFi.h> #include <ESP8266WiFi.h>
@ -116,225 +114,171 @@ extern "C"
#endif #endif
#endif #endif
//version code in format yymmddb (b = daily build) // version code in format yymmddb (b = daily build)
#define VERSION 2003222 #define VERSION 2003222
// Global external variable declaration. See wled.cpp for definitions and comments.
extern char versionString[]; extern char versionString[];
//AP and OTA default passwords (for maximum change them!)
extern char apPass[65]; extern char apPass[65];
extern char otaPass[33]; extern char otaPass[33];
extern byte auxDefaultState;
//Hardware CONFIG (only changeble HERE, not at runtime) extern byte auxTriggeredState;
//LED strip pin, button pin and IR pin changeable in NpbWrapper.h! extern char ntpServerName[33];
extern byte auxDefaultState; //0: input 1: high 2: low
extern byte auxTriggeredState; //0: input 1: high 2: low
extern char ntpServerName[33]; //NTP server to use
//WiFi CONFIG (all these can be changed via web UI, no need to set them here)
extern char clientSSID[33]; extern char clientSSID[33];
extern char clientPass[65]; extern char clientPass[65];
extern char cmDNS[33]; //mDNS address (placeholder, will be replaced by wledXXXXXXXXXXXX.local) extern char cmDNS[33];
extern char apSSID[33]; //AP off by default (unless setup) extern char apSSID[33];
extern byte apChannel; //2.4GHz WiFi AP channel (1-13) extern byte apChannel;
extern byte apHide; //hidden AP SSID extern byte apHide;
extern byte apBehavior; //access point opens when no connection after boot by default extern byte apBehavior;
extern IPAddress staticIP; //static IP of ESP extern IPAddress staticIP;
extern IPAddress staticGateway; //gateway (router) IP extern IPAddress staticGateway;
extern IPAddress staticSubnet; //most common subnet in home networks extern IPAddress staticSubnet;
extern bool noWifiSleep; //disabling modem sleep modes will increase heat output and power usage, but may help with connection issues extern bool noWifiSleep;
extern uint16_t ledCount;
//LED CONFIG extern bool useRGBW;
extern uint16_t ledCount; //overcurrent prevented by ABL #define ABL_MILLIAMPS_DEFAULT 850;
extern bool useRGBW; //SK6812 strips can contain an extra White channel extern bool turnOnAtBoot;
#define ABL_MILLIAMPS_DEFAULT 850; //auto lower brightness to stay close to milliampere limit extern byte bootPreset;
extern bool turnOnAtBoot; //turn on LEDs at power-up extern byte col[];
extern byte bootPreset; //save preset to load after power-up extern byte colSec[];
extern byte briS;
extern byte col[]; //current RGB(W) primary color. col[] should be updated if you want to change the color. extern byte nightlightTargetBri;
extern byte colSec[]; //current RGB(W) secondary color
extern byte briS; //default brightness
extern byte nightlightTargetBri; //brightness after nightlight is over
extern byte nightlightDelayMins; extern byte nightlightDelayMins;
extern bool nightlightFade; //if enabled, light will gradually dim towards the target bri. Otherwise, it will instantly set after delay over extern bool nightlightFade;
extern bool nightlightColorFade; //if enabled, light will gradually fade color from primary to secondary color. extern bool nightlightColorFade;
extern bool fadeTransition; //enable crossfading color transition extern bool fadeTransition;
extern uint16_t transitionDelay; //default crossfade duration in ms extern uint16_t transitionDelay;
extern bool skipFirstLed;
extern bool skipFirstLed; //ignore first LED in strip (useful if you need the LED as signal repeater) extern byte briMultiplier;
extern byte briMultiplier; //% of brightness to set (to limit power, if you set it to 50 and set bri to 255, actual brightness will be 127) extern char serverDescription[33];
extern bool syncToggleReceive;
//User Interface CONFIG
extern char serverDescription[33]; //Name of module
extern bool syncToggleReceive; //UIs which only have a single button for sync should toggle send+receive if this is true, only send otherwise
//Sync CONFIG
extern bool buttonEnabled; extern bool buttonEnabled;
extern byte irEnabled; //Infrared receiver extern byte irEnabled;
extern uint16_t udpPort;
extern uint16_t udpPort; //WLED notifier default port extern uint16_t udpRgbPort;
extern uint16_t udpRgbPort; //Hyperion port extern bool receiveNotificationBrightness;
extern bool receiveNotificationColor;
extern bool receiveNotificationBrightness; //apply brightness from incoming notifications extern bool receiveNotificationEffects;
extern bool receiveNotificationColor; //apply color extern bool notifyDirect;
extern bool receiveNotificationEffects; //apply effects setup extern bool notifyButton;
extern bool notifyDirect; //send notification if change via UI or HTTP API extern bool notifyAlexa;
extern bool notifyButton; //send if updated by button or infrared remote extern bool notifyMacro;
extern bool notifyAlexa; //send notification if updated via Alexa extern bool notifyHue;
extern bool notifyMacro; //send notification for macro extern bool notifyTwice;
extern bool notifyHue; //send notification if Hue light changes extern bool alexaEnabled;
extern bool notifyTwice; //notifications use UDP: enable if devices don't sync reliably extern char alexaInvocationName[33];
extern char blynkApiKey[36];
extern bool alexaEnabled; //enable device discovery by Amazon Echo extern uint16_t realtimeTimeoutMs;
extern char alexaInvocationName[33]; //speech control name of device. Choose something voice-to-text can understand extern int arlsOffset;
extern bool receiveDirect;
extern char blynkApiKey[36]; //Auth token for Blynk server. If empty, no connection will be made extern bool arlsDisableGammaCorrection;
extern bool arlsForceMaxBri;
extern uint16_t realtimeTimeoutMs; //ms timeout of realtime mode before returning to normal mode
extern int arlsOffset; //realtime LED offset
extern bool receiveDirect; //receive UDP realtime
extern bool arlsDisableGammaCorrection; //activate if gamma correction is handled by the source
extern bool arlsForceMaxBri; //enable to force max brightness if source has very dark colors that would be black
#define E131_MAX_UNIVERSE_COUNT 9 #define E131_MAX_UNIVERSE_COUNT 9
extern uint16_t e131Universe; //settings for E1.31 (sACN) protocol (only DMX_MODE_MULTIPLE_* can span over consequtive universes) extern uint16_t e131Universe;
extern uint8_t DMXMode; //DMX mode (s.a.) extern uint8_t DMXMode;
extern uint16_t DMXAddress; //DMX start address of fixture, a.k.a. first Channel [for E1.31 (sACN) protocol] extern uint16_t DMXAddress;
extern uint8_t DMXOldDimmer; //only update brightness on change extern uint8_t DMXOldDimmer;
extern uint8_t e131LastSequenceNumber[E131_MAX_UNIVERSE_COUNT]; //to detect packet loss extern uint8_t e131LastSequenceNumber[E131_MAX_UNIVERSE_COUNT];
extern bool e131Multicast; //multicast or unicast extern bool e131Multicast;
extern bool e131SkipOutOfSequence; //freeze instead of flickering extern bool e131SkipOutOfSequence;
extern bool mqttEnabled; extern bool mqttEnabled;
extern char mqttDeviceTopic[33]; //main MQTT topic (individual per device, default is wled/mac) extern char mqttDeviceTopic[33];
extern char mqttGroupTopic[33]; //second MQTT topic (for example to group devices) extern char mqttGroupTopic[33];
extern char mqttServer[33]; //both domains and IPs should work (no SSL) extern char mqttServer[33];
extern char mqttUser[41]; //optional: username for MQTT auth extern char mqttUser[41];
extern char mqttPass[41]; //optional: password for MQTT auth extern char mqttPass[41];
extern char mqttClientID[41]; //override the client ID extern char mqttClientID[41];
extern uint16_t mqttPort; extern uint16_t mqttPort;
extern bool huePollingEnabled;
extern bool huePollingEnabled; //poll hue bridge for light state extern uint16_t huePollIntervalMs;
extern uint16_t huePollIntervalMs; //low values (< 1sec) may cause lag but offer quicker response extern char hueApiKey[47];
extern char hueApiKey[47]; //key token will be obtained from bridge extern byte huePollLightId;
extern byte huePollLightId; //ID of hue lamp to sync to. Find the ID in the hue app ("about" section) extern IPAddress hueIP;
extern IPAddress hueIP; //IP address of the bridge
extern bool hueApplyOnOff; extern bool hueApplyOnOff;
extern bool hueApplyBri; extern bool hueApplyBri;
extern bool hueApplyColor; extern bool hueApplyColor;
extern bool ntpEnabled;
//Time CONFIG extern bool useAMPM;
extern bool ntpEnabled; //get internet time. Only required if you use clock overlays or time-activated macros extern byte currentTimezone;
extern bool useAMPM; //12h/24h clock format extern int utcOffsetSecs;
extern byte currentTimezone; //Timezone ID. Refer to timezones array in wled_ntp.cpp extern byte overlayDefault;
extern int utcOffsetSecs; //Seconds to offset from UTC before timzone calculation extern byte overlayMin;
extern byte overlayDefault; //0: no overlay 1: analog clock 2: single-digit clocl 3: cronixie
extern byte overlayMin; //boundaries of overlay mode
extern byte overlayMax; extern byte overlayMax;
extern byte analogClock12pixel;
extern byte analogClock12pixel; //The pixel in your strip where "midnight" would be extern bool analogClockSecondsTrail;
extern bool analogClockSecondsTrail; //Display seconds as trail of LEDs instead of a single pixel extern bool analogClock5MinuteMarks;
extern bool analogClock5MinuteMarks; //Light pixels at every 5-minute position extern char cronixieDisplay[7];
extern bool cronixieBacklight;
extern char cronixieDisplay[7]; //Cronixie Display mask. See wled13_cronixie.ino extern bool countdownMode;
extern bool cronixieBacklight; //Allow digits to be back-illuminated extern byte countdownYear, countdownMonth;
extern bool countdownMode; //Clock will count down towards date
extern byte countdownYear, countdownMonth; //Countdown target date, year is last two digits
extern byte countdownDay, countdownHour; extern byte countdownDay, countdownHour;
extern byte countdownMin, countdownSec; extern byte countdownMin, countdownSec;
extern byte macroBoot;
extern byte macroBoot; //macro loaded after startup extern byte macroNl;
extern byte macroNl; //after nightlight delay over
extern byte macroCountdown; extern byte macroCountdown;
extern byte macroAlexaOn, macroAlexaOff; extern byte macroAlexaOn, macroAlexaOff;
extern byte macroButton, macroLongPress, macroDoublePress; extern byte macroButton, macroLongPress, macroDoublePress;
extern bool otaLock;
//Security CONFIG extern bool wifiLock;
extern bool otaLock; //prevents OTA firmware updates without password. ALWAYS enable if system exposed to any public networks extern bool aOtaEnabled;
extern bool wifiLock; //prevents access to WiFi settings when OTA lock is enabled
extern bool aOtaEnabled; //ArduinoOTA allows easy updates directly from the IDE. Careful, it does not auto-disable when OTA lock is on
extern uint16_t userVar0, userVar1; extern uint16_t userVar0, userVar1;
#ifdef WLED_ENABLE_DMX #ifdef WLED_ENABLE_DMX
//dmx CONFIG extern byte DMXChannels;
extern byte DMXChannels; // number of channels per fixture
extern byte DMXFixtureMap[15]; extern byte DMXFixtureMap[15];
extern // assigns the different channels to different functions. See wled21_dmx.ino for more information. extern
extern uint16_t DMXGap; // gap between the fixtures. makes addressing easier because you don't have to memorize odd numbers when climbing up onto a rig. extern uint16_t DMXGap;
extern uint16_t DMXStart; // start address of the first fixture extern uint16_t DMXStart;
#endif #endif
//internal global variable declarations
//wifi
extern bool apActive; extern bool apActive;
extern bool forceReconnect; extern bool forceReconnect;
extern uint32_t lastReconnectAttempt; extern uint32_t lastReconnectAttempt;
extern bool interfacesInited; extern bool interfacesInited;
extern bool wasConnected; extern bool wasConnected;
extern byte colOld[];
//color extern byte colT[];
extern byte colOld[]; //color before transition extern byte colIT[];
extern byte colT[]; //color that is currently displayed on the LEDs
extern byte colIT[]; //color that was last sent to LEDs
extern byte colSecT[]; extern byte colSecT[];
extern byte colSecOld[]; extern byte colSecOld[];
extern byte colSecIT[]; extern byte colSecIT[];
extern byte lastRandomIndex;
extern byte lastRandomIndex; //used to save last random color so the new one is not the same
//transitions
extern bool transitionActive; extern bool transitionActive;
extern uint16_t transitionDelayDefault; extern uint16_t transitionDelayDefault;
extern uint16_t transitionDelayTemp; extern uint16_t transitionDelayTemp;
extern unsigned long transitionStartTime; extern unsigned long transitionStartTime;
extern float tperLast; //crossfade transition progress, 0.0f - 1.0f extern float tperLast;
extern bool jsonTransitionOnce; extern bool jsonTransitionOnce;
//nightlight
extern bool nightlightActive; extern bool nightlightActive;
extern bool nightlightActiveOld; extern bool nightlightActiveOld;
extern uint32_t nightlightDelayMs; extern uint32_t nightlightDelayMs;
extern uint8_t nightlightDelayMinsDefault; extern uint8_t nightlightDelayMinsDefault;
extern unsigned long nightlightStartTime; extern unsigned long nightlightStartTime;
extern byte briNlT; //current nightlight brightness extern byte briNlT;
extern byte colNlT[]; //current nightlight color extern byte colNlT[];
extern unsigned long lastOnTime; extern unsigned long lastOnTime;
extern bool offMode; extern bool offMode;
extern byte bri; extern byte bri;
extern byte briOld; extern byte briOld;
extern byte briT; extern byte briT;
extern byte briIT; extern byte briIT;
extern byte briLast; //brightness before turned off. Used for toggle function extern byte briLast;
extern byte whiteLast; //white channel before turned off. Used for toggle function extern byte whiteLast;
extern bool buttonPressedBefore; extern bool buttonPressedBefore;
extern bool buttonLongPressed; extern bool buttonLongPressed;
extern unsigned long buttonPressedTime; extern unsigned long buttonPressedTime;
extern unsigned long buttonWaitTime; extern unsigned long buttonWaitTime;
extern bool notifyDirectDefault; extern bool notifyDirectDefault;
extern bool receiveNotifications; extern bool receiveNotifications;
extern unsigned long notificationSentTime; extern unsigned long notificationSentTime;
extern byte notificationSentCallMode; extern byte notificationSentCallMode;
extern bool notificationTwoRequired; extern bool notificationTwoRequired;
extern byte effectCurrent; extern byte effectCurrent;
extern byte effectSpeed; extern byte effectSpeed;
extern byte effectIntensity; extern byte effectIntensity;
extern byte effectPalette; extern byte effectPalette;
extern bool udpConnected, udpRgbConnected; extern bool udpConnected, udpRgbConnected;
extern bool showWelcomePage; extern bool showWelcomePage;
extern byte hueError; extern byte hueError;
//uint16_t hueFailCount;
extern float hueXLast, hueYLast; extern float hueXLast, hueYLast;
extern uint16_t hueHueLast, hueCtLast; extern uint16_t hueHueLast, hueCtLast;
extern byte hueSatLast, hueBriLast; extern byte hueSatLast, hueBriLast;
@ -342,31 +286,20 @@ extern unsigned long hueLastRequestSent;
extern bool hueAuthRequired; extern bool hueAuthRequired;
extern bool hueReceived; extern bool hueReceived;
extern bool hueStoreAllowed, hueNewKey; extern bool hueStoreAllowed, hueNewKey;
extern byte overlayCurrent; extern byte overlayCurrent;
extern byte overlaySpeed; extern byte overlaySpeed;
extern unsigned long overlayRefreshMs; extern unsigned long overlayRefreshMs;
extern unsigned long overlayRefreshedTime; extern unsigned long overlayRefreshedTime;
extern byte dP[]; extern byte dP[];
extern bool cronixieInit; extern bool cronixieInit;
//countdown
extern unsigned long countdownTime; extern unsigned long countdownTime;
extern bool countdownOverTriggered; extern bool countdownOverTriggered;
//timer
extern byte lastTimerMinute; extern byte lastTimerMinute;
extern byte timerHours[]; extern byte timerHours[];
extern byte timerMinutes[]; extern byte timerMinutes[];
extern byte timerMacro[]; extern byte timerMacro[];
extern byte timerWeekday[]; //weekdays to activate on extern byte timerWeekday[];
//bit pattern of arr elem: 0b11111111: sun,sat,fri,thu,wed,tue,mon,validity
//blynk
extern bool blynkEnabled; extern bool blynkEnabled;
//preset cycling
extern bool presetCyclingEnabled; extern bool presetCyclingEnabled;
extern byte presetCycleMin, presetCycleMax; extern byte presetCycleMin, presetCycleMax;
extern uint16_t presetCycleTime; extern uint16_t presetCycleTime;
@ -374,36 +307,24 @@ extern unsigned long presetCycledTime;
extern byte presetCycCurr; extern byte presetCycCurr;
extern bool presetApplyBri; extern bool presetApplyBri;
extern bool saveCurrPresetCycConf; extern bool saveCurrPresetCycConf;
//realtime
extern byte realtimeMode; extern byte realtimeMode;
extern IPAddress realtimeIP; extern IPAddress realtimeIP;
extern unsigned long realtimeTimeout; extern unsigned long realtimeTimeout;
//mqtt
extern long lastMqttReconnectAttempt; extern long lastMqttReconnectAttempt;
extern long lastInterfaceUpdate; extern long lastInterfaceUpdate;
extern byte interfaceUpdateCallMode; extern byte interfaceUpdateCallMode;
extern char mqttStatusTopic[40]; //this must be global because of async handlers extern char mqttStatusTopic[40];
#if AUXPIN >= 0 #if AUXPIN >= 0
//auxiliary debug pin
extern byte auxTime; extern byte auxTime;
extern unsigned long auxStartTime; extern unsigned long auxStartTime;
extern bool auxActive; extern bool auxActive;
#endif #endif
//alexa udp
extern String escapedMac; extern String escapedMac;
#ifndef WLED_DISABLE_ALEXA #ifndef WLED_DISABLE_ALEXA
extern Espalexa espalexa; extern Espalexa espalexa;
extern EspalexaDevice *espalexaDevice; extern EspalexaDevice *espalexaDevice;
#endif #endif
//dns server
extern DNSServer dnsServer; extern DNSServer dnsServer;
//network time
extern bool ntpConnected; extern bool ntpConnected;
extern time_t local; extern time_t local;
extern unsigned long ntpLastSyncTime; extern unsigned long ntpLastSyncTime;
@ -411,51 +332,35 @@ extern unsigned long ntpPacketSentTime;
extern IPAddress ntpServerIP; extern IPAddress ntpServerIP;
extern uint16_t ntpLocalPort; extern uint16_t ntpLocalPort;
#define NTP_PACKET_SIZE 48 #define NTP_PACKET_SIZE 48
//maximum number of LEDs - MAX_LEDS is coming from the JSON response getting too big, MAX_LEDS_DMA will become a timing issue
#define MAX_LEDS 1500 #define MAX_LEDS 1500
#define MAX_LEDS_DMA 500 #define MAX_LEDS_DMA 500
//string temp buffer (now stored in stack locally)
#define OMAX 2048 #define OMAX 2048
extern char *obuf; extern char *obuf;
extern uint16_t olen; extern uint16_t olen;
//presets
extern uint16_t savedPresets; extern uint16_t savedPresets;
extern int8_t currentPreset; extern int8_t currentPreset;
extern bool isPreset; extern bool isPreset;
extern byte errorFlag; extern byte errorFlag;
extern String messageHead, messageSub; extern String messageHead, messageSub;
extern byte optionType; extern byte optionType;
extern bool doReboot;
extern bool doReboot; //flag to initiate reboot from async handlers
extern bool doPublishMqtt; extern bool doPublishMqtt;
//server library objects
extern AsyncWebServer server; extern AsyncWebServer server;
extern AsyncClient *hueClient; extern AsyncClient *hueClient;
extern AsyncMqttClient *mqtt; extern AsyncMqttClient *mqtt;
extern WiFiUDP notifierUdp, rgbUdp;
extern WiFiUDP ntpUdp;
extern ESPAsyncE131 e131;
extern bool e131NewData;
extern WS2812FX strip;
//function prototypes // Function prototypes
extern void colorFromUint32(uint32_t, bool); extern void colorFromUint32(uint32_t, bool);
extern void serveMessage(AsyncWebServerRequest *, uint16_t, String, String, byte); extern void serveMessage(AsyncWebServerRequest *, uint16_t, String, String, byte);
extern void handleE131Packet(e131_packet_t *, IPAddress); extern void handleE131Packet(e131_packet_t *, IPAddress);
extern void arlsLock(uint32_t, byte); extern void arlsLock(uint32_t, byte);
extern void handleOverlayDraw(); extern void handleOverlayDraw();
//udp interface objects
extern WiFiUDP notifierUdp, rgbUdp;
extern WiFiUDP ntpUdp;
extern ESPAsyncE131 e131;
extern bool e131NewData;
//led fx library object
extern WS2812FX strip;
#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)
@ -474,11 +379,9 @@ extern int loops;
#define DEBUG_PRINTF(x) #define DEBUG_PRINTF(x)
#endif #endif
// append new c string to temp buffer efficiently
// TODO: Inline?
//append new c string to temp buffer efficiently
bool oappend(const char *txt); bool oappend(const char *txt);
//append new number to temp buffer efficiently // append new number to temp buffer efficiently
bool oappendi(int i); bool oappendi(int i);
int getSignalQuality(int rssi); int getSignalQuality(int rssi);