Change clearDMR function to explicit display sizes
This commit is contained in:
parent
c0be38a34e
commit
b32eb55083
31
HD44780.cpp
31
HD44780.cpp
|
@ -207,13 +207,40 @@ void CHD44780::writeDMR(unsigned int slotNo, const char* src, bool group, unsign
|
||||||
|
|
||||||
void CHD44780::clearDMR(unsigned int slotNo)
|
void CHD44780::clearDMR(unsigned int slotNo)
|
||||||
{
|
{
|
||||||
|
if (m_rows == 2U && m_cols == 16U) {
|
||||||
if (slotNo == 1U) {
|
if (slotNo == 1U) {
|
||||||
::lcdPosition(m_fd, 0, m_rows > 2U ? 1 : 0);
|
::lcdPosition(m_fd, 0, 0);
|
||||||
::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING);
|
::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING);
|
||||||
} else {
|
} else {
|
||||||
::lcdPosition(m_fd, 0, m_rows > 2U ? 2 : 1);
|
::lcdPosition(m_fd, 0, 0);
|
||||||
|
::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING);
|
||||||
|
|
||||||
|
::lcdPosition(m_fd, 0, 1);
|
||||||
::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING);
|
::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING);
|
||||||
}
|
}
|
||||||
|
} else if (m_rows == 4U && m_cols == 20U) {
|
||||||
|
if (slotNo == 1U) {
|
||||||
|
::lcdPosition(m_fd, 0, 1);
|
||||||
|
::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING);
|
||||||
|
} else {
|
||||||
|
::lcdPosition(m_fd, 0, 1);
|
||||||
|
::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING);
|
||||||
|
|
||||||
|
::lcdPosition(m_fd, 0, 2);
|
||||||
|
::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING);
|
||||||
|
}
|
||||||
|
} else if (m_rows == 2 && m_cols == 40U) {
|
||||||
|
if (slotNo == 1U) {
|
||||||
|
::lcdPosition(m_fd, 0, 0);
|
||||||
|
::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING);
|
||||||
|
} else {
|
||||||
|
::lcdPosition(m_fd, 0, 0);
|
||||||
|
::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING);
|
||||||
|
|
||||||
|
::lcdPosition(m_fd, 0, 1);
|
||||||
|
::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHD44780::writeFusion(const char* source, const char* dest)
|
void CHD44780::writeFusion(const char* source, const char* dest)
|
||||||
|
|
Loading…
Reference in a new issue