Merge pull request #121 from g0wfv/develop

Correct logic for date/time display
This commit is contained in:
Jonathan Naylor 2016-07-06 23:24:27 +01:00 committed by GitHub
commit da67a253e6

View file

@ -763,12 +763,10 @@ void CHD44780::clockInt(unsigned int ms)
} else {
::lcdPosition(m_fd, (m_cols - (strlen(m_buffer1) == 8 ? 8 : 10)) / 2, m_rows == 2 ? 1 : 2);
::lcdPrintf(m_fd, "%.*s", strlen(m_buffer1) == 8 ? 8 : 10, m_buffer1);
}
if (m_cols != 16U && m_rows != 2U) {
::lcdPosition(m_fd, (m_cols - strlen(m_buffer2)) / 2, m_rows == 2 ? 0 : 1);
::lcdPrintf(m_fd, "%s", m_buffer2);
}
m_clockDisplayTimer.start();
}