Remove support for the UMP (sob).

This commit is contained in:
Jonathan Naylor
2020-11-10 09:58:10 +00:00
parent f1dda251c3
commit f89145b772
19 changed files with 20 additions and 675 deletions

View File

@@ -136,7 +136,6 @@ m_pocsagNetwork(NULL),
m_fmNetwork(NULL),
m_ax25Network(NULL),
m_display(NULL),
m_ump(NULL),
m_mode(MODE_IDLE),
m_dstarRFModeHang(10U),
m_dmrRFModeHang(10U),
@@ -285,21 +284,7 @@ int CMMDVMHost::run()
if (!ret)
return 1;
if (m_conf.getUMPEnabled()) {
std::string port = m_conf.getUMPPort();
LogInfo("Universal MMDVM Peripheral");
LogInfo(" Port: %s", port.c_str());
m_ump = new CUMP(port);
bool ret = m_ump->open();
if (!ret) {
delete m_ump;
m_ump = NULL;
}
}
m_display = CDisplay::createDisplay(m_conf,m_ump,m_modem);
m_display = CDisplay::createDisplay(m_conf, m_modem);
if (m_dstarEnabled && m_conf.getDStarNetworkEnabled()) {
ret = createDStarNetwork();
@@ -708,14 +693,11 @@ int CMMDVMHost::run()
LogMessage("MMDVMHost-%s is running", VERSION);
while (!m_killed) {
bool lockout1 = m_modem->hasLockout();
bool lockout2 = false;
bool lockout = m_modem->hasLockout();
if (m_ump != NULL)
lockout2 = m_ump->getLockout();
if ((lockout1 || lockout2) && m_mode != MODE_LOCKOUT)
if (lockout && m_mode != MODE_LOCKOUT)
setMode(MODE_LOCKOUT);
else if ((!lockout1 && !lockout2) && m_mode == MODE_LOCKOUT)
else if (!lockout && m_mode == MODE_LOCKOUT)
setMode(MODE_IDLE);
bool error = m_modem->hasError();
@@ -724,13 +706,6 @@ int CMMDVMHost::run()
else if (!error && m_mode == MODE_ERROR)
setMode(MODE_IDLE);
if (m_ump != NULL) {
bool tx = m_modem->hasTX();
m_ump->setTX(tx);
bool cd = m_modem->hasCD();
m_ump->setCD(cd);
}
unsigned char data[500U];
unsigned int len;
bool ret;
@@ -1231,9 +1206,6 @@ int CMMDVMHost::run()
pocsagTimer.start();
}
if (m_ump != NULL)
m_ump->clock(ms);
if (ms < 5U)
CThread::sleep(5U);
}
@@ -1246,11 +1218,6 @@ int CMMDVMHost::run()
m_display->close();
delete m_display;
if (m_ump != NULL) {
m_ump->close();
delete m_ump;
}
if (m_dmrLookup != NULL)
m_dmrLookup->stop();
@@ -1877,8 +1844,6 @@ void CMMDVMHost::setMode(unsigned char mode)
if (m_ax25 != NULL)
m_ax25->enable(false);
m_modem->setMode(MODE_DSTAR);
if (m_ump != NULL)
m_ump->setMode(MODE_DSTAR);
m_mode = MODE_DSTAR;
m_modeTimer.start();
m_cwIdTimer.stop();
@@ -1923,8 +1888,6 @@ void CMMDVMHost::setMode(unsigned char mode)
if (m_ax25 != NULL)
m_ax25->enable(false);
m_modem->setMode(MODE_DMR);
if (m_ump != NULL)
m_ump->setMode(MODE_DMR);
if (m_duplex) {
m_modem->writeDMRStart(true);
m_dmrTXTimer.start();
@@ -1973,8 +1936,6 @@ void CMMDVMHost::setMode(unsigned char mode)
if (m_ax25 != NULL)
m_ax25->enable(false);
m_modem->setMode(MODE_YSF);
if (m_ump != NULL)
m_ump->setMode(MODE_YSF);
m_mode = MODE_YSF;
m_modeTimer.start();
m_cwIdTimer.stop();
@@ -2019,8 +1980,6 @@ void CMMDVMHost::setMode(unsigned char mode)
if (m_ax25 != NULL)
m_ax25->enable(false);
m_modem->setMode(MODE_P25);
if (m_ump != NULL)
m_ump->setMode(MODE_P25);
m_mode = MODE_P25;
m_modeTimer.start();
m_cwIdTimer.stop();
@@ -2065,8 +2024,6 @@ void CMMDVMHost::setMode(unsigned char mode)
if (m_ax25 != NULL)
m_ax25->enable(false);
m_modem->setMode(MODE_NXDN);
if (m_ump != NULL)
m_ump->setMode(MODE_NXDN);
m_mode = MODE_NXDN;
m_modeTimer.start();
m_cwIdTimer.stop();
@@ -2103,8 +2060,6 @@ void CMMDVMHost::setMode(unsigned char mode)
if (m_pocsag != NULL)
m_pocsag->enable(false);
m_modem->setMode(MODE_M17);
if (m_ump != NULL)
m_ump->setMode(MODE_M17);
m_mode = MODE_M17;
m_modeTimer.start();
m_cwIdTimer.stop();
@@ -2149,8 +2104,6 @@ void CMMDVMHost::setMode(unsigned char mode)
if (m_ax25 != NULL)
m_ax25->enable(false);
m_modem->setMode(MODE_POCSAG);
if (m_ump != NULL)
m_ump->setMode(MODE_POCSAG);
m_mode = MODE_POCSAG;
m_modeTimer.start();
m_cwIdTimer.stop();
@@ -2199,8 +2152,6 @@ void CMMDVMHost::setMode(unsigned char mode)
m_dmrTXTimer.stop();
}
m_modem->setMode(MODE_FM);
if (m_ump != NULL)
m_ump->setMode(MODE_FM);
m_display->setFM();
m_mode = MODE_FM;
m_modeTimer.start();
@@ -2250,8 +2201,6 @@ void CMMDVMHost::setMode(unsigned char mode)
m_dmrTXTimer.stop();
}
m_modem->setMode(MODE_IDLE);
if (m_ump != NULL)
m_ump->setMode(MODE_IDLE);
m_display->setLockout();
m_mode = MODE_LOCKOUT;
m_modeTimer.stop();
@@ -2301,8 +2250,6 @@ void CMMDVMHost::setMode(unsigned char mode)
m_modem->writeDMRStart(false);
m_dmrTXTimer.stop();
}
if (m_ump != NULL)
m_ump->setMode(MODE_IDLE);
m_display->setError("MODEM");
m_mode = MODE_ERROR;
m_modeTimer.stop();
@@ -2352,8 +2299,6 @@ void CMMDVMHost::setMode(unsigned char mode)
m_dmrTXTimer.stop();
}
m_modem->setMode(MODE_IDLE);
if (m_ump != NULL)
m_ump->setMode(MODE_IDLE);
if (m_mode == MODE_ERROR) {
m_modem->sendCWId(m_callsign);
m_cwIdTimer.setTimeout(m_cwIdTime);