mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-26 20:56:37 +00:00
Add HASP_USE_CUSTOM
This commit is contained in:
parent
4ab180be26
commit
a2ab8cfc2c
@ -313,6 +313,10 @@ void debug_get_tag(uint8_t tag, char* buffer)
|
||||
memcpy_P(buffer, PSTR("FONT"), 5);
|
||||
break;
|
||||
|
||||
case TAG_CUSTOM:
|
||||
memcpy_P(buffer, PSTR("CUST"), 5);
|
||||
break;
|
||||
|
||||
default:
|
||||
memcpy_P(buffer, PSTR("----"), 5);
|
||||
break;
|
||||
|
@ -191,7 +191,9 @@ enum {
|
||||
|
||||
TAG_LVGL = 90,
|
||||
TAG_LVFS = 91,
|
||||
TAG_FONT = 92
|
||||
TAG_FONT = 92,
|
||||
|
||||
TAG_CUSTOM = 99
|
||||
};
|
||||
|
||||
//#define TERM_COLOR_Black "\u001b[30m"
|
||||
|
@ -20,6 +20,10 @@
|
||||
#include "hasp_gui.h"
|
||||
#endif
|
||||
|
||||
#if HASP_USE_CUSTOM > 0
|
||||
#include "custom/my_custom.h"
|
||||
#endif
|
||||
|
||||
bool isConnected;
|
||||
uint8_t mainLoopCounter = 0;
|
||||
unsigned long mainLastLoopTime = 0;
|
||||
@ -106,6 +110,10 @@ void setup()
|
||||
slaveSetup();
|
||||
#endif
|
||||
|
||||
#if HASP_USE_CUSTOM > 0
|
||||
custom_setup();
|
||||
#endif
|
||||
|
||||
mainLastLoopTime = -1000; // reset loop counter
|
||||
delay(20);
|
||||
// guiStart();
|
||||
@ -137,6 +145,10 @@ IRAM_ATTR void loop()
|
||||
consoleLoop();
|
||||
#endif
|
||||
|
||||
#if HASP_USE_CUSTOM > 0
|
||||
custom_loop();
|
||||
#endif
|
||||
|
||||
#ifdef HASP_USE_STAT_COUNTER
|
||||
statLoopCounter++; // measures the average looptime
|
||||
#endif
|
||||
@ -152,6 +164,9 @@ IRAM_ATTR void loop()
|
||||
telnetEverySecond();
|
||||
#endif
|
||||
|
||||
#if HASP_USE_CUSTOM > 0
|
||||
custom_every_second();
|
||||
#endif
|
||||
// debugEverySecond();
|
||||
|
||||
switch(++mainLoopCounter) {
|
||||
@ -161,7 +176,7 @@ IRAM_ATTR void loop()
|
||||
|
||||
case 2:
|
||||
#if HASP_USE_HTTP_ASYNC > 0
|
||||
httpEvery5Seconds();
|
||||
httpEvery5Seconds();
|
||||
#endif
|
||||
break;
|
||||
|
||||
@ -169,6 +184,10 @@ IRAM_ATTR void loop()
|
||||
#if HASP_USE_GPIO > 0
|
||||
// gpioEvery5Seconds();
|
||||
#endif
|
||||
|
||||
#if HASP_USE_CUSTOM > 0
|
||||
custom_every_5seconds();
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 4:
|
||||
|
Loading…
x
Reference in New Issue
Block a user