mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 15:09:23 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user