From beb93f97edae73e8898336eab6111fe9e238f577 Mon Sep 17 00:00:00 2001 From: Kristiyan Tsaklev Date: Sat, 17 Dec 2016 15:16:40 +0200 Subject: [PATCH] Update fight logic --- src/Slim/logic/fight.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Slim/logic/fight.cpp b/src/Slim/logic/fight.cpp index 1cb534f..17b54eb 100644 --- a/src/Slim/logic/fight.cpp +++ b/src/Slim/logic/fight.cpp @@ -1,6 +1,5 @@ #include "fight.h" -#include "../drivers/MotorDriver.h" #include "../drivers/ProximitySensors.h" #include "../control/Movement.h" @@ -20,12 +19,11 @@ void initFight() { debounce_start_timer = 50; - enqueueTurn(STANDARD_SPEED, 0, -20); - enqueueLinearMovement(STANDARD_SPEED, 250); - enqueueTurn(STANDARD_SPEED, 100, -360); - enqueueTurn(STANDARD_SPEED, 100, -360); - enqueueTurn(STANDARD_SPEED, 100, -360); - enqueueTurn(STANDARD_SPEED, 100, -360); + for(int i = 0; i < 16; ++i) + { + enqueueTurn(STANDARD_SPEED, 0, -90); + enqueueLinearMovement(STANDARD_SPEED, 150); + } } void handleFight()