mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-23 00:35:53 +08:00
Add extra logging when starting and stopping the MMDVM.
This commit is contained in:
@@ -362,7 +362,6 @@ bool CM17Control::writeModem(unsigned char* data, unsigned int len)
|
|||||||
// Remove any erronous EOF from the FN
|
// Remove any erronous EOF from the FN
|
||||||
netData[M17_LSF_LENGTH_BYTES - M17_CRC_LENGTH_BYTES + 0U] &= 0x7FU;
|
netData[M17_LSF_LENGTH_BYTES - M17_CRC_LENGTH_BYTES + 0U] &= 0x7FU;
|
||||||
|
|
||||||
|
|
||||||
// The CRC is added in the networking code
|
// The CRC is added in the networking code
|
||||||
|
|
||||||
m_network->write(netData);
|
m_network->write(netData);
|
||||||
|
|||||||
@@ -297,8 +297,8 @@ int CMMDVMHost::run()
|
|||||||
LogInfo(HEADER3);
|
LogInfo(HEADER3);
|
||||||
LogInfo(HEADER4);
|
LogInfo(HEADER4);
|
||||||
|
|
||||||
LogMessage("MMDVMHost-%s is starting", VERSION);
|
LogInfo("MMDVMHost-%s is starting", VERSION);
|
||||||
LogMessage("Built %s %s (GitID #%.7s)", __TIME__, __DATE__, gitversion);
|
LogInfo("Built %s %s (GitID #%.7s)", __TIME__, __DATE__, gitversion);
|
||||||
|
|
||||||
readParams();
|
readParams();
|
||||||
|
|
||||||
@@ -353,6 +353,8 @@ int CMMDVMHost::run()
|
|||||||
|
|
||||||
m_display = CDisplay::createDisplay(m_conf, m_modem);
|
m_display = CDisplay::createDisplay(m_conf, m_modem);
|
||||||
|
|
||||||
|
LogInfo("Opening network connections");
|
||||||
|
|
||||||
if (m_dstarEnabled && m_conf.getDStarNetworkEnabled()) {
|
if (m_dstarEnabled && m_conf.getDStarNetworkEnabled()) {
|
||||||
ret = createDStarNetwork();
|
ret = createDStarNetwork();
|
||||||
if (!ret)
|
if (!ret)
|
||||||
@@ -488,6 +490,8 @@ int CMMDVMHost::run()
|
|||||||
m_dmrLookup->read();
|
m_dmrLookup->read();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LogInfo("Starting protocol handlers");
|
||||||
|
|
||||||
CStopWatch stopWatch;
|
CStopWatch stopWatch;
|
||||||
stopWatch.start();
|
stopWatch.start();
|
||||||
|
|
||||||
@@ -765,7 +769,7 @@ int CMMDVMHost::run()
|
|||||||
|
|
||||||
setMode(MODE_IDLE);
|
setMode(MODE_IDLE);
|
||||||
|
|
||||||
LogMessage("MMDVMHost-%s is running", VERSION);
|
LogInfo("MMDVMHost-%s is running", VERSION);
|
||||||
|
|
||||||
while (!m_killed) {
|
while (!m_killed) {
|
||||||
bool lockout = m_modem->hasLockout();
|
bool lockout = m_modem->hasLockout();
|
||||||
@@ -1307,18 +1311,14 @@ int CMMDVMHost::run()
|
|||||||
|
|
||||||
setMode(MODE_QUIT);
|
setMode(MODE_QUIT);
|
||||||
|
|
||||||
m_modem->close();
|
|
||||||
delete m_modem;
|
|
||||||
|
|
||||||
m_display->close();
|
|
||||||
delete m_display;
|
|
||||||
|
|
||||||
if (m_dmrLookup != NULL)
|
if (m_dmrLookup != NULL)
|
||||||
m_dmrLookup->stop();
|
m_dmrLookup->stop();
|
||||||
|
|
||||||
if (m_nxdnLookup != NULL)
|
if (m_nxdnLookup != NULL)
|
||||||
m_nxdnLookup->stop();
|
m_nxdnLookup->stop();
|
||||||
|
|
||||||
|
LogInfo("Closing network connections");
|
||||||
|
|
||||||
if (m_dstarNetwork != NULL) {
|
if (m_dstarNetwork != NULL) {
|
||||||
m_dstarNetwork->close();
|
m_dstarNetwork->close();
|
||||||
delete m_dstarNetwork;
|
delete m_dstarNetwork;
|
||||||
@@ -1374,6 +1374,8 @@ int CMMDVMHost::run()
|
|||||||
delete m_remoteControl;
|
delete m_remoteControl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LogInfo("Stopping protocol handlers");
|
||||||
|
|
||||||
delete m_dstar;
|
delete m_dstar;
|
||||||
delete m_dmr;
|
delete m_dmr;
|
||||||
delete m_ysf;
|
delete m_ysf;
|
||||||
@@ -1384,6 +1386,14 @@ int CMMDVMHost::run()
|
|||||||
delete m_fm;
|
delete m_fm;
|
||||||
delete m_ax25;
|
delete m_ax25;
|
||||||
|
|
||||||
|
LogInfo("MMDVMHost-%s has stopped", VERSION);
|
||||||
|
|
||||||
|
m_modem->close();
|
||||||
|
delete m_modem;
|
||||||
|
|
||||||
|
m_display->close();
|
||||||
|
delete m_display;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user