fix bugs
This commit is contained in:
parent
8cc3cb10b7
commit
725b3ade9e
@ -26,7 +26,6 @@ int SensorScheduler::StartSchedule(uint16_t short_addr, int &next_duration, bool
|
|||||||
} else {
|
} else {
|
||||||
id = iter->second;
|
id = iter->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
current_ts_ = GetLocalTs();
|
current_ts_ = GetLocalTs();
|
||||||
CleanIdleOccupiedSet(current_ts_);
|
CleanIdleOccupiedSet(current_ts_);
|
||||||
|
|
||||||
@ -36,11 +35,9 @@ int SensorScheduler::StartSchedule(uint16_t short_addr, int &next_duration, bool
|
|||||||
nth_eigen_value_slice_ = seconds_in_current_wave_slice_ / eigen_value_send_interval_;
|
nth_eigen_value_slice_ = seconds_in_current_wave_slice_ / eigen_value_send_interval_;
|
||||||
seconds_in_current_eigen_slice_ = seconds_in_current_wave_slice_ % eigen_value_send_interval_;
|
seconds_in_current_eigen_slice_ = seconds_in_current_wave_slice_ % eigen_value_send_interval_;
|
||||||
ts_in_eigen_slice_ = false;
|
ts_in_eigen_slice_ = false;
|
||||||
|
|
||||||
if (seconds_in_current_eigen_slice_ < 60 - 3) {
|
if (seconds_in_current_eigen_slice_ < 60 - 3) {
|
||||||
ts_in_eigen_slice_ = true;
|
ts_in_eigen_slice_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ts_in_eigen_slice_) {
|
if (ts_in_eigen_slice_) {
|
||||||
nth_eigen_slice_ = (seconds_in_current_eigen_slice_ + 2) / eigen_value_send_duration_;
|
nth_eigen_slice_ = (seconds_in_current_eigen_slice_ + 2) / eigen_value_send_duration_;
|
||||||
if (nth_eigen_value_slice_ == 0) {
|
if (nth_eigen_value_slice_ == 0) {
|
||||||
|
|||||||
@ -349,11 +349,14 @@ int Uart::DealAskTask(uint16_t ushortAdd){
|
|||||||
zlog_warn(zct, "device info not found %02x%02x ", UINT16_HIGH(ushortAdd),UINT16_LOW(ushortAdd));
|
zlog_warn(zct, "device info not found %02x%02x ", UINT16_HIGH(ushortAdd),UINT16_LOW(ushortAdd));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
int next_duration = 0,next_task_id = 0;
|
int next_task_id = 0;
|
||||||
int taskID;
|
int taskID;
|
||||||
ScheduleTask scheduleTask;
|
ScheduleTask scheduleTask;
|
||||||
bool z = false;
|
bool z = false;
|
||||||
taskID = scheduler::instance().StartSchedule(ushortAdd,next_duration,z, next_task_id);
|
//taskID = scheduler::instance().StartSchedule(ushortAdd,next_duration,z, next_task_id);
|
||||||
|
uint16_t next_duration = scheduler::instance().GetNextDuration(ushortAdd,z,next_task_id);
|
||||||
|
zlog_info(zct, "next_duration = %d next_taskID = %d,z = %d", next_duration,next_task_id,z);
|
||||||
|
|
||||||
current_z = z;
|
current_z = z;
|
||||||
zlog_info(zct, "taskID = %d next_duration = %d next_task_id = %d,current_z = %d", taskID, next_duration, next_task_id,current_z);
|
zlog_info(zct, "taskID = %d next_duration = %d next_task_id = %d,current_z = %d", taskID, next_duration, next_task_id,current_z);
|
||||||
if (taskID == kScheduleConfigSensor)
|
if (taskID == kScheduleConfigSensor)
|
||||||
@ -386,7 +389,6 @@ int Uart::DealAskTask(uint16_t ushortAdd){
|
|||||||
scheduleTask.next_taskID = UPGRADE;
|
scheduleTask.next_taskID = UPGRADE;
|
||||||
TaskResp(scheduleTask);
|
TaskResp(scheduleTask);
|
||||||
}
|
}
|
||||||
DealReviveDuration(ushortAdd);
|
|
||||||
// if (next_task_id == kScheduleEigenValue) //1.特征值
|
// if (next_task_id == kScheduleEigenValue) //1.特征值
|
||||||
// {
|
// {
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user