mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-04 04:14:58 +00:00
changed something
This commit is contained in:
@@ -14,10 +14,6 @@ int command();
|
|||||||
int checkCenterCliff();
|
int checkCenterCliff();
|
||||||
int checkWheelDrop();
|
int checkWheelDrop();
|
||||||
|
|
||||||
// Constante karakters voor invoeropties
|
|
||||||
const char FORWARD = '1';
|
|
||||||
const char ROTATE = '2';
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Start communicatie met de robot
|
// Start communicatie met de robot
|
||||||
unsigned char *null_ptr(0);
|
unsigned char *null_ptr(0);
|
||||||
@@ -43,14 +39,14 @@ int command() {
|
|||||||
|
|
||||||
// Verwerk de invoer van de gebruiker
|
// Verwerk de invoer van de gebruiker
|
||||||
switch (input) {
|
switch (input) {
|
||||||
case FORWARD: {
|
case 1: {
|
||||||
int distance;
|
int distance;
|
||||||
std::cout << "Enter distance to move forward: ";
|
std::cout << "Enter distance to move forward: ";
|
||||||
std::cin >> distance;
|
std::cin >> distance;
|
||||||
robot.goStraight(distance); // Beweeg de robot naar voren
|
robot.goStraight(distance); // Beweeg de robot naar voren
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case ROTATE: {
|
case 2: {
|
||||||
int angle;
|
int angle;
|
||||||
std::cout << "Enter angle to rotate in degrees: ";
|
std::cout << "Enter angle to rotate in degrees: ";
|
||||||
std::cin >> angle;
|
std::cin >> angle;
|
||||||
|
Reference in New Issue
Block a user