优化逻辑
This commit is contained in:
parent
d86a2b1d7b
commit
8c50f65b79
@ -1181,6 +1181,11 @@ std::string JsonData::JsonCmd_Cgi_65(Param_65 ¶m){
|
|||||||
}
|
}
|
||||||
std::vector<std::string> vRssi;
|
std::vector<std::string> vRssi;
|
||||||
boost::split(vRssi, vetRes[i][2], boost::is_any_of(","), boost::token_compress_on);
|
boost::split(vRssi, vetRes[i][2], boost::is_any_of(","), boost::token_compress_on);
|
||||||
|
if (vRssi.size() > 0 ){
|
||||||
|
iTem.append(atof(vRssi[0].c_str())/float(255));
|
||||||
|
iTem.append(atof(vRssi[1].c_str())/float(255));
|
||||||
|
}
|
||||||
|
|
||||||
jsBody.append(iTem);
|
jsBody.append(iTem);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -170,7 +170,7 @@ void Uart::WriteTranTimeout2Zigbee(unsigned char Time) {
|
|||||||
|
|
||||||
unsigned short tmp = GlobalConfig::Zigbee_G.MyAddr;
|
unsigned short tmp = GlobalConfig::Zigbee_G.MyAddr;
|
||||||
GlobalConfig::Zigbee_G.PowerLevel = 0x03;
|
GlobalConfig::Zigbee_G.PowerLevel = 0x03;
|
||||||
GlobalConfig::Zigbee_G.RetryNum = 0x64;
|
GlobalConfig::Zigbee_G.RetryNum = 0x0A;
|
||||||
GlobalConfig::Zigbee_G.TranTimeout = Time;
|
GlobalConfig::Zigbee_G.TranTimeout = Time;
|
||||||
modify_info(tmp, (char *)&GlobalConfig::Zigbee_G);
|
modify_info(tmp, (char *)&GlobalConfig::Zigbee_G);
|
||||||
|
|
||||||
|
|||||||
@ -588,17 +588,16 @@ int Uart::TaskResp(ScheduleTask scheduleTask){
|
|||||||
tmp += send_data[k];
|
tmp += send_data[k];
|
||||||
}
|
}
|
||||||
send_data[99] = tmp;
|
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);
|
map_send_data[scheduleTask.shortAddr] = std::vector<uint8_t>(send_data, send_data + 100);
|
||||||
}
|
}
|
||||||
mssleep(50000);
|
mssleep(50000);
|
||||||
WriteToUart((const char*)send_data, 100);
|
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();
|
int iRet = CheckZigbeeACK();
|
||||||
if (iRet == 0) {
|
if (iRet == 0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user