From 9a206925c5743ec38b574bb134a8534f2abd95e0 Mon Sep 17 00:00:00 2001 From: VladislavOstapov Date: Sat, 28 Jan 2023 12:45:23 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B0=20=D1=84=D0=BE=D1=80=D0=BC=D1=83=D0=BB=D0=B0=20=D1=80?= =?UTF-8?q?=D0=B0=D1=81=D1=87=D0=B5=D1=82=D0=B0=20=D0=B2=D1=80=D0=B5=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=20=D0=BF=D1=83=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils.c b/utils.c index 67db110..cc26719 100644 --- a/utils.c +++ b/utils.c @@ -212,7 +212,11 @@ short can_move(struct barrel *bar, char robot_id) { } #ifndef EMULATOR - approximate_time *= 4; + if (approximate_time > 1) { + approximate_time = ((approximate_time - 1) * 3) + 6; + } else if (approximate_time == 1) { + approximate_time = 8; + } #endif if (bar->software_timer > -approximate_time) {