Initial
This commit is contained in:
51
include/wordclock_esp8266.h
Normal file
51
include/wordclock_esp8266.h
Normal file
@@ -0,0 +1,51 @@
|
||||
#ifndef WORDCLOCK_ESP8266_H
|
||||
#define WORDCLOCK_ESP8266_H
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <ESP8266WebServer.h>
|
||||
#include "ledmatrix.h"
|
||||
#include "udp_logger.h"
|
||||
|
||||
extern UDPLogger logger;
|
||||
extern LEDMatrix led_matrix;
|
||||
extern ESP8266WebServer webserver;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int nightmode_start_hour;
|
||||
int nightmode_start_min;
|
||||
int nightmode_end_hour;
|
||||
int nightmode_end_min;
|
||||
} NightModeTimes_st;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ST_CLOCK,
|
||||
ST_DICLOCK,
|
||||
ST_SPIRAL,
|
||||
ST_TETRIS,
|
||||
ST_SNAKE,
|
||||
ST_PINGPONG
|
||||
} clock_state_en;
|
||||
|
||||
int EEPROM_read_address(int address);
|
||||
String leading_zero2digit(int value);
|
||||
String split(String s, char parser, int index);
|
||||
void check_night_mode(void);
|
||||
void EEPROM_write_to_address(int address, int value);
|
||||
void handle_button(void);
|
||||
void handle_command(void);
|
||||
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 on_state_entry(uint8_t state);
|
||||
void send_heartbeat(void);
|
||||
void set_main_color(uint8_t red, uint8_t green, uint8_t blue);
|
||||
void set_night_mode(bool on);
|
||||
void state_change(uint8_t newState);
|
||||
void update_matrix(void);
|
||||
void update_state_machine(void);
|
||||
|
||||
#endif /* WORDCLOCK_ESP8266_H */
|
||||
Reference in New Issue
Block a user