Integrate the new messages into the OLED display driver.

This commit is contained in:
Jonathan Naylor
2018-10-31 16:54:57 +00:00
parent 1a971e3986
commit 4bf15438d5
8 changed files with 144 additions and 80 deletions

View File

@@ -169,14 +169,17 @@ const unsigned char logo_POCSAG_bmp [] =
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
COLED::COLED(unsigned char displayType, unsigned char displayBrightness, bool displayInvert, bool displayScroll, bool displayRotate, bool slot1Enabled, bool slot2Enabled) :
COLED::COLED(unsigned char displayType, unsigned char displayBrightness, bool displayInvert, bool displayScroll, bool displayRotate, bool slot1Enabled, bool slot2Enabled, CModem* modem) :
m_displayType(displayType),
m_displayBrightness(displayBrightness),
m_displayInvert(displayInvert),
m_displayScroll(displayScroll),
m_displayRotate(displayRotate),
m_slot1Enabled(slot1Enabled),
m_slot2Enabled(slot2Enabled)
m_slot2Enabled(slot2Enabled),
m_modem(modem),
m_ipaddress(),
m_display()
{
}
@@ -255,10 +258,12 @@ void COLED::setIdleInt()
m_ipaddress = (char*)info;
delete m_network;
if (m_modem != NULL)
m_modem->writeIPInfo(m_ipaddress);
networkInfoInitialized = true;
passCounter = 0;
}
}
void COLED::setErrorInt(const char* text)
@@ -325,6 +330,9 @@ void COLED::writeDStarInt(const char* my1, const char* my2, const char* your, co
OLED_statusbar();
display.display();
if (m_modem != NULL)
m_modem->writeDStarInfo(my1, my2, your, type, reflector);
}
void COLED::clearDStarInt()
@@ -385,7 +393,9 @@ void COLED::writeDMRInt(unsigned int slotNo,const std::string& src,bool group,co
OLED_statusbar();
display.display();
}
if (m_modem != NULL)
m_modem->writeDMRInfo(slotNo, src, group, dest, type);
}
void COLED::clearDMRInt(unsigned int slotNo)
{
@@ -431,6 +441,9 @@ void COLED::writeFusionInt(const char* source, const char* dest, const char* typ
OLED_statusbar();
display.display();
if (m_modem != NULL)
m_modem->writeYSFInfo(source, dest, type, origin);
}
void COLED::clearFusionInt()
@@ -461,6 +474,9 @@ void COLED::writeP25Int(const char* source, bool group, unsigned int dest, const
OLED_statusbar();
display.display();
if (m_modem != NULL)
m_modem->writeP25Info(source, group, dest, type);
}
void COLED::clearP25Int()
@@ -491,6 +507,9 @@ void COLED::writeNXDNInt(const char* source, bool group, unsigned int dest, cons
OLED_statusbar();
display.display();
if (m_modem != NULL)
m_modem->writeNXDNInfo(source, group, dest, type);
}
void COLED::clearNXDNInt()
@@ -521,6 +540,9 @@ void COLED::writePOCSAGInt(uint32_t ric, const std::string& message)
OLED_statusbar();
display.display();
if (m_modem != NULL)
m_modem->writePOCSAGInfo(ric, message);
}
void COLED::clearPOCSAGInt()