fix ts bug 2.
This commit is contained in:
parent
08c0988705
commit
ac7e5bb96e
@ -295,6 +295,8 @@ int SensorScheduler::GetNextDuration(int short_addr, int &next_task_id) {
|
|||||||
long current_ts = GetLocalTs();
|
long current_ts = GetLocalTs();
|
||||||
nth_wave_start_slice_ = (current_ts_ - start_timestamp_) / wave_form_send_interval_;
|
nth_wave_start_slice_ = (current_ts_ - start_timestamp_) / wave_form_send_interval_;
|
||||||
current_wave_start_ts_ = nth_wave_start_slice_ * wave_form_send_interval_ + start_timestamp_;
|
current_wave_start_ts_ = nth_wave_start_slice_ * wave_form_send_interval_ + start_timestamp_;
|
||||||
|
seconds_in_current_wave_slice_ = current_ts_ - current_wave_start_ts_;
|
||||||
|
nth_eigen_value_slice_ = seconds_in_current_wave_slice_ / eigen_value_send_interval_;
|
||||||
long next_ts = CalcNextTimestamp(id, short_addr, next_task_id);
|
long next_ts = CalcNextTimestamp(id, short_addr, next_task_id);
|
||||||
int duration = next_ts - current_ts;
|
int duration = next_ts - current_ts;
|
||||||
if (duration < 0 || duration > eigen_value_send_interval_) {
|
if (duration < 0 || duration > eigen_value_send_interval_) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user