Add callsign from config file to idle screen

This commit is contained in:
phl0 2016-04-07 13:11:22 +02:00
parent 09a16a37a6
commit aae5060f80
10 changed files with 14 additions and 13 deletions

View file

@ -28,7 +28,7 @@ public:
virtual bool open() = 0;
virtual void setIdle() = 0;
virtual void setIdle(const char* callsign) = 0;
virtual void setLockout() = 0;
virtual void setError(const char* text) = 0;

View file

@ -63,12 +63,12 @@ bool CHD44780::open()
return true;
}
void CHD44780::setIdle()
void CHD44780::setIdle(const char* callsign)
{
::lcdClear(m_fd);
::lcdPosition(m_fd, 0, 0);
::lcdPuts(m_fd, "MMDVM");
::lcdPrintf(m_fd, "MMDVM %s", callsign);
::lcdPosition(m_fd, 0, 1);
::lcdPuts(m_fd, "Idle");

View file

@ -32,7 +32,7 @@ public:
virtual bool open();
virtual void setIdle();
virtual void setIdle(const char* callsign);
virtual void setError(const char* text);
virtual void setLockout();

View file

@ -692,7 +692,8 @@ void CMMDVMHost::setMode(unsigned char mode, bool logging)
if (m_mode == MODE_DMR && m_duplex)
m_modem->writeDMRStart(false);
m_modem->setMode(MODE_IDLE);
m_display->setIdle();
std::string callsign = m_conf.getCallsign();
m_display->setIdle(callsign.c_str());
m_mode = MODE_IDLE;
m_modeTimer.stop();
break;

View file

@ -48,12 +48,12 @@ bool CNextion::open()
::sprintf(command, "dim=%u", m_brightness);
sendCommand(command);
setIdle();
setIdle("");
return true;
}
void CNextion::setIdle()
void CNextion::setIdle(const char* callsign)
{
sendCommand("page MMDVM");

View file

@ -32,7 +32,7 @@ public:
virtual bool open();
virtual void setIdle();
virtual void setIdle(const char* callsign);
virtual void setError(const char* text);
virtual void setLockout();

View file

@ -31,7 +31,7 @@ bool CNullDisplay::open()
return true;
}
void CNullDisplay::setIdle()
void CNullDisplay::setIdle(const char* callsign)
{
}

View file

@ -31,7 +31,7 @@ public:
virtual bool open();
virtual void setIdle();
virtual void setIdle(const char* callsign);
virtual void setError(const char* text);
virtual void setLockout();

View file

@ -71,12 +71,12 @@ bool CTFTSerial::open()
setForeground(COLOUR_BLACK);
setIdle();
setIdle("");
return true;
}
void CTFTSerial::setIdle()
void CTFTSerial::setIdle(const char* callsign)
{
// Clear the screen
clearScreen();

View file

@ -32,7 +32,7 @@ public:
virtual bool open();
virtual void setIdle();
virtual void setIdle(const char* callsign);
virtual void setError(const char* text);
virtual void setLockout();