Add M17 to the OLED display.
This commit is contained in:
parent
2618a14ae5
commit
302a23b6e6
2 changed files with 57 additions and 2 deletions
56
OLED.cpp
56
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
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Logo M17_sm, 128x16px
|
||||||
|
// XXX FIXME This is the NXDN logo, it needs replacing with the M17 logo
|
||||||
|
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
|
// Logo POCASG/DAPNET, 128x16px
|
||||||
const unsigned char logo_POCSAG_bmp [] =
|
const unsigned char logo_POCSAG_bmp [] =
|
||||||
{
|
{
|
||||||
|
@ -500,7 +522,6 @@ void COLED::writeP25Int(const char* source, bool group, unsigned int dest, const
|
||||||
|
|
||||||
OLED_statusbar();
|
OLED_statusbar();
|
||||||
m_display.display();
|
m_display.display();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void COLED::clearP25Int()
|
void COLED::clearP25Int()
|
||||||
|
@ -566,6 +587,36 @@ void COLED::clearNXDNInt()
|
||||||
m_display.display();
|
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)
|
void COLED::writePOCSAGInt(uint32_t ric, const std::string& message)
|
||||||
{
|
{
|
||||||
m_mode = MODE_POCSAG;
|
m_mode = MODE_POCSAG;
|
||||||
|
@ -583,7 +634,6 @@ void COLED::writePOCSAGInt(uint32_t ric, const std::string& message)
|
||||||
|
|
||||||
OLED_statusbar();
|
OLED_statusbar();
|
||||||
m_display.display();
|
m_display.display();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void COLED::clearPOCSAGInt()
|
void COLED::clearPOCSAGInt()
|
||||||
|
@ -658,6 +708,8 @@ void COLED::OLED_statusbar()
|
||||||
m_display.drawBitmap(0, 0, logo_P25_bmp, 128, 16, WHITE);
|
m_display.drawBitmap(0, 0, logo_P25_bmp, 128, 16, WHITE);
|
||||||
else if (m_mode == MODE_NXDN)
|
else if (m_mode == MODE_NXDN)
|
||||||
m_display.drawBitmap(0, 0, logo_NXDN_bmp, 128, 16, WHITE);
|
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)
|
else if (m_mode == MODE_POCSAG)
|
||||||
m_display.drawBitmap(0, 0, logo_POCSAG_bmp, 128, 16, WHITE);
|
m_display.drawBitmap(0, 0, logo_POCSAG_bmp, 128, 16, WHITE);
|
||||||
else if (m_displayLogoScreensaver)
|
else if (m_displayLogoScreensaver)
|
||||||
|
|
3
OLED.h
3
OLED.h
|
@ -70,6 +70,9 @@ public:
|
||||||
virtual int writeNXDNIntEx(const class CUserDBentry& source, bool group, unsigned int dest, const char* type);
|
virtual int writeNXDNIntEx(const class CUserDBentry& source, bool group, unsigned int dest, const char* type);
|
||||||
virtual void clearNXDNInt();
|
virtual void clearNXDNInt();
|
||||||
|
|
||||||
|
virtual void writeM17Int(const char* source, const char* dest, const char* type);
|
||||||
|
virtual void clearM17Int();
|
||||||
|
|
||||||
virtual void writePOCSAGInt(uint32_t ric, const std::string& message);
|
virtual void writePOCSAGInt(uint32_t ric, const std::string& message);
|
||||||
virtual void clearPOCSAGInt();
|
virtual void clearPOCSAGInt();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue