Добавление полноценного ночного режима

This commit is contained in:
2023-01-09 22:38:38 +03:00
parent bbc73b4e31
commit 5ad225fa85
3 changed files with 327 additions and 248 deletions

View File

@@ -18,6 +18,18 @@ static bool robot_move(robot_regs& r, short target, char robot_id) {
robot2_offset_pos = false;
}
// перемещения в зоне парковки
if (target < 0 && r.dx.current_zone == 0) {
r.mx.correct_sensor = true;
return true;
}
if (r.mx.correct_sensor) {
r.dx.current_zone = 0;
r.mx.correct_sensor = false;
return target == 0;
}
if (r.dx.current_zone == target) {
return true;
}