From 4a029d9aa526b6aaf5b7d164541a60e29281b03a Mon Sep 17 00:00:00 2001 From: VladislavOstapov Date: Sat, 4 Feb 2023 14:14:51 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B7=D0=BE=D0=BD=D1=8B=20=D0=BA?= =?UTF-8?q?=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=86=D0=B8=D0=B8=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=B2=D1=82=D0=BE=D1=80=D0=BE=D0=B3=D0=BE=20=D1=80?= =?UTF-8?q?=D0=BE=D0=B1=D0=BE=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scheduler.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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; }