removed define

This commit is contained in:
ishak jmilou.ishak
2024-10-07 09:56:45 +02:00
parent 179e6db74a
commit 65adec8e1a

View File

@@ -4,12 +4,6 @@
#include <thread>
#include "graph.h"
// define for the commands
#define turnRight robot.doRotation(90)
#define turnLeft robot.doRotation(-0.25)
#define straight robot.forward(1024, 2)
#define backwards robot.forward(1024, -1)
using namespace std;
CKobuki robot;
int command();
@@ -47,16 +41,16 @@ int command(){
switch(input){
case 1:
straight;
robot.forward(1024, 2);
break;
case 2:
turnRight;
robot.doRotation(90);
break;
case 3:
turnLeft;
robot.doRotation(-90);
break;
case 4:
backwards;
robot.forward(1024, -1);
break;
default:
cout << "Invalid input" << endl;