mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-20 22:45:44 +08:00
CDMRSlot::clock(),
CDStarControl::clock(),
CM17Control::clock(),
CNXDNControl::clock(),
CP25Control::clock(),
CYSFControl::clock():
- Leave ASAP when it's disabled.
CDMRSlot::enable(),
CDStarControl::enable(),
CM17Control::enable(),
CNXDNControl::enable(),
CP25Control::enable(),
CYSFControl::enable():
- Log a message when Controller get disabled while running, "<MODE>, RF user has timed out" or "<MODE>, network user has timed out", depending of the RF/Net state.
CMMDVMHost::run():
- After getting the modem data, don't handle it (read/write<Controler>, etc) if the given mode is not enabled.
MMDVMHost:
- Rename CMMDVMHost::processEnableCommand() to CMMDVMHost::enableModemMode().
- Add CMMDVMHost::enableMode() and CMMDVMHost::disableMode(), called now from CMMDVMHost::remoteControl(), which clarify the code.
- CMMDVMHost::remoteControl():
* Fix indentation,
* Simplify ENABLE_x/DISABLE_x cases code.
- CMMDVMHost::setMode():
* Enable pocsag network only if m_pocsagEnabled is true,
* Enable ax25 network only if m_ax25Enabled is true (not m_fmEnabled).
This commit is contained in:
27
DMRSlot.cpp
27
DMRSlot.cpp
@@ -1870,6 +1870,9 @@ void CDMRSlot::clock()
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_enabled)
|
||||
return;
|
||||
|
||||
if ((m_netState == RPT_NET_STATE::AUDIO) || (m_netState == RPT_NET_STATE::DATA)) {
|
||||
m_networkWatchdog.clock(ms);
|
||||
|
||||
@@ -2238,6 +2241,19 @@ void CDMRSlot::enable(bool enabled)
|
||||
m_queue.clear();
|
||||
|
||||
// Reset the RF section
|
||||
switch (m_rfState) {
|
||||
case RPT_RF_STATE::LISTENING:
|
||||
case RPT_RF_STATE::REJECTED:
|
||||
case RPT_RF_STATE::INVALID:
|
||||
break;
|
||||
|
||||
default:
|
||||
if (m_rfTimeoutTimer.isRunning()) {
|
||||
if (!m_rfTimeout)
|
||||
LogMessage("DMR Slot %u, RF user has timed out", m_slotNo);
|
||||
}
|
||||
break;
|
||||
}
|
||||
m_rfState = RPT_RF_STATE::LISTENING;
|
||||
|
||||
m_rfTimeoutTimer.stop();
|
||||
@@ -2254,6 +2270,17 @@ void CDMRSlot::enable(bool enabled)
|
||||
m_rfLC = nullptr;
|
||||
|
||||
// Reset the networking section
|
||||
switch(m_netState) {
|
||||
case RPT_NET_STATE::IDLE:
|
||||
break;
|
||||
|
||||
default:
|
||||
if (m_netTimeoutTimer.isRunning()) {
|
||||
if (!m_netTimeout)
|
||||
LogMessage("DMR Slot %u, network user has timed out", m_slotNo);
|
||||
}
|
||||
break;
|
||||
}
|
||||
m_netState = RPT_NET_STATE::IDLE;
|
||||
|
||||
m_lastFrameValid = false;
|
||||
|
||||
Reference in New Issue
Block a user