Refactor turnRight command to use degrees instead of a fraction

This commit is contained in:
ishak jmilou.ishak
2024-10-07 09:54:44 +02:00
parent aa392cd07c
commit 179e6db74a

View File

@@ -5,7 +5,7 @@
#include "graph.h" #include "graph.h"
// define for the commands // define for the commands
#define turnRight robot.doRotation(0.25) #define turnRight robot.doRotation(90)
#define turnLeft robot.doRotation(-0.25) #define turnLeft robot.doRotation(-0.25)
#define straight robot.forward(1024, 2) #define straight robot.forward(1024, 2)
#define backwards robot.forward(1024, -1) #define backwards robot.forward(1024, -1)
@@ -50,7 +50,7 @@ int command(){
straight; straight;
break; break;
case 2: case 2:
robot.doRotation(1); turnRight;
break; break;
case 3: case 3:
turnLeft; turnLeft;