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