mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-04 04:14:58 +00:00
fixed some small problems
This commit is contained in:
@@ -8,8 +8,8 @@ using namespace std;
|
|||||||
CKobuki robot;
|
CKobuki robot;
|
||||||
int command();
|
int command();
|
||||||
|
|
||||||
const int forward = 1;
|
const char forward = '1';
|
||||||
const int ROTATE = 2;
|
const char rotate = '2';
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
unsigned char *null_ptr(0);
|
unsigned char *null_ptr(0);
|
||||||
@@ -43,14 +43,14 @@ int command() {
|
|||||||
switch (input) {
|
switch (input) {
|
||||||
case forward: {
|
case forward: {
|
||||||
int distance;
|
int distance;
|
||||||
std::cout >> "Enter distance to move forward: ";
|
std::cout << "Enter distance to move forward: ";
|
||||||
cin >> distance;
|
cin >> distance;
|
||||||
robot.goStraight(distance);
|
robot.goStraight(distance);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case ROTATE: {
|
case ROTATE: {
|
||||||
int angle;
|
int angle;
|
||||||
std::cout >> "Enter angle to rotate: ";
|
std::cout << "Enter angle to rotate: ";
|
||||||
std::cin >> angle;
|
std::cin >> angle;
|
||||||
robot.doRotation(angle);
|
robot.doRotation(angle);
|
||||||
robot.goStraight(-1);
|
robot.goStraight(-1);
|
||||||
|
Reference in New Issue
Block a user