T_runProc::bl_isUp(): fix check for "02:65:30:df:83:03".
This commit is contained in:
parent
04055e9607
commit
b7449ff4a2
@ -684,6 +684,7 @@ bool T_runProc::bl_isUp(void)
|
|||||||
|
|
||||||
for (nn=0; nn<160; nn++) receivedData[nn]=0;
|
for (nn=0; nn<160; nn++) receivedData[nn]=0;
|
||||||
LL=epi_getRawRecLength();
|
LL=epi_getRawRecLength();
|
||||||
|
|
||||||
if (LL>0)
|
if (LL>0)
|
||||||
{
|
{
|
||||||
epi_getRawReceivedData(receivedData);
|
epi_getRawReceivedData(receivedData);
|
||||||
@ -696,15 +697,26 @@ bool T_runProc::bl_isUp(void)
|
|||||||
//epi_clrRawReceivedString();
|
//epi_clrRawReceivedString();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// response to "start BL"
|
|
||||||
if (receivedData[0]==2 && receivedData[1]==101 && receivedData[2]==48 &&
|
// response to "start BL" { 2, 101, 48, 223, 131, 3}
|
||||||
receivedData[3]==223 && receivedData[4] ==131 )
|
static uint8_t const cmp[6] = {0x02, 0x65, 0x30, 0xdf, 0x83, 0x03};
|
||||||
{
|
|
||||||
qDebug() << "hwapi_bl_isUp: got BL response to start";
|
if (LL >= 6 && LL <= 13) {
|
||||||
//epi_clrRawReceivedString();
|
// (1) "02:63:34:35:62:33:03:02:65:30:df:83:03"
|
||||||
|
// (2) "02:65:30:df:83:03"
|
||||||
|
|
||||||
|
// qCritical() << "(" << __func__ << ":" << __LINE__
|
||||||
|
// << ") CHECK" << QByteArray((char const*)receivedData, LL).toHex(':');
|
||||||
|
|
||||||
|
for (int i=0; i <= LL-6; ++i) {
|
||||||
|
if (memcmp(cmp, &receivedData[i], 6) == 0) {
|
||||||
|
qCritical() << "(" << __func__ << ":" << __LINE__
|
||||||
|
<< ") BL RESPONSE to bl_start(): BOOTLOADER IS UP";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user