summaryrefslogtreecommitdiff
path: root/components/screen
diff options
context:
space:
mode:
authorMaël Gassmann <mael.gassmann@students.bfh.ch>2024-09-28 18:05:02 +0200
committerMaël Gassmann <mael.gassmann@students.bfh.ch>2024-09-28 18:06:43 +0200
commit129a2650c22915bc789b6bdbc9d360bd97059e2f (patch)
tree2cc012bc5ec48ab2596a5c9f1366b71df3484a3e /components/screen
parent6ebf9d86d095604b9357abc8da1a1a6673856fa8 (diff)
[+] WiFi with dpp on first setup + SNTP
Diffstat (limited to 'components/screen')
-rw-r--r--components/screen/screen.c7
1 files changed, 5 insertions, 2 deletions
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