Skip to content

Commit

Permalink
Stop WaitForText() check if there is no net change (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
vintagepc authored Nov 25, 2020
1 parent 55d89d1 commit f81536e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions parts/components/HD44780.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,11 @@ uint32_t HD44780::OnDataReady()
{
int iPos =m_uiCursor - m_lineOffsets.at(i);
std::string &line = m_vLines[i];
line[iPos] = m_uiDataPins;
m_uiLineChg |= 1U<<i;
if (line[iPos] != m_uiDataPins) // Only if the contents change!
{
line[iPos] = m_uiDataPins;
m_uiLineChg |= 1U<<i;
}
}
}
TRACE(printf("hd44780_write_data %02x (%c) to %02x\n", m_uiDataPins, m_uiDataPins, m_uiCursor));
Expand Down

0 comments on commit f81536e

Please sign in to comment.