diff --git a/src/button.cpp b/src/button.cpp index 37ae91fe..086c3231 100644 --- a/src/button.cpp +++ b/src/button.cpp @@ -1,7 +1,6 @@ #ifdef HAS_BUTTON #include "globals.h" -#include "senddata.h" // Local logging tag static const char TAG[] = "main"; diff --git a/src/button.h b/src/button.h index 1900ac6d..9cb6e7b4 100644 --- a/src/button.h +++ b/src/button.h @@ -1,6 +1,8 @@ #ifndef _BUTTON_H #define _BUTTON_H +#include "senddata.h" + void IRAM_ATTR ButtonIRQ(void); void readButton(void); diff --git a/src/cyclic.cpp b/src/cyclic.cpp index 39ace8e5..5f7ca3dc 100644 --- a/src/cyclic.cpp +++ b/src/cyclic.cpp @@ -2,7 +2,7 @@ /* Interval can be set in paxcounter.conf (HOMECYCLE) */ // Basic config -#include "globals.h" +#include "cyclic.h" // Local logging tag static const char TAG[] = "main"; diff --git a/src/cyclic.h b/src/cyclic.h index 9aad61d4..d8ee73b2 100644 --- a/src/cyclic.h +++ b/src/cyclic.h @@ -1,9 +1,8 @@ #ifndef _CYCLIC_H #define _CYCLIC_H +#include "globals.h" #include "senddata.h" -#include "ota.h" -#include "led.h" void doHousekeeping(void); void IRAM_ATTR homeCycleIRQ(void); diff --git a/src/globals.h b/src/globals.h index 1f863dfe..38d9e4ee 100644 --- a/src/globals.h +++ b/src/globals.h @@ -61,7 +61,6 @@ extern TaskHandle_t stateMachineTask, wifiSwitchTask; #if (HAS_LED != NOT_A_PIN) || defined(HAS_RGB_LED) #include "led.h" -extern TaskHandle_t ledLoopTask; #endif #include "payload.h" diff --git a/src/led.h b/src/led.h index 68f5bd88..2631563c 100644 --- a/src/led.h +++ b/src/led.h @@ -31,6 +31,8 @@ struct RGBColor { enum led_states { LED_OFF, LED_ON }; +extern TaskHandle_t ledLoopTask; + // Exported Functions void rgb_set_color(uint16_t hue); void blink_LED(uint16_t set_color, uint16_t set_blinkduration); diff --git a/src/main.h b/src/main.h index 40e9c208..ff4ae180 100644 --- a/src/main.h +++ b/src/main.h @@ -6,7 +6,6 @@ #include // needed for timers #include "globals.h" -#include "led.h" #include "wifiscan.h" #include "configmanager.h" #include "cyclic.h" diff --git a/src/statemachine.h b/src/statemachine.h index ec9966a0..a2a87097 100644 --- a/src/statemachine.h +++ b/src/statemachine.h @@ -2,9 +2,6 @@ #define _STATEMACHINE_H #include "globals.h" -#include "led.h" -#include "wifiscan.h" -#include "senddata.h" #include "cyclic.h" void stateMachine(void *pvParameters);