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 <thread>
#include "graph.h" #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; using namespace std;
CKobuki robot; CKobuki robot;
int command(); int command();
@@ -47,16 +41,16 @@ int command(){
switch(input){ switch(input){
case 1: case 1:
straight; robot.forward(1024, 2);
break; break;
case 2: case 2:
turnRight; robot.doRotation(90);
break; break;
case 3: case 3:
turnLeft; robot.doRotation(-90);
break; break;
case 4: case 4:
backwards; robot.forward(1024, -1);
break; break;
default: default:
cout << "Invalid input" << endl; cout << "Invalid input" << endl;