add codes.
This commit is contained in:
parent
b54613bed1
commit
f420b5945a
@ -419,15 +419,15 @@ long SensorScheduler::CalcNextTimestamp(int id, uint16_t short_addr, bool &z, in
|
|||||||
return GetDebugUpgradeNextTS(short_addr);
|
return GetDebugUpgradeNextTS(short_addr);
|
||||||
} else {
|
} else {
|
||||||
// 计算发送波形是否在后面的波形时间窗口中
|
// 计算发送波形是否在后面的波形时间窗口中
|
||||||
int nth_wave_slice = nth_eigen_value_slice_ * wave_slice_num_per_eigen_interval_ + nth_wave_slice_ + 2;
|
// int nth_wave_slice = nth_eigen_value_slice_ * wave_slice_num_per_eigen_interval_ + nth_wave_slice_ + 2;
|
||||||
for (int i = nth_wave_slice; i <= nth_wave_slice + wave_slice_num_per_eigen_interval_; ++i) {
|
// for (int i = nth_wave_slice; i <= nth_wave_slice + wave_slice_num_per_eigen_interval_; ++i) {
|
||||||
if (debug_slice_sensor_id_[i] == short_addr) {
|
// if (debug_slice_sensor_id_[i] == short_addr) {
|
||||||
long nxt_ts = current_wave_start_ts_ + nth_eigen_value_slice_ * eigen_value_send_interval_ + 60 + (i-nth_eigen_value_slice_ * wave_slice_num_per_eigen_interval_-1)*60;
|
// long nxt_ts = current_wave_start_ts_ + nth_eigen_value_slice_ * eigen_value_send_interval_ + 60 + (i-nth_eigen_value_slice_ * wave_slice_num_per_eigen_interval_-1)*60;
|
||||||
next_task_id = kScheduleWaveForm;
|
// next_task_id = kScheduleWaveForm;
|
||||||
z = true;
|
// z = true;
|
||||||
return nxt_ts;
|
// return nxt_ts;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
next_task_id = kScheduleEigenValue;
|
next_task_id = kScheduleEigenValue;
|
||||||
return GetDebugUpgradeNextTS(short_addr);
|
return GetDebugUpgradeNextTS(short_addr);
|
||||||
}
|
}
|
||||||
@ -484,7 +484,8 @@ int SensorScheduler::GetNextDuration(uint16_t short_addr, bool &z, int &next_tas
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
zlog_debug(zbt, "[%d:%x] ts:%ld, current utc:%s, nth eigen_value slice:%d, seconds in eigen slice:%d, eigen slice:%d",
|
||||||
|
id, short_addr, current_ts_, GetUTCTime(current_ts_).c_str(), nth_eigen_value_slice_+1, seconds_in_current_eigen_slice_, ts_in_eigen_slice_);
|
||||||
// long current_ts = GetLocalTs();
|
// long current_ts = GetLocalTs();
|
||||||
long next_ts = CalcNextTimestamp(id, short_addr, z, next_task_id);
|
long next_ts = CalcNextTimestamp(id, short_addr, z, next_task_id);
|
||||||
int duration = next_ts - current_ts_;
|
int duration = next_ts - current_ts_;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user