mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-20 22:45:44 +08:00
Add forgotten DMR on top line of LCDs
This commit is contained in:
26
HD44780.cpp
26
HD44780.cpp
@@ -493,6 +493,13 @@ void CHD44780::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
||||
}
|
||||
} else {
|
||||
m_dmrScrollTimer2.stop();
|
||||
|
||||
if (m_rows > 2U) {
|
||||
::lcdPosition(m_fd, 0, (m_rows / 2) - 2);
|
||||
::sprintf(m_buffer1, "%s", DEADSPACE);
|
||||
::lcdPrintf(m_fd, "%.*s", m_cols, m_buffer1);
|
||||
}
|
||||
|
||||
::lcdPosition(m_fd, 0, (m_rows / 2) - 1);
|
||||
::sprintf(m_buffer1, "%s%s", "DMR", DEADSPACE);
|
||||
::lcdPrintf(m_fd, "%.*s", m_cols, m_buffer1);
|
||||
@@ -506,6 +513,12 @@ void CHD44780::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
||||
#endif
|
||||
|
||||
if (m_duplex) {
|
||||
if (m_rows > 2U) {
|
||||
::lcdPosition(m_fd, 0, (m_rows / 2) - 2);
|
||||
::sprintf(m_buffer1, "%s%s", "DMR", DEADSPACE);
|
||||
::lcdPrintf(m_fd, "%.*s", m_cols, m_buffer1);
|
||||
}
|
||||
|
||||
if (slotNo == 1U) {
|
||||
::lcdPosition(m_fd, 0, (m_rows / 2) - 1);
|
||||
::lcdPuts(m_fd, "1 ");
|
||||
@@ -562,6 +575,12 @@ void CHD44780::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (m_rows > 2U) {
|
||||
::lcdPosition(m_fd, 0, (m_rows / 2) - 2);
|
||||
::sprintf(m_buffer1, "%s%s", "DMR", DEADSPACE);
|
||||
::lcdPrintf(m_fd, "%.*s", m_cols, m_buffer1);
|
||||
}
|
||||
|
||||
::lcdPosition(m_fd, 0, (m_rows / 2) - 1);
|
||||
::lcdPutchar(m_fd, 0);
|
||||
::sprintf(m_buffer2, " %s%s", src.c_str(), DEADSPACE);
|
||||
@@ -609,6 +628,13 @@ void CHD44780::clearDMRInt(unsigned int slotNo)
|
||||
}
|
||||
} else {
|
||||
m_dmrScrollTimer2.stop(); // Stop the scroll timer on slot 2
|
||||
|
||||
if (m_rows > 2U) {
|
||||
::lcdPosition(m_fd, 0, (m_rows / 2) - 2);
|
||||
::sprintf(m_buffer1, "%s", DEADSPACE);
|
||||
::lcdPrintf(m_fd, "%.*s", m_cols, m_buffer1);
|
||||
}
|
||||
|
||||
::lcdPosition(m_fd, 0, (m_rows / 2) - 1);
|
||||
::sprintf(m_buffer2, "%s%s", "DMR", DEADSPACE);
|
||||
::lcdPrintf(m_fd, "%.*s", m_cols, m_buffer2);
|
||||
|
||||
Reference in New Issue
Block a user