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