mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-22 08:05:49 +08:00
Change source characters to icons and only display once
This commit is contained in:
43
HD44780.cpp
43
HD44780.cpp
@@ -113,7 +113,8 @@ unsigned char vChar[8] =
|
|||||||
0b11111
|
0b11111
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned char rfChar[8] =
|
// Text-based custom character for RF traffic
|
||||||
|
/* unsigned char rfChar[8] =
|
||||||
{
|
{
|
||||||
0b11100,
|
0b11100,
|
||||||
0b10100,
|
0b10100,
|
||||||
@@ -123,9 +124,23 @@ unsigned char rfChar[8] =
|
|||||||
0b00100,
|
0b00100,
|
||||||
0b00110,
|
0b00110,
|
||||||
0b00100
|
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,
|
||||||
0b01000,
|
0b01000,
|
||||||
@@ -135,6 +150,19 @@ unsigned char ipChar[8] =
|
|||||||
0b00101,
|
0b00101,
|
||||||
0b00110,
|
0b00110,
|
||||||
0b00100
|
0b00100
|
||||||
|
}; */
|
||||||
|
|
||||||
|
// Icon-based custom character for network traffic
|
||||||
|
unsigned char ipChar[8] =
|
||||||
|
{
|
||||||
|
0b01110,
|
||||||
|
0b10001,
|
||||||
|
0b00100,
|
||||||
|
0b01010,
|
||||||
|
0b00000,
|
||||||
|
0b00100,
|
||||||
|
0b00000,
|
||||||
|
0b00000
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned char tgChar[8] =
|
unsigned char tgChar[8] =
|
||||||
@@ -511,6 +539,7 @@ void CHD44780::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
|||||||
adafruitLCDColour(AC_RED);
|
adafruitLCDColour(AC_RED);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// 2 x 16
|
||||||
if (m_rows == 2U && m_cols == 16U) {
|
if (m_rows == 2U && m_cols == 16U) {
|
||||||
char buffer[16U];
|
char buffer[16U];
|
||||||
if (m_duplex) {
|
if (m_duplex) {
|
||||||
@@ -526,8 +555,7 @@ void CHD44780::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
|||||||
} else {
|
} else {
|
||||||
::lcdPosition(m_fd, 0, 0);
|
::lcdPosition(m_fd, 0, 0);
|
||||||
::lcdPutchar(m_fd, 0);
|
::lcdPutchar(m_fd, 0);
|
||||||
::sprintf(buffer, " %s", src.c_str());
|
::lcdPrintf(m_fd, " %-13s", src.c_str());
|
||||||
::lcdPrintf(m_fd, "%-14s", buffer);
|
|
||||||
::lcdPutchar(m_fd, strcmp(type, "R") == 0 ? 5 : 6);
|
::lcdPutchar(m_fd, strcmp(type, "R") == 0 ? 5 : 6);
|
||||||
|
|
||||||
::lcdPosition(m_fd, 0, 1);
|
::lcdPosition(m_fd, 0, 1);
|
||||||
@@ -536,15 +564,12 @@ void CHD44780::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
|||||||
|
|
||||||
if (group) {
|
if (group) {
|
||||||
::lcdPutchar(m_fd, 7);
|
::lcdPutchar(m_fd, 7);
|
||||||
// ::sprintf(buffer, "%s", dst.c_str());
|
|
||||||
::lcdPrintf(m_fd, "%-12s", dst.c_str());
|
::lcdPrintf(m_fd, "%-12s", dst.c_str());
|
||||||
::lcdPutchar(m_fd, strcmp(type, "R") == 0 ? 5 : 6);
|
|
||||||
} else {
|
} else {
|
||||||
// ::sprintf(buffer, "%s", dst.c_str());
|
|
||||||
::lcdPrintf(m_fd, "%-13s", 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) {
|
} else if (m_rows == 4U && m_cols == 16U) {
|
||||||
char buffer[16U];
|
char buffer[16U];
|
||||||
if (slotNo == 1U) {
|
if (slotNo == 1U) {
|
||||||
@@ -556,6 +581,7 @@ void CHD44780::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
|||||||
::lcdPosition(m_fd, 0, 2);
|
::lcdPosition(m_fd, 0, 2);
|
||||||
::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer);
|
::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer);
|
||||||
}
|
}
|
||||||
|
// 4 x 20
|
||||||
} else if (m_rows == 4U && m_cols == 20U) {
|
} else if (m_rows == 4U && m_cols == 20U) {
|
||||||
char buffer[20U];
|
char buffer[20U];
|
||||||
if (slotNo == 1U) {
|
if (slotNo == 1U) {
|
||||||
@@ -567,6 +593,7 @@ void CHD44780::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
|||||||
::lcdPosition(m_fd, 0, 2);
|
::lcdPosition(m_fd, 0, 2);
|
||||||
::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer);
|
::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer);
|
||||||
}
|
}
|
||||||
|
// 2 x 40
|
||||||
} else if (m_rows == 2U && m_cols == 40U) {
|
} else if (m_rows == 2U && m_cols == 40U) {
|
||||||
char buffer[40U];
|
char buffer[40U];
|
||||||
if (slotNo == 1U) {
|
if (slotNo == 1U) {
|
||||||
|
|||||||
Reference in New Issue
Block a user