mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 15:09:23 +08:00
Make the code more readable
This commit is contained in:
293
OLED.cpp
293
OLED.cpp
@@ -106,45 +106,45 @@ const unsigned char logo_fusion_bmp [] =
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
};
|
};
|
||||||
|
|
||||||
//Logo P25 128x16px
|
//Logo P25 128x16px
|
||||||
const unsigned char logo_P25_bmp [] =
|
const unsigned char logo_P25_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,
|
||||||
0xf8, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x7f,
|
0xf8, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x7f,
|
||||||
0xf8, 0x00, 0x00, 0x00, 0x03, 0xff, 0xc0, 0x00, 0x00, 0x03, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x7f,
|
0xf8, 0x00, 0x00, 0x00, 0x03, 0xff, 0xc0, 0x00, 0x00, 0x03, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x7f,
|
||||||
0xf8, 0x00, 0xe0, 0x00, 0x00, 0xff, 0x00, 0x07, 0xc0, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0xff,
|
0xf8, 0x00, 0xe0, 0x00, 0x00, 0xff, 0x00, 0x07, 0xc0, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0xff,
|
||||||
0xf0, 0x01, 0xff, 0xfc, 0x00, 0x7e, 0x00, 0x3f, 0xf8, 0x00, 0xff, 0xe0, 0x0f, 0xff, 0xff, 0xff,
|
0xf0, 0x01, 0xff, 0xfc, 0x00, 0x7e, 0x00, 0x3f, 0xf8, 0x00, 0xff, 0xe0, 0x0f, 0xff, 0xff, 0xff,
|
||||||
0xf0, 0x01, 0xff, 0xfe, 0x00, 0x7c, 0x00, 0x7f, 0xfc, 0x00, 0x7f, 0xe0, 0x0f, 0xff, 0xff, 0xff,
|
0xf0, 0x01, 0xff, 0xfe, 0x00, 0x7c, 0x00, 0x7f, 0xfc, 0x00, 0x7f, 0xe0, 0x0f, 0xff, 0xff, 0xff,
|
||||||
0xf0, 0x01, 0xff, 0xfe, 0x00, 0x7e, 0x00, 0x7f, 0xf8, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x01, 0xff,
|
0xf0, 0x01, 0xff, 0xfe, 0x00, 0x7e, 0x00, 0x7f, 0xf8, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x01, 0xff,
|
||||||
0xf0, 0x01, 0xff, 0xc0, 0x00, 0xff, 0xff, 0xff, 0xe0, 0x01, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x1f,
|
0xf0, 0x01, 0xff, 0xc0, 0x00, 0xff, 0xff, 0xff, 0xe0, 0x01, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x1f,
|
||||||
0xf0, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x9f, 0xff, 0x80, 0x07,
|
0xf0, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x9f, 0xff, 0x80, 0x07,
|
||||||
0xf0, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xf8, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x03,
|
0xf0, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xf8, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x03,
|
||||||
0xf0, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x03,
|
0xf0, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x03,
|
||||||
0xf0, 0x01, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x1f, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xc0, 0x03,
|
0xf0, 0x01, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x1f, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xc0, 0x03,
|
||||||
0xf0, 0x01, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x7f, 0xff, 0xfe, 0x00, 0x0f, 0xfe, 0x00, 0x0f,
|
0xf0, 0x01, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x7f, 0xff, 0xfe, 0x00, 0x0f, 0xfe, 0x00, 0x0f,
|
||||||
0xf0, 0x01, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x3f,
|
0xf0, 0x01, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x3f,
|
||||||
0xf0, 0x01, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x03, 0xff,
|
0xf0, 0x01, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x03, 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 NXDN_sm, 128x16px
|
// Logo NXDN_sm, 128x16px
|
||||||
const unsigned char logo_NXDN_bmp [] =
|
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,
|
||||||
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, 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, 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, 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, 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,
|
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,
|
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, 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,
|
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,
|
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,
|
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,
|
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,
|
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
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -176,10 +176,10 @@ bool COLED::open()
|
|||||||
{
|
{
|
||||||
// I2C change parameters to fit to your LCD
|
// I2C change parameters to fit to your LCD
|
||||||
if ( !display.init(OLED_I2C_RESET, m_displayType) )
|
if ( !display.init(OLED_I2C_RESET, m_displayType) )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
display.begin();
|
display.begin();
|
||||||
|
|
||||||
display.invertDisplay(m_displayInvert ? 1 : 0);
|
display.invertDisplay(m_displayInvert ? 1 : 0);
|
||||||
@@ -200,7 +200,7 @@ bool COLED::open()
|
|||||||
|
|
||||||
void COLED::setIdleInt()
|
void COLED::setIdleInt()
|
||||||
{
|
{
|
||||||
m_mode = MODE_IDLE;
|
m_mode = MODE_IDLE;
|
||||||
|
|
||||||
display.clearDisplay();
|
display.clearDisplay();
|
||||||
OLED_statusbar();
|
OLED_statusbar();
|
||||||
@@ -212,26 +212,26 @@ void COLED::setIdleInt()
|
|||||||
// display.setTextSize(1);
|
// display.setTextSize(1);
|
||||||
display.startscrolldiagright(0x00,0x0f); //the MMDVM logo scrolls the whole screen
|
display.startscrolldiagright(0x00,0x0f); //the MMDVM logo scrolls the whole screen
|
||||||
display.display();
|
display.display();
|
||||||
|
|
||||||
unsigned char info[100U];
|
unsigned char info[100U];
|
||||||
CNetworkInfo* m_network;
|
CNetworkInfo* m_network;
|
||||||
|
|
||||||
passCounter ++;
|
passCounter ++;
|
||||||
if (passCounter > 253U)
|
if (passCounter > 253U)
|
||||||
networkInfoInitialized = false;
|
networkInfoInitialized = false;
|
||||||
|
|
||||||
if (! networkInfoInitialized) {
|
if (! networkInfoInitialized) {
|
||||||
//LogMessage("Initialize CNetworkInfo");
|
//LogMessage("Initialize CNetworkInfo");
|
||||||
info[0]=0;
|
info[0]=0;
|
||||||
m_network = new CNetworkInfo;
|
m_network = new CNetworkInfo;
|
||||||
m_network->getNetworkInterface(info);
|
m_network->getNetworkInterface(info);
|
||||||
m_ipaddress = (char*)info;
|
m_ipaddress = (char*)info;
|
||||||
delete m_network;
|
delete m_network;
|
||||||
|
|
||||||
networkInfoInitialized = true;
|
networkInfoInitialized = true;
|
||||||
passCounter = 0;
|
passCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void COLED::setErrorInt(const char* text)
|
void COLED::setErrorInt(const char* text)
|
||||||
@@ -277,9 +277,9 @@ void COLED::writeDStarInt(const char* my1, const char* my2, const char* your, co
|
|||||||
|
|
||||||
display.setCursor(0,OLED_LINE5);
|
display.setCursor(0,OLED_LINE5);
|
||||||
display.printf("via %.8s",reflector);
|
display.printf("via %.8s",reflector);
|
||||||
|
|
||||||
display.setCursor(0,OLED_LINE6);
|
display.setCursor(0,OLED_LINE6);
|
||||||
display.printf("%s",m_ipaddress.c_str());
|
display.printf("%s",m_ipaddress.c_str());
|
||||||
|
|
||||||
OLED_statusbar();
|
OLED_statusbar();
|
||||||
display.display();
|
display.display();
|
||||||
@@ -291,9 +291,9 @@ void COLED::clearDStarInt()
|
|||||||
|
|
||||||
display.setCursor(40,OLED_LINE3);
|
display.setCursor(40,OLED_LINE3);
|
||||||
display.print("Listening");
|
display.print("Listening");
|
||||||
|
|
||||||
display.setCursor(0,OLED_LINE5);
|
display.setCursor(0,OLED_LINE5);
|
||||||
display.printf("%s",m_ipaddress.c_str());
|
display.printf("%s",m_ipaddress.c_str());
|
||||||
|
|
||||||
display.display();
|
display.display();
|
||||||
}
|
}
|
||||||
@@ -302,77 +302,74 @@ void COLED::writeDMRInt(unsigned int slotNo,const std::string& src,bool group,co
|
|||||||
{
|
{
|
||||||
|
|
||||||
if (m_mode != MODE_DMR) {
|
if (m_mode != MODE_DMR) {
|
||||||
display.clearDisplay();
|
display.clearDisplay();
|
||||||
m_mode = MODE_DMR;
|
m_mode = MODE_DMR;
|
||||||
clearDMRInt(slotNo);
|
clearDMRInt(slotNo);
|
||||||
}
|
}
|
||||||
// if both slots, use lines 2-3 for slot 1, lines 4-5 for slot 2
|
// if both slots, use lines 2-3 for slot 1, lines 4-5 for slot 2
|
||||||
// if single slot, use lines 3-4
|
// if single slot, use lines 3-4
|
||||||
if ( m_slot1Enabled && m_slot2Enabled ) {
|
if ( m_slot1Enabled && m_slot2Enabled ) {
|
||||||
|
|
||||||
if (slotNo == 1U) {
|
if (slotNo == 1U) {
|
||||||
display.fillRect(0,OLED_LINE2,display.width(),40,BLACK);
|
display.fillRect(0,OLED_LINE2,display.width(),40,BLACK);
|
||||||
display.setCursor(0,OLED_LINE2);
|
display.setCursor(0,OLED_LINE2);
|
||||||
display.printf("%s",src.c_str());
|
display.printf("%s",src.c_str());
|
||||||
display.setCursor(0,OLED_LINE3);
|
display.setCursor(0,OLED_LINE3);
|
||||||
display.printf("Slot: %i %s %s%s",slotNo,type,group ? "TG: " : "",dst.c_str());
|
display.printf("Slot: %i %s %s%s",slotNo,type,group ? "TG: " : "",dst.c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
display.fillRect(0,OLED_LINE4,display.width(),40,BLACK);
|
display.fillRect(0,OLED_LINE4,display.width(),40,BLACK);
|
||||||
display.setCursor(0,OLED_LINE4);
|
display.setCursor(0,OLED_LINE4);
|
||||||
display.printf("%s",src.c_str());
|
display.printf("%s",src.c_str());
|
||||||
display.setCursor(0,OLED_LINE5);
|
display.setCursor(0,OLED_LINE5);
|
||||||
display.printf("Slot: %i %s %s%s",slotNo,type,group ? "TG: " : "",dst.c_str());
|
display.printf("Slot: %i %s %s%s",slotNo,type,group ? "TG: " : "",dst.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
display.fillRect(0,OLED_LINE3,display.width(),20,BLACK);
|
display.fillRect(0,OLED_LINE3,display.width(),20,BLACK);
|
||||||
display.setCursor(0,OLED_LINE3);
|
display.setCursor(0,OLED_LINE3);
|
||||||
display.printf("%s",src.c_str());
|
display.printf("%s",src.c_str());
|
||||||
display.setCursor(0,OLED_LINE4);
|
display.setCursor(0,OLED_LINE4);
|
||||||
display.printf("Slot: %i %s %s%s",slotNo,type,group ? "TG: " : "",dst.c_str());
|
display.printf("Slot: %i %s %s%s",slotNo,type,group ? "TG: " : "",dst.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
display.fillRect(0,OLED_LINE6,display.width(),20,BLACK);
|
||||||
|
display.setCursor(0,OLED_LINE6);
|
||||||
|
display.printf("%s",m_ipaddress.c_str());
|
||||||
|
|
||||||
display.fillRect(0,OLED_LINE6,display.width(),20,BLACK);
|
|
||||||
display.setCursor(0,OLED_LINE6);
|
|
||||||
display.printf("%s",m_ipaddress.c_str());
|
|
||||||
|
|
||||||
OLED_statusbar();
|
OLED_statusbar();
|
||||||
display.display();
|
display.display();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void COLED::clearDMRInt(unsigned int slotNo)
|
void COLED::clearDMRInt(unsigned int slotNo)
|
||||||
{
|
{
|
||||||
// if both slots, use lines 2-3 for slot 1, lines 4-5 for slot 2
|
// if both slots, use lines 2-3 for slot 1, lines 4-5 for slot 2
|
||||||
// if single slot, use lines 3-4
|
// if single slot, use lines 3-4
|
||||||
if ( m_slot1Enabled && m_slot2Enabled ){
|
if ( m_slot1Enabled && m_slot2Enabled ){
|
||||||
if (slotNo == 1U)
|
if (slotNo == 1U) {
|
||||||
{
|
display.fillRect(0, OLED_LINE3, display.width(), 40, BLACK);
|
||||||
display.fillRect(0, OLED_LINE3, display.width(), 40, BLACK);
|
display.setCursor(0,OLED_LINE3);
|
||||||
display.setCursor(0,OLED_LINE3);
|
display.print("Slot: 1 Listening");
|
||||||
display.print("Slot: 1 Listening");
|
}
|
||||||
}
|
else {
|
||||||
else
|
display.fillRect(0, OLED_LINE5, display.width(), 40, BLACK);
|
||||||
{
|
display.setCursor(0, OLED_LINE5);
|
||||||
display.fillRect(0, OLED_LINE5, display.width(), 40, BLACK);
|
display.print("Slot: 2 Listening");
|
||||||
display.setCursor(0, OLED_LINE5);
|
}
|
||||||
display.print("Slot: 2 Listening");
|
}
|
||||||
}
|
else {
|
||||||
}
|
display.fillRect(0, OLED_LINE4, display.width(), 40, BLACK);
|
||||||
else {
|
display.setCursor(0,OLED_LINE4);
|
||||||
display.fillRect(0, OLED_LINE4, display.width(), 40, BLACK);
|
display.printf("Slot: %i Listening",slotNo);
|
||||||
display.setCursor(0,OLED_LINE4);
|
}
|
||||||
display.printf("Slot: %i Listening",slotNo);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
display.fillRect(0, OLED_LINE6, display.width(), 20, BLACK);
|
||||||
display.fillRect(0, OLED_LINE6, display.width(), 20, BLACK);
|
display.setCursor(0,OLED_LINE6);
|
||||||
display.setCursor(0,OLED_LINE6);
|
display.printf("%s",m_ipaddress.c_str());
|
||||||
display.printf("%s",m_ipaddress.c_str());
|
|
||||||
display.display();
|
display.display();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -400,9 +397,9 @@ void COLED::clearFusionInt()
|
|||||||
|
|
||||||
display.setCursor(40,OLED_LINE4);
|
display.setCursor(40,OLED_LINE4);
|
||||||
display.print("Listening");
|
display.print("Listening");
|
||||||
|
|
||||||
display.setCursor(0,OLED_LINE6);
|
display.setCursor(0,OLED_LINE6);
|
||||||
display.printf("%s",m_ipaddress.c_str());
|
display.printf("%s",m_ipaddress.c_str());
|
||||||
|
|
||||||
display.display();
|
display.display();
|
||||||
}
|
}
|
||||||
@@ -430,9 +427,9 @@ void COLED::clearP25Int()
|
|||||||
|
|
||||||
display.setCursor(40,OLED_LINE4);
|
display.setCursor(40,OLED_LINE4);
|
||||||
display.print("Listening");
|
display.print("Listening");
|
||||||
|
|
||||||
display.setCursor(0,OLED_LINE6);
|
display.setCursor(0,OLED_LINE6);
|
||||||
display.printf("%s",m_ipaddress.c_str());
|
display.printf("%s",m_ipaddress.c_str());
|
||||||
|
|
||||||
display.display();
|
display.display();
|
||||||
}
|
}
|
||||||
@@ -460,9 +457,9 @@ void COLED::clearNXDNInt()
|
|||||||
|
|
||||||
display.setCursor(40,OLED_LINE4);
|
display.setCursor(40,OLED_LINE4);
|
||||||
display.print("Listening");
|
display.print("Listening");
|
||||||
|
|
||||||
display.setCursor(0,OLED_LINE6);
|
display.setCursor(0,OLED_LINE6);
|
||||||
display.printf("%s",m_ipaddress.c_str());
|
display.printf("%s",m_ipaddress.c_str());
|
||||||
|
|
||||||
display.display();
|
display.display();
|
||||||
}
|
}
|
||||||
@@ -490,9 +487,9 @@ void COLED::clearPOCSAGInt()
|
|||||||
|
|
||||||
display.setCursor(40,OLED_LINE4);
|
display.setCursor(40,OLED_LINE4);
|
||||||
display.print("Listening");
|
display.print("Listening");
|
||||||
|
|
||||||
display.setCursor(0,OLED_LINE6);
|
display.setCursor(0,OLED_LINE6);
|
||||||
display.printf("%s",m_ipaddress.c_str());
|
display.printf("%s",m_ipaddress.c_str());
|
||||||
|
|
||||||
display.display();
|
display.display();
|
||||||
}
|
}
|
||||||
@@ -526,13 +523,13 @@ void COLED::clearCWInt()
|
|||||||
void COLED::close()
|
void COLED::close()
|
||||||
{
|
{
|
||||||
display.clearDisplay();
|
display.clearDisplay();
|
||||||
display.fillRect(0, 0, display.width(), 16, BLACK);
|
display.fillRect(0, 0, display.width(), 16, BLACK);
|
||||||
display.startscrollright(0x00,0x01);
|
display.startscrollright(0x00,0x01);
|
||||||
display.setCursor(0,00);
|
display.setCursor(0,00);
|
||||||
display.setTextSize(2);
|
display.setTextSize(2);
|
||||||
display.print("-CLOSE-");
|
display.print("-CLOSE-");
|
||||||
display.display();
|
display.display();
|
||||||
|
|
||||||
display.close();
|
display.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -544,18 +541,18 @@ void COLED::OLED_statusbar()
|
|||||||
|
|
||||||
display.setCursor(0,0);
|
display.setCursor(0,0);
|
||||||
if (m_mode == MODE_DMR)
|
if (m_mode == MODE_DMR)
|
||||||
display.drawBitmap(0, 0, logo_dmr_bmp, 128, 16, WHITE);
|
display.drawBitmap(0, 0, logo_dmr_bmp, 128, 16, WHITE);
|
||||||
else if (m_mode == MODE_DSTAR)
|
else if (m_mode == MODE_DSTAR)
|
||||||
display.drawBitmap(0, 0, logo_dstar_bmp, 128, 16, WHITE);
|
display.drawBitmap(0, 0, logo_dstar_bmp, 128, 16, WHITE);
|
||||||
else if (m_mode == MODE_YSF)
|
else if (m_mode == MODE_YSF)
|
||||||
display.drawBitmap(0, 0, logo_fusion_bmp, 128, 16, WHITE);
|
display.drawBitmap(0, 0, logo_fusion_bmp, 128, 16, WHITE);
|
||||||
else if (m_mode == MODE_P25)
|
else if (m_mode == MODE_P25)
|
||||||
display.drawBitmap(0, 0, logo_P25_bmp, 128, 16, WHITE);
|
display.drawBitmap(0, 0, logo_P25_bmp, 128, 16, WHITE);
|
||||||
else if (m_mode == MODE_NXDN)
|
else if (m_mode == MODE_NXDN)
|
||||||
display.drawBitmap(0, 0, logo_NXDN_bmp, 128, 16, WHITE);
|
display.drawBitmap(0, 0, logo_NXDN_bmp, 128, 16, WHITE);
|
||||||
else
|
else
|
||||||
display.drawBitmap(0, 0, logo_glcd_bmp, 128, 16, WHITE);
|
display.drawBitmap(0, 0, logo_glcd_bmp, 128, 16, WHITE);
|
||||||
|
|
||||||
if (m_displayScroll)
|
if (m_displayScroll)
|
||||||
display.startscrollright(0x00,0x02);
|
display.startscrollright(0x00,0x02);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user