Fix centering of 8 character of times on HD44780

This commit is contained in:
Tony Corbett G0WFV 2016-06-24 16:58:01 +01:00
parent da53f06197
commit 06af87f029

View file

@ -726,8 +726,8 @@ void CHD44780::clockInt(unsigned int ms)
::lcdPosition(m_fd, m_cols - 10, 1);
::lcdPrintf(m_fd, "%s%.*s", strlen(m_buffer1) > 8 ? "" : " ", 10, m_buffer1);
} else {
::lcdPosition(m_fd, (m_cols - strlen(m_buffer1) > 8 ? 10 : 8) / 2, m_rows == 2 ? 1 : 2);
::lcdPrintf(m_fd, "%.*s", strlen(m_buffer1) > 8 ? 10 : 8, m_buffer1);
::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) {