Alter the mode timer reset behaviour when already in that mode.
This commit is contained in:
parent
c7effe5e2d
commit
e344fc5b56
2 changed files with 19 additions and 13 deletions
|
@ -784,7 +784,8 @@ int CMMDVMHost::run()
|
||||||
setMode(MODE_DSTAR);
|
setMode(MODE_DSTAR);
|
||||||
}
|
}
|
||||||
} else if (m_mode == MODE_DSTAR) {
|
} else if (m_mode == MODE_DSTAR) {
|
||||||
m_dstar->writeModem(data, len);
|
bool ret = m_dstar->writeModem(data, len);
|
||||||
|
if (ret)
|
||||||
m_modeTimer.start();
|
m_modeTimer.start();
|
||||||
} else if (m_mode != MODE_LOCKOUT) {
|
} else if (m_mode != MODE_LOCKOUT) {
|
||||||
LogWarning("D-Star modem data received when in mode %u", m_mode);
|
LogWarning("D-Star modem data received when in mode %u", m_mode);
|
||||||
|
@ -874,7 +875,8 @@ int CMMDVMHost::run()
|
||||||
setMode(MODE_YSF);
|
setMode(MODE_YSF);
|
||||||
}
|
}
|
||||||
} else if (m_mode == MODE_YSF) {
|
} else if (m_mode == MODE_YSF) {
|
||||||
m_ysf->writeModem(data, len);
|
bool ret = m_ysf->writeModem(data, len);
|
||||||
|
if (ret)
|
||||||
m_modeTimer.start();
|
m_modeTimer.start();
|
||||||
} else if (m_mode != MODE_LOCKOUT) {
|
} else if (m_mode != MODE_LOCKOUT) {
|
||||||
LogWarning("System Fusion modem data received when in mode %u", m_mode);
|
LogWarning("System Fusion modem data received when in mode %u", m_mode);
|
||||||
|
@ -890,7 +892,8 @@ int CMMDVMHost::run()
|
||||||
setMode(MODE_P25);
|
setMode(MODE_P25);
|
||||||
}
|
}
|
||||||
} else if (m_mode == MODE_P25) {
|
} else if (m_mode == MODE_P25) {
|
||||||
m_p25->writeModem(data, len);
|
bool ret = m_p25->writeModem(data, len);
|
||||||
|
if (ret)
|
||||||
m_modeTimer.start();
|
m_modeTimer.start();
|
||||||
} else if (m_mode != MODE_LOCKOUT) {
|
} else if (m_mode != MODE_LOCKOUT) {
|
||||||
LogWarning("P25 modem data received when in mode %u", m_mode);
|
LogWarning("P25 modem data received when in mode %u", m_mode);
|
||||||
|
@ -906,7 +909,8 @@ int CMMDVMHost::run()
|
||||||
setMode(MODE_NXDN);
|
setMode(MODE_NXDN);
|
||||||
}
|
}
|
||||||
} else if (m_mode == MODE_NXDN) {
|
} else if (m_mode == MODE_NXDN) {
|
||||||
m_nxdn->writeModem(data, len);
|
bool ret = m_nxdn->writeModem(data, len);
|
||||||
|
if (ret)
|
||||||
m_modeTimer.start();
|
m_modeTimer.start();
|
||||||
} else if (m_mode != MODE_LOCKOUT) {
|
} else if (m_mode != MODE_LOCKOUT) {
|
||||||
LogWarning("NXDN modem data received when in mode %u", m_mode);
|
LogWarning("NXDN modem data received when in mode %u", m_mode);
|
||||||
|
@ -922,7 +926,8 @@ int CMMDVMHost::run()
|
||||||
setMode(MODE_M17);
|
setMode(MODE_M17);
|
||||||
}
|
}
|
||||||
} else if (m_mode == MODE_M17) {
|
} else if (m_mode == MODE_M17) {
|
||||||
m_m17->writeModem(data, len);
|
bool ret = m_m17->writeModem(data, len);
|
||||||
|
if (ret)
|
||||||
m_modeTimer.start();
|
m_modeTimer.start();
|
||||||
} else if (m_mode != MODE_LOCKOUT) {
|
} else if (m_mode != MODE_LOCKOUT) {
|
||||||
LogWarning("M17 modem data received when in mode %u", m_mode);
|
LogWarning("M17 modem data received when in mode %u", m_mode);
|
||||||
|
@ -938,7 +943,8 @@ int CMMDVMHost::run()
|
||||||
setMode(MODE_FM);
|
setMode(MODE_FM);
|
||||||
}
|
}
|
||||||
} else if (m_mode == MODE_FM) {
|
} else if (m_mode == MODE_FM) {
|
||||||
m_fm->writeModem(data, len);
|
bool ret = m_fm->writeModem(data, len);
|
||||||
|
if (ret)
|
||||||
m_modeTimer.start();
|
m_modeTimer.start();
|
||||||
} else if (m_mode != MODE_LOCKOUT) {
|
} else if (m_mode != MODE_LOCKOUT) {
|
||||||
LogWarning("FM modem data received when in mode %u", m_mode);
|
LogWarning("FM modem data received when in mode %u", m_mode);
|
||||||
|
|
|
@ -19,6 +19,6 @@
|
||||||
#if !defined(VERSION_H)
|
#if !defined(VERSION_H)
|
||||||
#define VERSION_H
|
#define VERSION_H
|
||||||
|
|
||||||
const char* VERSION = "20210525";
|
const char* VERSION = "20210618";
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue