mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-05 14:35:31 +00: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:
parent
b26e8c3f2f
commit
7d2da549c2
9 changed files with 498 additions and 242 deletions
|
|
@ -989,6 +989,9 @@ void CNXDNControl::clock(unsigned int ms)
|
|||
if (m_network != nullptr)
|
||||
writeNetwork();
|
||||
|
||||
if (!m_enabled)
|
||||
return;
|
||||
|
||||
m_rfTimeoutTimer.clock(ms);
|
||||
m_netTimeoutTimer.clock(ms);
|
||||
|
||||
|
|
@ -1117,6 +1120,18 @@ void CNXDNControl::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("NXDN, RF user has timed out");
|
||||
}
|
||||
break;
|
||||
}
|
||||
m_rfState = RPT_RF_STATE::LISTENING;
|
||||
|
||||
m_rfMask = 0x00U;
|
||||
|
|
@ -1125,6 +1140,16 @@ void CNXDNControl::enable(bool enabled)
|
|||
m_rfTimeoutTimer.stop();
|
||||
|
||||
// Reset the networking section
|
||||
switch(m_netState) {
|
||||
case RPT_NET_STATE::IDLE:
|
||||
break;
|
||||
|
||||
default:
|
||||
if (m_netTimeoutTimer.isRunning()) {
|
||||
LogMessage("NXDN, network user has timed out");
|
||||
}
|
||||
break;
|
||||
}
|
||||
m_netState = RPT_NET_STATE::IDLE;
|
||||
|
||||
m_netMask = 0x00U;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue