mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
Add M17 to the OLED display, even though it does say NXDN!
This commit is contained in:
55
OLED.cpp
55
OLED.cpp
@@ -148,6 +148,28 @@ const unsigned char logo_NXDN_bmp [] =
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
|
||||
};
|
||||
|
||||
// XXX FIXME This is still the NXDN logo
|
||||
// Logo M17_sm, 128x16px
|
||||
const unsigned char logo_M17_bmp [] =
|
||||
{
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xf0, 0x1f, 0xf8, 0x0f, 0x00, 0xff, 0x80, 0x7c, 0x00, 0x0f, 0xff, 0x80, 0x7f, 0xe0, 0x7f,
|
||||
0xff, 0xe0, 0x0f, 0xf0, 0x1f, 0x80, 0x7e, 0x01, 0xf8, 0x00, 0x00, 0x7f, 0x00, 0x3f, 0xc0, 0x7f,
|
||||
0xff, 0xc0, 0x07, 0xe0, 0x3f, 0x80, 0x38, 0x07, 0xf0, 0x00, 0x00, 0x3e, 0x00, 0x3f, 0x80, 0xff,
|
||||
0xff, 0x80, 0x03, 0xc0, 0x3f, 0xc0, 0x00, 0x3f, 0xe0, 0x1f, 0x80, 0x3e, 0x00, 0x1f, 0x01, 0xff,
|
||||
0xff, 0x00, 0x03, 0x80, 0x7f, 0xe0, 0x00, 0xff, 0xc0, 0x3f, 0x80, 0x3c, 0x00, 0x0e, 0x03, 0xff,
|
||||
0xfe, 0x00, 0x01, 0x00, 0xff, 0xe0, 0x03, 0xff, 0x80, 0x7f, 0x80, 0x78, 0x08, 0x04, 0x03, 0xff,
|
||||
0xfc, 0x03, 0x00, 0x01, 0xff, 0x80, 0x01, 0xff, 0x00, 0xff, 0x00, 0xf0, 0x1c, 0x00, 0x07, 0xff,
|
||||
0xfc, 0x07, 0x80, 0x03, 0xfc, 0x00, 0x01, 0xfe, 0x01, 0xfc, 0x01, 0xe0, 0x1e, 0x00, 0x0f, 0xff,
|
||||
0xf8, 0x0f, 0xc0, 0x07, 0xf0, 0x0e, 0x00, 0xfc, 0x00, 0x00, 0x07, 0xc0, 0x3f, 0x00, 0x1f, 0xff,
|
||||
0xf0, 0x1f, 0xe0, 0x0f, 0x80, 0x3f, 0x00, 0x7c, 0x00, 0x00, 0x3f, 0xc0, 0x7f, 0x80, 0x3f, 0xff,
|
||||
0xe0, 0x3f, 0xf0, 0x0e, 0x01, 0xff, 0x80, 0x38, 0x00, 0x07, 0xff, 0x80, 0xff, 0x80, 0x7f, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
|
||||
};
|
||||
|
||||
// Logo POCASG/DAPNET, 128x16px
|
||||
const unsigned char logo_POCSAG_bmp [] =
|
||||
{
|
||||
@@ -500,7 +522,6 @@ void COLED::writeP25Int(const char* source, bool group, unsigned int dest, const
|
||||
|
||||
OLED_statusbar();
|
||||
m_display.display();
|
||||
|
||||
}
|
||||
|
||||
void COLED::clearP25Int()
|
||||
@@ -566,6 +587,36 @@ void COLED::clearNXDNInt()
|
||||
m_display.display();
|
||||
}
|
||||
|
||||
void COLED::writeM17Int(const char* source, const char* dest, const char* type)
|
||||
{
|
||||
m_mode = MODE_M17;
|
||||
|
||||
m_display.clearDisplay();
|
||||
m_display.fillRect(0, OLED_LINE2, m_display.width(), m_display.height(), BLACK);
|
||||
|
||||
m_display.setCursor(0,OLED_LINE3);
|
||||
m_display.printf("%s %s", type, source);
|
||||
|
||||
m_display.setCursor(0,OLED_LINE4);
|
||||
m_display.printf(" %s", dest);
|
||||
|
||||
OLED_statusbar();
|
||||
m_display.display();
|
||||
}
|
||||
|
||||
void COLED::clearM17Int()
|
||||
{
|
||||
m_display.fillRect(0, OLED_LINE2, m_display.width(), m_display.height(), BLACK);
|
||||
|
||||
m_display.setCursor(40,OLED_LINE4);
|
||||
m_display.print("Listening");
|
||||
|
||||
m_display.setCursor(0,OLED_LINE6);
|
||||
m_display.printf("%s",m_ipaddress.c_str());
|
||||
|
||||
m_display.display();
|
||||
}
|
||||
|
||||
void COLED::writePOCSAGInt(uint32_t ric, const std::string& message)
|
||||
{
|
||||
m_mode = MODE_POCSAG;
|
||||
@@ -658,6 +709,8 @@ void COLED::OLED_statusbar()
|
||||
m_display.drawBitmap(0, 0, logo_P25_bmp, 128, 16, WHITE);
|
||||
else if (m_mode == MODE_NXDN)
|
||||
m_display.drawBitmap(0, 0, logo_NXDN_bmp, 128, 16, WHITE);
|
||||
else if (m_mode == MODE_M17)
|
||||
m_display.drawBitmap(0, 0, logo_M17_bmp, 128, 16, WHITE);
|
||||
else if (m_mode == MODE_POCSAG)
|
||||
m_display.drawBitmap(0, 0, logo_POCSAG_bmp, 128, 16, WHITE);
|
||||
else if (m_displayLogoScreensaver)
|
||||
|
||||
Reference in New Issue
Block a user