Rework TimeManager & NTP handling. Remove module ESP8266TimerInterrupt.

This commit is contained in:
2024-05-28 19:06:39 +02:00
parent 2e50dd0e3f
commit ff90c610ae
5 changed files with 252 additions and 293 deletions

View File

@@ -38,7 +38,7 @@
#define PERIOD_HEARTBEAT_US (1 * 1000 * 1000) // 1s
#define PERIOD_MATRIX_UPDATE_US (100 * 1000) // 100ms
#define PERIOD_NIGHTMODE_CHECK_US (20 * 1000 * 1000) // 20s
#define PERIOD_TIME_UPDATE_US (500 * 1000) // 500ms
#define PERIOD_TIME_UPDATE_US (1 * 1000 * 1000) // 1000ms
#define PERIOD_PONG_US (10 * 1000) // 10ms
#define PERIOD_SNAKE_US (50 * 1000) // 50ms
#define PERIOD_STATE_CHANGE_US (10 * 1000 * 1000) // 10s
@@ -69,11 +69,9 @@
#define MATRIX_HEIGHT (11)
// NTP macros
#define BUILD_YEAR (__DATE__ + 7) // Will expand to current year at compile time as string.
#define NTP_MININUM_RX_YEAR (atoi(BUILD_YEAR) - 1) // Will expand to current year minus one at compile time.
#define NTP_START_YEAR (1900) // NTP minimum year is 1900
#define NTP_UPDATE_PERIOD_S (6 * 3600) // 6h period between NTP updates
#define NTP_RETRY_DELAY_US (10 * 1000 * 1000) // 10s retry delay time between failed NTP requests
#define NTP_MAX_OFFLINE_TIME_S (7 * 24 * 3600) // Watchdog value, maxmimum offline time before a restart is triggered
#define BUILD_YEAR (__DATE__ + 7) // Will expand to current year at compile time as string.
#define NTP_MINIMUM_RX_YEAR (atoi(BUILD_YEAR) - 1) // Will expand to current year minus one at compile time.
#define NTP_START_YEAR (1900) // NTP minimum year is 1900
#define NTP_MAX_OFFLINE_TIME_S (7 * 24 * 3600) // Watchdog value, maximum offline time before a restart is triggered
#endif /* WORDCLOCK_CONSTANTS_H */