mirror of
https://github.com/arendst/Tasmota.git
synced 2025-08-03 07:57:43 +00:00
Changed ws2812 clock to local time instead of UTC
This commit is contained in:
parent
9dc445f949
commit
c05e42f563
@ -170,7 +170,8 @@ void Ws2812Clock(void)
|
||||
|
||||
Ws2812UpdateHand((RtcTime.second * 1000) / clksize, WS_SECOND);
|
||||
Ws2812UpdateHand((RtcTime.minute * 1000) / clksize, WS_MINUTE);
|
||||
Ws2812UpdateHand(((RtcTime.hour % 12) * (5000 / clksize)) + ((RtcTime.minute * 1000) / (12 * clksize)), WS_HOUR);
|
||||
uint32_t local_hour = (LocalTime()/3600)%12; // RtcTime.hour is UTC timezone, not local.
|
||||
Ws2812UpdateHand(((local_hour % 12) * (5000 / clksize)) + ((RtcTime.minute * 1000) / (12 * clksize)), WS_HOUR);
|
||||
if (Settings.ws_color[WS_MARKER][WS_RED] + Settings.ws_color[WS_MARKER][WS_GREEN] + Settings.ws_color[WS_MARKER][WS_BLUE]) {
|
||||
for (uint8_t i = 0; i < 12; i++) {
|
||||
Ws2812UpdateHand((i * 5000) / clksize, WS_MARKER);
|
||||
|
Loading…
x
Reference in New Issue
Block a user