fix bugs
This commit is contained in:
parent
466cbdaca0
commit
53a94037cf
@ -18,7 +18,7 @@ enum enumZigBeeTransmitStatus {
|
|||||||
|
|
||||||
|
|
||||||
//#define NR5G_MODULE
|
//#define NR5G_MODULE
|
||||||
//#define Q4G_MODULE
|
#define Q4G_MODULE
|
||||||
//#define WIFI_MODULE
|
//#define WIFI_MODULE
|
||||||
//#define NR5G_MEIGE
|
//#define NR5G_MEIGE
|
||||||
|
|
||||||
|
|||||||
@ -147,6 +147,13 @@ int SensorScheduler::StartSchedule(int short_addr, int &next_duration, int &next
|
|||||||
// wrong time to come
|
// wrong time to come
|
||||||
long available_ts = current_wave_start_ts_ + (nth_eigen_value_slice_ + 1) * eigen_value_send_interval_ + (id - 1) * eigen_value_send_duration_;
|
long available_ts = current_wave_start_ts_ + (nth_eigen_value_slice_ + 1) * eigen_value_send_interval_ + (id - 1) * eigen_value_send_duration_;
|
||||||
next_duration = available_ts - current_ts_;
|
next_duration = available_ts - current_ts_;
|
||||||
|
if (next_duration < 0 || next_duration > eigen_value_send_interval_) {
|
||||||
|
zlog_warn(zct, "[Nxt] exception duration: %d", next_duration);
|
||||||
|
next_duration = eigen_value_send_interval_;
|
||||||
|
}else if(next_duration < 15){
|
||||||
|
zlog_warn(zct, "[Nxt] exception duration: %d", next_duration);
|
||||||
|
next_duration = 15;
|
||||||
|
}
|
||||||
next_task_id = kScheduleEigenValue;
|
next_task_id = kScheduleEigenValue;
|
||||||
zlog_warn(zct, "[%d:%x] wrong time in wave slice, next feature send utc time:[%s], duration:%d", id, short_addr, GetUTCTime(available_ts).c_str(), next_duration);
|
zlog_warn(zct, "[%d:%x] wrong time in wave slice, next feature send utc time:[%s], duration:%d", id, short_addr, GetUTCTime(available_ts).c_str(), next_duration);
|
||||||
return kScheduleResultNone;
|
return kScheduleResultNone;
|
||||||
@ -312,9 +319,9 @@ int SensorScheduler::GetNextDuration(int short_addr, int &next_task_id) {
|
|||||||
if (duration < 0 || duration > eigen_value_send_interval_) {
|
if (duration < 0 || duration > eigen_value_send_interval_) {
|
||||||
zlog_warn(zct, "[Nxt] exception duration: %d", duration);
|
zlog_warn(zct, "[Nxt] exception duration: %d", duration);
|
||||||
duration = eigen_value_send_interval_;
|
duration = eigen_value_send_interval_;
|
||||||
}else if(duration < 9){
|
}else if(duration < 15){
|
||||||
zlog_warn(zct, "[Nxt] exception duration: %d", duration);
|
zlog_warn(zct, "[Nxt] exception duration: %d", duration);
|
||||||
duration = 10;
|
duration = 15;
|
||||||
}
|
}
|
||||||
zlog_warn(zct, "[Nxt] [%d:%x] next duration: %d, taskid: %d", id, short_addr, duration, next_task_id);
|
zlog_warn(zct, "[Nxt] [%d:%x] next duration: %d, taskid: %d", id, short_addr, duration, next_task_id);
|
||||||
return duration;
|
return duration;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user