Small fix for clock effect to work correctly with the new subpixel rendeing stuff.
This commit is contained in:
parent
3018bc6375
commit
62549e73bf
@ -30,11 +30,11 @@ void ClockEffect::loop(boolean invert, CRGB fg_color, CRGB bg_color) {
|
|||||||
}
|
}
|
||||||
int h = ntpClient.getHours();
|
int h = ntpClient.getHours();
|
||||||
//void drawChar(Font f, uint8_t x, uint8_t y, const char c, CRGB* color, bool mask=false);
|
//void drawChar(Font f, uint8_t x, uint8_t y, const char c, CRGB* color, bool mask=false);
|
||||||
window->drawChar(&font_numbers3x5, 0, 1, '0' + (h / 10), &fg_color, invert);
|
window->drawChar(&font_numbers3x5, 0<<8, 1<<8, '0' + (h / 10), &fg_color, invert);
|
||||||
window->drawChar(&font_numbers3x5, 4, 1, '0' + (h % 10), &fg_color, invert);
|
window->drawChar(&font_numbers3x5, 4<<8, 1<<8, '0' + (h % 10), &fg_color, invert);
|
||||||
int m = ntpClient.getMinutes();
|
int m = ntpClient.getMinutes();
|
||||||
window->drawChar(&font_numbers3x5, 9, 1, '0' + (m / 10), &fg_color, invert);
|
window->drawChar(&font_numbers3x5, 9<<8, 1<<8, '0' + (m / 10), &fg_color, invert);
|
||||||
window->drawChar(&font_numbers3x5, 13, 1, '0' + (m % 10), &fg_color, invert);
|
window->drawChar(&font_numbers3x5, 13<<8, 1<<8, '0' + (m % 10), &fg_color, invert);
|
||||||
if (ntpClient.getSeconds() & 1) {
|
if (ntpClient.getSeconds() & 1) {
|
||||||
window->setPixel(7, 2, &fg_color);
|
window->setPixel(7, 2, &fg_color);
|
||||||
window->setPixel(7, 4, &fg_color);
|
window->setPixel(7, 4, &fg_color);
|
||||||
|
Loading…
Reference in New Issue
Block a user