mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-03 20:04:58 +00:00
removed define
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user