From 6f5e71164ae2174b47354c489b0ef0dda9fd66bd Mon Sep 17 00:00:00 2001 From: Travis J Dean Date: Wed, 25 Mar 2020 05:14:23 -0400 Subject: [PATCH] Further fixing of includes. --- wled00/wled.h | 2 +- wled00/wled_alexa.cpp | 4 +++- wled00/wled_button.cpp | 6 +++++- wled00/wled_eeprom.cpp | 6 +++--- wled00/wled_hue.cpp | 2 ++ wled00/wled_hue.h | 6 ++++++ wled00/wled_json.cpp | 2 ++ wled00/wled_json.h | 6 ++++++ wled00/wled_led.cpp | 5 +++++ wled00/wled_mqtt.cpp | 2 ++ wled00/wled_notify.cpp | 5 +++-- wled00/wled_notify.h | 2 +- 12 files changed, 39 insertions(+), 9 deletions(-) diff --git a/wled00/wled.h b/wled00/wled.h index 8ef30cbf..c04dfa87 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -514,7 +514,7 @@ public: wledInit(); } -private: +public: // TODO: privacy void wledInit(); void beginStrip(); diff --git a/wled00/wled_alexa.cpp b/wled00/wled_alexa.cpp index ce63a019..1eb33e71 100644 --- a/wled00/wled_alexa.cpp +++ b/wled00/wled_alexa.cpp @@ -1,7 +1,9 @@ #include "wled_alexa.h" #include "wled.h" -#include "src/dependencies/espalexa/EspalexaDevice.h" #include "const.h" +#include "wled_led.h" +#include "wled_eeprom.h" +#include "wled_colors.h" #ifndef WLED_DISABLE_ALEXA void onAlexaChange(EspalexaDevice* dev); diff --git a/wled00/wled_button.cpp b/wled00/wled_button.cpp index 12fe5b49..3825cc84 100644 --- a/wled00/wled_button.cpp +++ b/wled00/wled_button.cpp @@ -1,5 +1,9 @@ #include "wled_button.h" #include "wled.h" +#include "wled_led.h" +#include "wled_eeprom.h" +#include "wled_set.h" + /* * Physical IO */ @@ -46,7 +50,7 @@ void handleButton() if (dur > 6000) //long press { - initAP(true); + WLED::instance().initAP(true); } else if (!buttonLongPressed) { //short press if (macroDoublePress) diff --git a/wled00/wled_eeprom.cpp b/wled00/wled_eeprom.cpp index 1e2b0e62..04b86289 100644 --- a/wled00/wled_eeprom.cpp +++ b/wled00/wled_eeprom.cpp @@ -592,7 +592,7 @@ void savedToPresets() } } -bool applyPreset(byte index, bool loadBri = true) +bool applyPreset(byte index, bool loadBri) { if (index == 255 || index == 0) { @@ -630,7 +630,7 @@ bool applyPreset(byte index, bool loadBri = true) return true; } -void savePreset(byte index, bool persist = true) +void savePreset(byte index, bool persist) { if (index > 16) return; if (index < 1) {saveSettingsToEEPROM();return;} @@ -698,7 +698,7 @@ void applyMacro(byte index) } -void saveMacro(byte index, String mc, bool persist = true) //only commit on single save, not in settings +void saveMacro(byte index, String mc, bool persist) //only commit on single save, not in settings { index-=1; if (index > 15) return; diff --git a/wled00/wled_hue.cpp b/wled00/wled_hue.cpp index 082685d7..abdb4ffa 100644 --- a/wled00/wled_hue.cpp +++ b/wled00/wled_hue.cpp @@ -1,5 +1,7 @@ #include "wled_hue.h" #include "wled.h" +#include "wled_colors.h" +#include "wled_eeprom.h" #ifndef WLED_DISABLE_HUESYNC diff --git a/wled00/wled_hue.h b/wled00/wled_hue.h index dcf39729..e9aa22b2 100644 --- a/wled00/wled_hue.h +++ b/wled00/wled_hue.h @@ -3,8 +3,14 @@ /* * Sync to Philips hue lights */ +#include +#include void handleHue(); void reconnectHue(); +void onHueError(void* arg, AsyncClient* client, int8_t error); +void onHueConnect(void* arg, AsyncClient* client); +void sendHuePoll(); +void onHueData(void* arg, AsyncClient* client, void *data, size_t len); #endif //WLED_HUE_H \ No newline at end of file diff --git a/wled00/wled_json.cpp b/wled00/wled_json.cpp index 43d3136d..17359462 100644 --- a/wled00/wled_json.cpp +++ b/wled00/wled_json.cpp @@ -1,5 +1,7 @@ #include "wled_json.h" #include "wled.h" +#include "wled_eeprom.h" +#include "wled_led.h" void deserializeSegment(JsonObject elem, byte it) { diff --git a/wled00/wled_json.h b/wled00/wled_json.h index 83830faf..a7c2473a 100644 --- a/wled00/wled_json.h +++ b/wled00/wled_json.h @@ -3,6 +3,12 @@ /* * JSON API (De)serialization */ +#include +#include "ESPAsyncWebServer.h" +#include "src/dependencies/json/ArduinoJson-v6.h" +#include "src/dependencies/json/AsyncJson-v6.h" +#include "fx.h" +// TODO: AsynicWebServerRequest conflict? void deserializeSegment(JsonObject elem, byte it); bool deserializeState(JsonObject root); diff --git a/wled00/wled_led.cpp b/wled00/wled_led.cpp index aefb004a..bd657a53 100644 --- a/wled00/wled_led.cpp +++ b/wled00/wled_led.cpp @@ -1,5 +1,10 @@ #include "wled_led.h" #include "wled.h" +#include "wled_notify.h" +#include "wled_blynk.h" +#include "wled_eeprom.h" +#include "wled_mqtt.h" +#include "wled_colors.h" void setValuesFromMainSeg() { diff --git a/wled00/wled_mqtt.cpp b/wled00/wled_mqtt.cpp index d4fc80c0..ce69513b 100644 --- a/wled00/wled_mqtt.cpp +++ b/wled00/wled_mqtt.cpp @@ -1,5 +1,7 @@ #include "wled_mqtt.h" #include "wled.h" +#include "wled_notify.h" +#include "wled_led.h" #ifdef WLED_ENABLE_MQTT #define MQTT_KEEP_ALIVE_TIME 60 // contact the MQTT broker every 60 seconds diff --git a/wled00/wled_notify.cpp b/wled00/wled_notify.cpp index 7827aba9..7913b452 100644 --- a/wled00/wled_notify.cpp +++ b/wled00/wled_notify.cpp @@ -1,12 +1,13 @@ #include "wled_notify.h" #include "wled.h" #include "src/dependencies/e131/ESPAsyncE131.h" +#include "wled_led.h" #define WLEDPACKETSIZE 29 #define UDP_IN_MAXSIZE 1472 -void notify(byte callMode, bool followUp=false) +void notify(byte callMode, bool followUp) { if (!udpConnected) return; switch (callMode) @@ -71,7 +72,7 @@ void notify(byte callMode, bool followUp=false) } -void arlsLock(uint32_t timeoutMs, byte md = REALTIME_MODE_GENERIC) +void arlsLock(uint32_t timeoutMs, byte md) { if (!realtimeMode){ for (uint16_t i = 0; i < ledCount; i++) diff --git a/wled00/wled_notify.h b/wled00/wled_notify.h index 63d01142..2a2865b3 100644 --- a/wled00/wled_notify.h +++ b/wled00/wled_notify.h @@ -5,7 +5,7 @@ /* * UDP notifier */ -union e131_packet_t; // Will this compile? +//union e131_packet_t; // Will this compile? class IPAddress; void notify(byte callMode, bool followUp=false);