This commit is contained in:
zhangsheng 2025-03-22 15:31:59 +08:00
parent 67151d7a47
commit 9922533251

View File

@ -511,19 +511,6 @@ void Uart::DealRecvData(const char *pData) {
uint8_t command = pData[5] & 0xFF; uint8_t command = pData[5] & 0xFF;
uint8_t recvcode = pData[7] & 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) { switch (command) {
case DEVICE_INF: case DEVICE_INF: