From 179e6db74ab733fe32df311e81607d42f96cb406 Mon Sep 17 00:00:00 2001 From: "ishak jmilou.ishak" Date: Mon, 7 Oct 2024 09:54:44 +0200 Subject: [PATCH] Refactor turnRight command to use degrees instead of a fraction --- src/C++/Driver/src/test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/C++/Driver/src/test.cpp b/src/C++/Driver/src/test.cpp index 51e0150..560f4ce 100644 --- a/src/C++/Driver/src/test.cpp +++ b/src/C++/Driver/src/test.cpp @@ -5,7 +5,7 @@ #include "graph.h" // define for the commands -#define turnRight robot.doRotation(0.25) +#define turnRight robot.doRotation(90) #define turnLeft robot.doRotation(-0.25) #define straight robot.forward(1024, 2) #define backwards robot.forward(1024, -1) @@ -50,7 +50,7 @@ int command(){ straight; break; case 2: - robot.doRotation(1); + turnRight; break; case 3: turnLeft;