Refactoring for stability, etc. Add new animation.

This commit is contained in:
2023-08-27 01:24:01 +02:00
parent dccfbf758e
commit 078fa74afb
17 changed files with 1845 additions and 932 deletions

View File

@@ -18,15 +18,19 @@ typedef struct
int nightmode_end_min;
} NightModeTimes_st;
typedef enum
typedef enum
{
ST_CLOCK,
ST_DICLOCK,
ST_SPIRAL,
ST_TETRIS,
ST_SNAKE,
ST_PINGPONG
} clock_state_en;
ST_PINGPONG,
ST_HEARTS,
NUM_STATES
} ClockState_en;
#define CURRENT_TIME_MS (system_get_time() / 1000) // use ESP time interface
int EEPROM_read_address(int address);
String leading_zero2digit(int value);
@@ -38,7 +42,7 @@ void handle_current_state(void);
void handle_data_request(void);
void handle_led_direct(void);
void load_main_color(void);
void ntp_time_update(void);
void ntp_time_update(unsigned long *last_ntp_update);
void on_state_entry(uint8_t state);
void send_heartbeat(void);
void set_main_color(uint8_t red, uint8_t green, uint8_t blue);