mirror of
https://github.com/arendst/Tasmota.git
synced 2025-08-02 15:37:42 +00:00
Merge pull request #5202 from jrw77/development
Correct rounding for ws2812 clock mode shifting hour when pixel<60
This commit is contained in:
commit
3ce36defe2
@ -170,7 +170,7 @@ void Ws2812Clock(void)
|
|||||||
|
|
||||||
Ws2812UpdateHand((RtcTime.second * 1000) / clksize, WS_SECOND);
|
Ws2812UpdateHand((RtcTime.second * 1000) / clksize, WS_SECOND);
|
||||||
Ws2812UpdateHand((RtcTime.minute * 1000) / clksize, WS_MINUTE);
|
Ws2812UpdateHand((RtcTime.minute * 1000) / clksize, WS_MINUTE);
|
||||||
Ws2812UpdateHand(((RtcTime.hour % 12) * (5000 / clksize)) + ((RtcTime.minute * 1000) / (12 * clksize)), WS_HOUR);
|
Ws2812UpdateHand((((RtcTime.hour % 12) * 5000) + ((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]) {
|
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++) {
|
for (uint8_t i = 0; i < 12; i++) {
|
||||||
Ws2812UpdateHand((i * 5000) / clksize, WS_MARKER);
|
Ws2812UpdateHand((i * 5000) / clksize, WS_MARKER);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user