diff --git a/scheduler/schedule.cpp b/scheduler/schedule.cpp index 36d1385..40470c2 100644 --- a/scheduler/schedule.cpp +++ b/scheduler/schedule.cpp @@ -664,6 +664,18 @@ SensorScheduler::SensorScheduler() { } else { 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;