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

@@ -834,6 +834,9 @@ void CDStarControl::clock()
if (m_network != nullptr)
writeNetwork();
if (!m_enabled)
return;
m_ackTimer.clock(ms);
if (m_ackTimer.isRunning() && m_ackTimer.hasExpired()) {
sendAck();
@@ -1299,11 +1302,33 @@ void CDStarControl::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()) {
LogMessage("D-Star, RF user has timed out");
}
break;
}
m_rfState = RPT_RF_STATE::LISTENING;
m_rfTimeoutTimer.stop();
// Reset the networking section
switch(m_netState) {
case RPT_NET_STATE::IDLE:
break;
default:
if (m_netTimeoutTimer.isRunning()) {
LogMessage("D-Star, network user has timed out");
}
break;
}
m_netState = RPT_NET_STATE::IDLE;
m_lastFrameValid = false;