fix bugs
This commit is contained in:
parent
67151d7a47
commit
9922533251
@ -510,20 +510,7 @@ void Uart::DealRecvData(const char *pData) {
|
||||
uint16_t ushortAdd = BUILD_UINT16(pData[3] & 0xFF, pData[4] & 0xFF);
|
||||
uint8_t command = pData[5] & 0xFF;
|
||||
uint8_t recvcode = pData[7] & 0xFF;
|
||||
|
||||
char whereCon[100] = {0};
|
||||
sprintf(whereCon, "zigbeeShortAddr='%02x%02x'", UINT16_HIGH(ushortAdd),UINT16_LOW(ushortAdd));
|
||||
zlog_info(zct, "whereCon = %s", whereCon);
|
||||
array_t vecRes = sqlite_db_ctrl::instance().GetDataMultiLine(T_SENSOR_INFO(TNAME), " dataNodeNo, MeasurementID,hardVersion,softVersion", whereCon);
|
||||
zlog_info(zct, "vecRes = %d", vecRes.size());
|
||||
// if(vecRes.size() == 0){
|
||||
// zlog_warn(zct, "device info not found %02x%02x ", UINT16_HIGH(ushortAdd),UINT16_LOW(ushortAdd));
|
||||
// return;
|
||||
// }
|
||||
std::string hardVersion = vecRes[0][2];
|
||||
std::string softVersion = vecRes[0][3];
|
||||
zlog_info(zct, "shortAdd = %02x%02x,command = %d ",UINT16_HIGH(ushortAdd),UINT16_LOW(ushortAdd),command);
|
||||
zlog_info(zct, "hardVersion1 = %s,softVersion2 = %s ",hardVersion.c_str(),softVersion.c_str());
|
||||
|
||||
|
||||
switch (command) {
|
||||
case DEVICE_INF:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user