mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
Allow for older firmwares to report their statuses.
This commit is contained in:
11
Modem.cpp
11
Modem.cpp
@@ -487,10 +487,9 @@ void CModem::clock(unsigned int ms)
|
|||||||
// if (m_trace)
|
// if (m_trace)
|
||||||
// CUtils::dump(1U, "GET_STATUS", m_buffer, m_length);
|
// CUtils::dump(1U, "GET_STATUS", m_buffer, m_length);
|
||||||
|
|
||||||
if (m_length < 13U) {
|
m_p25Space = 0U;
|
||||||
LogError("The length of the getStatus from the modem is too short, maybe the firmware is out of date?");
|
m_nxdnSpace = 0U;
|
||||||
break;
|
m_pocsagSpace = 0U;
|
||||||
}
|
|
||||||
|
|
||||||
m_tx = (m_buffer[5U] & 0x01U) == 0x01U;
|
m_tx = (m_buffer[5U] & 0x01U) == 0x01U;
|
||||||
|
|
||||||
@@ -518,8 +517,12 @@ void CModem::clock(unsigned int ms)
|
|||||||
m_dmrSpace1 = m_buffer[7U];
|
m_dmrSpace1 = m_buffer[7U];
|
||||||
m_dmrSpace2 = m_buffer[8U];
|
m_dmrSpace2 = m_buffer[8U];
|
||||||
m_ysfSpace = m_buffer[9U];
|
m_ysfSpace = m_buffer[9U];
|
||||||
|
|
||||||
|
if (m_length > 10U)
|
||||||
m_p25Space = m_buffer[10U];
|
m_p25Space = m_buffer[10U];
|
||||||
|
if (m_length > 11U)
|
||||||
m_nxdnSpace = m_buffer[11U];
|
m_nxdnSpace = m_buffer[11U];
|
||||||
|
if (m_length > 12U)
|
||||||
m_pocsagSpace = m_buffer[12U];
|
m_pocsagSpace = m_buffer[12U];
|
||||||
|
|
||||||
m_inactivityTimer.start();
|
m_inactivityTimer.start();
|
||||||
|
|||||||
Reference in New Issue
Block a user