Skip to content
Snippets Groups Projects
Commit a8e02044 authored by Hoop77's avatar Hoop77
Browse files

-

parent 2b53a72d
Branches
No related merge requests found
......@@ -124,7 +124,14 @@ void FollowerVehicle::sendPlatoonCreateRequest(VehicleId vehicleToRequest)
{
// We'll send a request indicating that we want to be the follower.
log("Sending create request to: ", vehicleToRequest);
sendMessage(PlatoonMessage::followerRequest(myInfo.vehicleId, vehicleToRequest), 3s);
try
{
sendMessage(PlatoonMessage::followerRequest(myInfo.vehicleId, vehicleToRequest), 3s);
}
catch (const std::exception & e)
{
log("ERROR: ", e.what());
}
}
void FollowerVehicle::sendRejectResponse(const PlatoonMessage & request)
......
......@@ -40,7 +40,16 @@ int main(int argc, char ** argv)
follower->createPlatoon();
while (1);
while (1)
{
std::string input;
std::cin >> input;
if (input == "l")
break;
}
follower->leavePlatoon();
sleep(1);
return 0;
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment