Добавление полноценного ночного режима
This commit is contained in:
12
robot.cpp
12
robot.cpp
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user