fix bugs
This commit is contained in:
parent
589874215e
commit
b8c1c34797
@ -450,6 +450,7 @@ bool SensorScheduler::MissedWave(uint16_t short_addr) {
|
||||
}
|
||||
|
||||
void SensorScheduler::WaveSuccess(uint16_t short_addr) {
|
||||
zlog_warn(zct, "[WaveSuccess][%x]", short_addr);
|
||||
success_set_.insert(short_addr);
|
||||
auto iter = failure_map_.find(short_addr);
|
||||
if (iter != failure_map_.end()) {
|
||||
|
||||
@ -611,6 +611,8 @@ void Uart::DealRecvData(const char *pData) {
|
||||
DealWaveCompress(pData,ushortAdd);
|
||||
break;
|
||||
case UPGRADE_ASK:
|
||||
ModifyDistAddr(ushortAdd);
|
||||
mssleep(50000);
|
||||
taskID = scheduler::instance().StartSchedule(ushortAdd,next_duration, next_task_id);
|
||||
taskID = kScheduleUpgrade;
|
||||
if (taskID == kScheduleUpgrade){
|
||||
|
||||
@ -52,7 +52,7 @@ void Uart::UpdateWirelessNode(uint16_t shortAdd) {
|
||||
GetTimeNet(localtimestamp, 1);
|
||||
char insertSql[100] = {0};
|
||||
char wherecon[100] = {0};
|
||||
sprintf(wherecon," short_Addr = '%02x%02x' and status = 3 order by start_timestamp DESC",UINT16_HIGH(shortAdd), UINT16_LOW(shortAdd));
|
||||
sprintf(wherecon," short_Addr = '%02x%02x' and status = 3 and start_timestamp > ( SELECT MAX(submit_timestamp) FROM firmware_upgrade ) order by start_timestamp DESC",UINT16_HIGH(shortAdd), UINT16_LOW(shortAdd));
|
||||
std::string spend_count = sqlite_db_ctrl::instance().GetData(" firmware_upgrade ","spend_count",wherecon);
|
||||
if (atoi(spend_count.c_str()) >= 10){
|
||||
zlog_warn(zbt, "UpdateWirelessNode spend_count %d,shortAddr = %02x%02x", atoi(spend_count.c_str()), UINT16_HIGH(shortAdd), UINT16_LOW(shortAdd));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user