From 5e78b645746480b22c7575601316dd2ebc55bb3d Mon Sep 17 00:00:00 2001 From: Drath Date: Thu, 23 Oct 2025 13:05:39 +0200 Subject: [PATCH] open and close p[ort on each display loop --- main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.cpp b/main.cpp index ec59ed5..22be7c0 100644 --- a/main.cpp +++ b/main.cpp @@ -99,6 +99,7 @@ void displayThread(std::stop_token st, Sensors* s) { lcd.setCustomChar(0, {16, 6, 9, 8, 8, 9, 6, 0}); // celcius lcd.setCustomChar(1, {0, 0, 4, 10, 10, 17, 31, 0}); // delta lcd.setCustomChar(2, {0, 8, 21, 21, 2, 0, 0, 0}); // home (tilde) + lcd._close(); while (!st.stop_requested()) { sem::display.acquire(); // holds the loop until sensor data is ready @@ -145,8 +146,10 @@ void displayThread(std::stop_token st, Sensors* s) { lcd.flushBuf(); } + lcd._open(); lcd.clear(); lcd.writeStr(2, 0, center("linuxSmartie closed", 40)); + lcd._close(); } int main(int argc, char* argv[]) {