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