Add output of callsign/DMRid on LCD idle screen
This commit is contained in:
parent
a9b5f44bee
commit
9fb57309a1
3 changed files with 11 additions and 5 deletions
|
@ -27,9 +27,11 @@
|
|||
|
||||
const char* LISTENING = "Listening ";
|
||||
|
||||
CHD44780::CHD44780(unsigned int rows, unsigned int cols, const std::vector<unsigned int>& pins) :
|
||||
CHD44780::CHD44780(unsigned int rows, unsigned int cols, const char* callsign, unsigned int dmrid, const std::vector<unsigned int>& pins) :
|
||||
m_rows(rows),
|
||||
m_cols(cols),
|
||||
m_callsign(callsign),
|
||||
m_dmrid(dmrid),
|
||||
m_rb(pins.at(0U)),
|
||||
m_strb(pins.at(1U)),
|
||||
m_d0(pins.at(2U)),
|
||||
|
@ -68,10 +70,10 @@ void CHD44780::setIdle()
|
|||
::lcdClear(m_fd);
|
||||
|
||||
::lcdPosition(m_fd, 0, 0);
|
||||
::lcdPuts(m_fd, "MMDVM");
|
||||
::lcdPrintf(m_fd, "%-6s / %u", m_callsign, m_dmrid);
|
||||
|
||||
::lcdPosition(m_fd, 0, 1);
|
||||
::lcdPuts(m_fd, "Idle");
|
||||
::lcdPuts(m_fd, "MMDVM Idle");
|
||||
}
|
||||
|
||||
void CHD44780::setError(const char* text)
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
class CHD44780 : public IDisplay
|
||||
{
|
||||
public:
|
||||
CHD44780(unsigned int rows, unsigned int cols, const std::vector<unsigned int>& pins);
|
||||
CHD44780(unsigned int rows, unsigned int cols, const char* callsign, unsigned int dmrid, const std::vector<unsigned int>& pins);
|
||||
virtual ~CHD44780();
|
||||
|
||||
virtual bool open();
|
||||
|
@ -54,6 +54,8 @@ public:
|
|||
private:
|
||||
unsigned int m_rows;
|
||||
unsigned int m_cols;
|
||||
const char* m_callsign;
|
||||
unsigned int m_dmrid;
|
||||
unsigned int m_rb;
|
||||
unsigned int m_strb;
|
||||
unsigned int m_d0;
|
||||
|
|
|
@ -567,6 +567,8 @@ void CMMDVMHost::readParams()
|
|||
void CMMDVMHost::createDisplay()
|
||||
{
|
||||
std::string type = m_conf.getDisplay();
|
||||
std::string callsign = m_conf.getCallsign();
|
||||
unsigned int dmrid = m_conf.getDMRId();
|
||||
|
||||
LogInfo("Display Parameters");
|
||||
LogInfo(" Type: %s", type.c_str());
|
||||
|
@ -598,7 +600,7 @@ void CMMDVMHost::createDisplay()
|
|||
LogInfo(" Columns: %u", columns);
|
||||
LogInfo(" Pins: %u,%u,%u,%u,%u,%u", pins.at(0U), pins.at(1U), pins.at(2U), pins.at(3U), pins.at(4U), pins.at(5U));
|
||||
|
||||
m_display = new CHD44780(rows, columns, pins);
|
||||
m_display = new CHD44780(rows, columns, callsign.c_str(), dmrid, pins);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue