feat: add OLED sleep settings and management to save the display from burn-in

This commit is contained in:
Paul Barrett committed 2026-03-29 12:34:32 +11:00
1 parent 87a0403735
commit 96a5e184dd
10 files changed
+159 -2

No files matched your search

+2
View File
@@ -127,6 +127,7 @@ void loop() {
{
lastButtonPress = currentMillis;
scaleTareRequest = true;
oledResetActivityTimer(); // Wake display on touch press
}
// Überprüfe regelmäßig die WLAN-Verbindung
@@ -139,6 +140,7 @@ void loop() {
if (intervalElapsed(currentMillis, lastTopRowUpdateTime, DISPLAY_UPDATE_INTERVAL))
{
oledShowTopRow();
oledCheckSleep(); // Put display to sleep if timeout elapsed
// Clean up dead websocket clients periodically instead of on connect
if(currentMillis % 10000 < 50) ws.cleanupClients();
}