mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-04 04:14:58 +00:00
threaded the movement of the robot
This commit is contained in:
@@ -16,6 +16,7 @@ int main()
|
|||||||
cout << "Enter commando";
|
cout << "Enter commando";
|
||||||
thread mv(movement);
|
thread mv(movement);
|
||||||
usleep(30 * 1000 * 1000);
|
usleep(30 * 1000 * 1000);
|
||||||
|
mv.join(); //only exit once thread one is done running
|
||||||
}
|
}
|
||||||
|
|
||||||
int checkCenterCliff()
|
int checkCenterCliff()
|
||||||
@@ -35,7 +36,7 @@ int movement()
|
|||||||
|
|
||||||
if (text == 1)
|
if (text == 1)
|
||||||
{
|
{
|
||||||
robot.goStraight(1);
|
robot.goStraight(10);
|
||||||
}
|
}
|
||||||
else if (text == 2)
|
else if (text == 2)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user