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:
Daniel Caujolle-Bert
2025-05-29 18:29:42 +02:00
parent b26e8c3f2f
commit 7d2da549c2
9 changed files with 498 additions and 242 deletions

View File

@@ -759,6 +759,9 @@ void CP25Control::clock(unsigned int ms)
if (m_network != nullptr)
writeNetwork();
if (!m_enabled)
return;
m_rfTimeout.clock(ms);
m_netTimeout.clock(ms);
@@ -1249,11 +1252,33 @@ void CP25Control::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_rfTimeout.isRunning()) {
LogMessage("P25, RF user has timed out");
}
break;
}
m_rfState = RPT_RF_STATE::LISTENING;
m_rfTimeout.stop();
m_rfData.reset();
// Reset the networking section
switch(m_netState) {
case RPT_NET_STATE::IDLE:
break;
default:
if (m_netTimeout.isRunning()) {
LogMessage("P25, network user has timed out");
}
break;
}
m_netTimeout.stop();
m_networkWatchdog.stop();
m_netData.reset();