From 7a75bcfc1f1bb91e2720674133d7e2ad44477a33 Mon Sep 17 00:00:00 2001 From: Javier Nonis Date: Mon, 10 Feb 2025 01:26:38 -0300 Subject: [PATCH] Revert "LCD Update performance fix to avoid glitches on single core RPis" This reverts commit 4d2d79c0f5cb548ba0a799b87ebbe7fbeea5ea3d. --- src/userinterface.cpp | 16 ++++------------ src/userinterface.h | 1 - 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/userinterface.cpp b/src/userinterface.cpp index 1c83877..ca45d8e 100644 --- a/src/userinterface.cpp +++ b/src/userinterface.cpp @@ -53,7 +53,6 @@ CUserInterface::~CUserInterface (void) bool CUserInterface::Initialize (void) { assert (m_pConfig); - nLastLCDUpdateTime = 0; if (m_pConfig->GetLCDEnabled ()) { @@ -153,7 +152,7 @@ bool CUserInterface::Initialize (void) } assert (m_pLCD); - m_pLCDBuffered = new CWriteBufferDevice (m_pLCD, 256); + m_pLCDBuffered = new CWriteBufferDevice (m_pLCD); assert (m_pLCDBuffered); LCDWrite ("\x1B[?25l\x1B""d+"); // cursor off, autopage mode @@ -203,17 +202,10 @@ bool CUserInterface::Initialize (void) void CUserInterface::Process (void) { - // Limit display updates to avoid glitches on sigle core RPis - unsigned nReadTime = CTimer::GetClockTicks (); - if (nReadTime - nLastLCDUpdateTime > 50000) + if (m_pLCDBuffered) { - if (m_pLCDBuffered) - { - // Limit updates to 16 bytes to avoid glitches on sigle core RPis - m_pLCDBuffered->Update (16); - } - nLastLCDUpdateTime = nReadTime; - } + m_pLCDBuffered->Update (); + } if (m_pUIButtons) { m_pUIButtons->Update(); diff --git a/src/userinterface.h b/src/userinterface.h index c69896d..8c5081c 100644 --- a/src/userinterface.h +++ b/src/userinterface.h @@ -89,7 +89,6 @@ private: bool m_bSwitchPressed; unsigned m_nRotaryEncoderLastReadTime; int m_nRotaryEncoderCounter=0; - unsigned nLastLCDUpdateTime; CUIMenu m_Menu; };