Check the size of the getStatus return message.
This commit is contained in:
parent
7ed8c9a214
commit
ca15dca23d
1 changed files with 5 additions and 0 deletions
|
@ -487,6 +487,11 @@ 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) {
|
||||||
|
LogError("The length of the getStatus from the modem is too short, maybe the firmware is out of date?");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
m_tx = (m_buffer[5U] & 0x01U) == 0x01U;
|
m_tx = (m_buffer[5U] & 0x01U) == 0x01U;
|
||||||
|
|
||||||
bool adcOverflow = (m_buffer[5U] & 0x02U) == 0x02U;
|
bool adcOverflow = (m_buffer[5U] & 0x02U) == 0x02U;
|
||||||
|
|
Loading…
Reference in a new issue