From 129a2650c22915bc789b6bdbc9d360bd97059e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gassmann?= Date: Sat, 28 Sep 2024 18:05:02 +0200 Subject: [+] WiFi with dpp on first setup + SNTP --- components/screen/screen.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'components/screen') diff --git a/components/screen/screen.c b/components/screen/screen.c index c6de3c7..45f89f7 100644 --- a/components/screen/screen.c +++ b/components/screen/screen.c @@ -179,7 +179,10 @@ void test_screen(struct Screen* screen) void display(struct Screen* screen, char digits[4]) { for (uint8_t i = 0; i < 4; ++i) { - screen->nixies[i].digit = digits[i] - '0'; - set_digit(screen->mcp, &(screen->nixies[i])); // Call set_digit function + uint8_t digit = digits[i] - '0'; + if (screen->nixies[i].digit != digit){ + screen->nixies[i].digit = digit; + set_digit(screen->mcp, &(screen->nixies[i])); // Call set_digit function + } } } \ No newline at end of file -- cgit v1.2.3