Code cleanup

This commit is contained in:
fvanroie 2020-05-22 20:30:50 +02:00
parent 8dc6b5cc68
commit 11309df661

View File

@ -21,15 +21,15 @@ void setup()
***************************/ ***************************/
/* Init Storage */ /* Init Storage */
#if HASP_USE_EEPROM>0 #if HASP_USE_EEPROM > 0
eepromSetup(); // Don't start at boot, only at write eepromSetup(); // Don't start at boot, only at write
#endif #endif
#if HASP_USE_SPIFFS>0 #if HASP_USE_SPIFFS > 0
spiffsSetup(); spiffsSetup();
#endif #endif
#if HASP_USE_SDCARD>0 #if HASP_USE_SDCARD > 0
sdcardSetup(); sdcardSetup();
#endif #endif
@ -42,24 +42,24 @@ void setup()
* Apply User Configuration * Apply User Configuration
***************************/ ***************************/
debugSetup(); debugSetup();
guiSetup();
#if HASP_USE_GPIO>0 #if HASP_USE_GPIO > 0
gpioSetup(); gpioSetup();
#endif #endif
#if HASP_USE_WIFI>0 #if HASP_USE_WIFI > 0
wifiSetup(); wifiSetup();
#endif #endif
guiSetup();
oobeSetup(); oobeSetup();
haspSetup(); haspSetup();
#if HASP_USE_MDNS>0 #if HASP_USE_MDNS > 0
mdnsSetup(); mdnsSetup();
#endif #endif
#if HASP_USE_OTA>0 #if HASP_USE_OTA > 0
otaSetup(); otaSetup();
#endif #endif
@ -67,11 +67,11 @@ void setup()
ethernetSetup(); ethernetSetup();
#endif #endif
#if HASP_USE_MQTT>0 #if HASP_USE_MQTT > 0
mqttSetup(); mqttSetup();
#endif #endif
#if HASP_USE_HTTP>0 #if HASP_USE_HTTP > 0
httpSetup(); httpSetup();
#endif #endif
@ -79,7 +79,7 @@ void setup()
telnetSetup(); telnetSetup();
#endif #endif
#if HASP_USE_TASMOTA_SLAVE>0 #if HASP_USE_TASMOTA_SLAVE > 0
slaveSetup(); slaveSetup();
#endif #endif
@ -112,7 +112,7 @@ void loop()
// haspLoop(); // haspLoop();
debugLoop(); debugLoop();
#if HASP_USE_GPIO>0 #if HASP_USE_GPIO > 0
gpioLoop(); gpioLoop();
#endif #endif
@ -121,19 +121,19 @@ void loop()
ethernetLoop(); ethernetLoop();
#endif #endif
#if HASP_USE_MQTT>0 #if HASP_USE_MQTT > 0
mqttLoop(); mqttLoop();
#endif // MQTT #endif // MQTT
#if HASP_USE_HTTP>0 #if HASP_USE_HTTP > 0
httpLoop(); httpLoop();
#endif // HTTP #endif // HTTP
#if HASP_USE_MDNS>0 #if HASP_USE_MDNS > 0
mdnsLoop(); mdnsLoop();
#endif // MDNS #endif // MDNS
#if HASP_USE_OTA>0 #if HASP_USE_OTA > 0
otaLoop(); otaLoop();
#endif // OTA #endif // OTA
@ -141,7 +141,7 @@ void loop()
telnetLoop(); telnetLoop();
#endif // TELNET #endif // TELNET
#if HASP_USE_TASMOTA_SLAVE>0 #if HASP_USE_TASMOTA_SLAVE > 0
slaveLoop(); slaveLoop();
#endif // TASMOTASLAVE #endif // TASMOTASLAVE
@ -150,7 +150,7 @@ void loop()
/* Timer Loop */ /* Timer Loop */
if(millis() - mainLastLoopTime >= 1000) { if(millis() - mainLastLoopTime >= 1000) {
/* Run Every Second */ /* Run Every Second */
#if HASP_USE_OTA>0 #if HASP_USE_OTA > 0
otaEverySecond(); otaEverySecond();
#endif #endif
debugEverySecond(); debugEverySecond();