From 2457d6ee51e73f1659b1e30f911a0c592c74d6be Mon Sep 17 00:00:00 2001 From: Fisch Date: Fri, 5 Mar 2021 20:11:19 +0100 Subject: [PATCH] more efficient display update --- src/main.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index ed57062..bc07059 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,7 +28,9 @@ uint8_t display_data[] = { 0xff, 0xff, 0xff, 0xff }; uint8_t display_blank[] = { 0x00, 0x00, 0x00, 0x00 }; unsigned long last_displayupdate=0; -#define DISPLAYUPDATEINTERVAL 100 +#define DISPLAYUPDATEINTERVAL 100 //maximum time to update display +#define DISPLAYUPDATEINTERVAL_MIN 10 //minimum display update time +bool update_display=true; #include "HX711.h" @@ -162,6 +164,7 @@ void loopHandler() { if (spread