fix bugs
This commit is contained in:
parent
daff0f7435
commit
cbfc5b2794
@ -1186,8 +1186,8 @@ std::string JsonData::JsonCmd_Cgi_65(Param_65 ¶m){
|
||||
std::vector<std::string> vRssi;
|
||||
boost::split(vRssi, vetRes[i][2], boost::is_any_of(","), boost::token_compress_on);
|
||||
if (vRssi.size() > 0 ){
|
||||
iTem.append(vRssi[0]);
|
||||
iTem.append(vRssi[1]);
|
||||
iTem.append(atof(vRssi[0].c_str())/float(255));
|
||||
iTem.append(atof(vRssi[1].c_str())/float(255));
|
||||
}
|
||||
|
||||
jsBody.append(iTem);
|
||||
|
||||
@ -170,7 +170,7 @@ void Uart::WriteTranTimeout2Zigbee(unsigned char Time) {
|
||||
|
||||
unsigned short tmp = GlobalConfig::Zigbee_G.MyAddr;
|
||||
GlobalConfig::Zigbee_G.PowerLevel = 0x03;
|
||||
GlobalConfig::Zigbee_G.RetryNum = 0x64;
|
||||
GlobalConfig::Zigbee_G.RetryNum = 0x05;
|
||||
GlobalConfig::Zigbee_G.TranTimeout = Time;
|
||||
modify_info(tmp, (char *)&GlobalConfig::Zigbee_G);
|
||||
|
||||
|
||||
@ -156,6 +156,10 @@ int Uart::DealDataNodeFeature(const char *pData, int flag) {
|
||||
std::vector<uint8_t>& data_vec = map_send_data[u_short_addr];
|
||||
const uint8_t* send_data = data_vec.data();
|
||||
WriteToUart((const char*)send_data, 100);
|
||||
mssleep(50000);
|
||||
WriteToUart((const char*)send_data, 100);
|
||||
mssleep(50000);
|
||||
WriteToUart((const char*)send_data, 100);
|
||||
return -3;
|
||||
}
|
||||
memset(whereCon, 0x00, sizeof(whereCon));
|
||||
|
||||
@ -589,17 +589,16 @@ int Uart::TaskResp(ScheduleTask scheduleTask){
|
||||
tmp += send_data[k];
|
||||
}
|
||||
send_data[99] = tmp;
|
||||
if (scheduleTask.cmd != REVIVE_DURATION)
|
||||
if (scheduleTask.cmd == REVIVE_DURATION)
|
||||
{
|
||||
mssleep(50000);
|
||||
WriteToUart((const char*)send_data, 100);
|
||||
mssleep(50000);
|
||||
WriteToUart((const char*)send_data, 100);
|
||||
}else {
|
||||
map_send_data[scheduleTask.shortAddr] = std::vector<uint8_t>(send_data, send_data + 100);
|
||||
}
|
||||
mssleep(50000);
|
||||
WriteToUart((const char*)send_data, 100);
|
||||
mssleep(50000);
|
||||
WriteToUart((const char*)send_data, 100);
|
||||
mssleep(50000);
|
||||
WriteToUart((const char*)send_data, 100);
|
||||
|
||||
int iRet = CheckZigbeeACK();
|
||||
if (iRet == 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user