diff --git a/src/C++/Driver/src/main.cpp b/src/C++/Driver/src/main.cpp index f7740c7..6014547 100644 --- a/src/C++/Driver/src/main.cpp +++ b/src/C++/Driver/src/main.cpp @@ -14,11 +14,11 @@ int main() { unsigned char *null_ptr(0); robot.startCommunication("/dev/ttyUSB0", true, null_ptr); - sleep(1); + std::thread safety([&robot]() { robot.robotSafety(); }); // use a lambda function to call the member function safety.detach(); - thread movementThread(movement); + thread movementThread(movement); movementThread.join(); //so the program doesnt quit return 0; } @@ -47,7 +47,7 @@ int movement() else if (text == 2) { // 1 is full circle - robot.doRotation(0.25); + robot.Rotate(90); } else if (text == 3) {