|
|
@ -53,6 +53,7 @@ CUserInterface::~CUserInterface (void) |
|
|
|
bool CUserInterface::Initialize (void) |
|
|
|
bool CUserInterface::Initialize (void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
assert (m_pConfig); |
|
|
|
assert (m_pConfig); |
|
|
|
|
|
|
|
nLastLCDUpdateTime = 0; |
|
|
|
|
|
|
|
|
|
|
|
if (m_pConfig->GetLCDEnabled ()) |
|
|
|
if (m_pConfig->GetLCDEnabled ()) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -152,7 +153,7 @@ bool CUserInterface::Initialize (void) |
|
|
|
} |
|
|
|
} |
|
|
|
assert (m_pLCD); |
|
|
|
assert (m_pLCD); |
|
|
|
|
|
|
|
|
|
|
|
m_pLCDBuffered = new CWriteBufferDevice (m_pLCD); |
|
|
|
m_pLCDBuffered = new CWriteBufferDevice (m_pLCD, 256); |
|
|
|
assert (m_pLCDBuffered); |
|
|
|
assert (m_pLCDBuffered); |
|
|
|
|
|
|
|
|
|
|
|
LCDWrite ("\x1B[?25l\x1B""d+"); // cursor off, autopage mode
|
|
|
|
LCDWrite ("\x1B[?25l\x1B""d+"); // cursor off, autopage mode
|
|
|
@ -202,10 +203,17 @@ bool CUserInterface::Initialize (void) |
|
|
|
|
|
|
|
|
|
|
|
void CUserInterface::Process (void) |
|
|
|
void CUserInterface::Process (void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (m_pLCDBuffered) |
|
|
|
// Limit display updates to avoid glitches on sigle core RPis
|
|
|
|
|
|
|
|
unsigned nReadTime = CTimer::GetClockTicks (); |
|
|
|
|
|
|
|
if (nReadTime - nLastLCDUpdateTime > 50000) |
|
|
|
{ |
|
|
|
{ |
|
|
|
m_pLCDBuffered->Update (); |
|
|
|
if (m_pLCDBuffered) |
|
|
|
} |
|
|
|
{ |
|
|
|
|
|
|
|
// Limit updates to 16 bytes to avoid glitches on sigle core RPis
|
|
|
|
|
|
|
|
m_pLCDBuffered->Update (16); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
nLastLCDUpdateTime = nReadTime; |
|
|
|
|
|
|
|
} |
|
|
|
if (m_pUIButtons) |
|
|
|
if (m_pUIButtons) |
|
|
|
{ |
|
|
|
{ |
|
|
|
m_pUIButtons->Update(); |
|
|
|
m_pUIButtons->Update(); |
|
|
|