diff --git a/scheduler/schedule.cpp b/scheduler/schedule.cpp index 40470c2..fe24b20 100644 --- a/scheduler/schedule.cpp +++ b/scheduler/schedule.cpp @@ -961,6 +961,18 @@ int SensorScheduler::WriteScheduleCfg(long &ts, std::string &world_time) { xy_wave_start_id = max_sensor_num_ + 1; } + if (max_sensor_num_ == 2 && free_slice_ == 0) { + xy_wave_start_id = 2; + } + + if (max_sensor_num_ == 1 && free_slice_ == 0) { + if (available_slice_ == 2) { + xy_wave_start_id = 1; + } else if (available_slice_ == 4) { + xy_wave_start_id = 2; + } + } + for (int i = 1; i <= max_sensor_num_; ++i) { sensor_id_nth_slice_[i] = { i, i + xy_wave_start_id }; slice_sensor_id_[i] = i;