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

-

parent dc02d9f6
Branches
No related merge requests found
......@@ -2,12 +2,24 @@
// Created by philipp on 10.05.18.
//
#include <iostream>
#include "../include/VeloxProtocolLib/Connection.h"
int main(int argc, char ** argv)
{
using namespace veloxProtocol;
using namespace std::chrono_literals;
if (argc < 4)
{
std::cerr << "Usage: speed angle time[s]\n";
return -1;
}
float speed = atof(argv[1]);
float angle = atof(argv[2]);
int time = atoi(argv[3]);
networking::Networking net;
std::atomic<bool> running{true};
auto conn = Connection::create(net);
......@@ -18,11 +30,12 @@ int main(int argc, char ** argv)
[]
{});
conn->setSpeed(speed);
conn->setSteeringAngle(angle);
auto timer = networking::time::Timer::create(net);
conn->setSteeringAngle(-4.0f);
conn->setSpeed(1.0f);
timer->startTimeout(
10s,
std::chrono::seconds{time},
[&]
{
conn->setSpeed(0.0f);
......
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