Change source characters to icons and only display once

This commit is contained in:
Tony Corbett 2016-05-11 13:22:28 +01:00
parent 2b6d7cd20b
commit a0d27d9461

View file

@ -113,7 +113,8 @@ unsigned char vChar[8] =
0b11111
};
unsigned char rfChar[8] =
// Text-based custom character for RF traffic
/* unsigned char rfChar[8] =
{
0b11100,
0b10100,
@ -123,9 +124,23 @@ unsigned char rfChar[8] =
0b00100,
0b00110,
0b00100
}; */
// Icon-based custom character for RF traffic
unsigned char rfChar[8] =
{
0b11111,
0b10101,
0b01110,
0b00100,
0b00100,
0b00100,
0b00000,
0b00000
};
unsigned char ipChar[8] =
// Text-based custom character for network traffic
/* unsigned char ipChar[8] =
{
0b01000,
0b01000,
@ -135,6 +150,19 @@ unsigned char ipChar[8] =
0b00101,
0b00110,
0b00100
}; */
// Icon-based custom character for network traffic
unsigned char ipChar[8] =
{
0b01110,
0b10001,
0b00100,
0b01010,
0b00000,
0b00100,
0b00000,
0b00000
};
unsigned char tgChar[8] =
@ -511,6 +539,7 @@ void CHD44780::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
adafruitLCDColour(AC_RED);
#endif
// 2 x 16
if (m_rows == 2U && m_cols == 16U) {
char buffer[16U];
if (m_duplex) {
@ -526,8 +555,7 @@ void CHD44780::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
} else {
::lcdPosition(m_fd, 0, 0);
::lcdPutchar(m_fd, 0);
::sprintf(buffer, " %s", src.c_str());
::lcdPrintf(m_fd, "%-14s", buffer);
::lcdPrintf(m_fd, " %-13s", src.c_str());
::lcdPutchar(m_fd, strcmp(type, "R") == 0 ? 5 : 6);
::lcdPosition(m_fd, 0, 1);
@ -536,15 +564,12 @@ void CHD44780::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
if (group) {
::lcdPutchar(m_fd, 7);
// ::sprintf(buffer, "%s", dst.c_str());
::lcdPrintf(m_fd, "%-12s", dst.c_str());
::lcdPutchar(m_fd, strcmp(type, "R") == 0 ? 5 : 6);
} else {
// ::sprintf(buffer, "%s", dst.c_str());
::lcdPrintf(m_fd, "%-13s", dst.c_str());
::lcdPutchar(m_fd, strcmp(type, "R") == 0 ? 5 : 6);
}
}
// 4 x 16
} else if (m_rows == 4U && m_cols == 16U) {
char buffer[16U];
if (slotNo == 1U) {
@ -556,6 +581,7 @@ void CHD44780::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
::lcdPosition(m_fd, 0, 2);
::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer);
}
// 4 x 20
} else if (m_rows == 4U && m_cols == 20U) {
char buffer[20U];
if (slotNo == 1U) {
@ -567,6 +593,7 @@ void CHD44780::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
::lcdPosition(m_fd, 0, 2);
::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer);
}
// 2 x 40
} else if (m_rows == 2U && m_cols == 40U) {
char buffer[40U];
if (slotNo == 1U) {