diff --git a/scheduler.c b/scheduler.c index be9e9ea..da7e7a1 100644 --- a/scheduler.c +++ b/scheduler.c @@ -140,6 +140,8 @@ void scheduler_main() scheduler_correction_stage++; } } + break; + case 1: if (robot2_code.PC < 0 && robot1_code.PC < 0) { scheduler_correction_stage++; @@ -230,18 +232,18 @@ void scheduler_main() } if (robot_id != 0) { - if ((robot_id == 1 && robot1.dx.current_zone < ZONE_DEGREASING) || - (robot_id == 2 && robot2.dx.current_zone < ZONE_DEGREASING)) { + if ((robot_id == 1 && robot1.dx.current_zone < ZONE_WASHING_1A) || + (robot_id == 2 && robot2.dx.current_zone < ZONE_WASHING_1A)) { if (robot_id == 1) { robot1_code.barrel_id = -1; robot1_code.code[0] = ROBOT_CMD_DOWN(); - robot1_code.code[1] = ROBOT_CMD_MOVE_TO_ZONE(ZONE_DEGREASING); + robot1_code.code[1] = ROBOT_CMD_MOVE_TO_ZONE(ZONE_WASHING_1A); robot1_code.code[2] = ROBOT_CMD_END(); robot1_code.PC = 0; } else { robot2_code.barrel_id = -1; robot2_code.code[0] = ROBOT_CMD_DOWN(); - robot2_code.code[1] = ROBOT_CMD_MOVE_TO_ZONE(ZONE_DEGREASING); + robot2_code.code[1] = ROBOT_CMD_MOVE_TO_ZONE(ZONE_WASHING_1A); robot2_code.code[2] = ROBOT_CMD_END(); robot2_code.PC = 0; } @@ -315,13 +317,13 @@ void scheduler_main() // и отдельно для второго (только если не в ночном режиме) if (robot2_code.PC < 0) { - if (robot2.dx.current_zone < ZONE_DEGREASING) { + if (robot2.dx.current_zone < ZONE_WASHING_1A) { // начальная позиция робота 1 - обезжир - robot2_lock_zone = ZONE_DEGREASING; + robot2_lock_zone = ZONE_WASHING_1A; if (robot2_code.PC < 0) { robot2_code.barrel_id = -1; robot2_code.code[0] = ROBOT_CMD_DOWN(); - robot2_code.code[1] = ROBOT_CMD_MOVE_TO_ZONE(ZONE_DEGREASING); + robot2_code.code[1] = ROBOT_CMD_MOVE_TO_ZONE(ZONE_WASHING_1A); robot2_code.code[2] = ROBOT_CMD_END(); robot2_code.PC = 0; }