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

-

parent ec6107e7
No related merge requests found
......@@ -35,23 +35,19 @@ int main(int argc, char ** argv)
std::thread ussThread{
[&]
{
try
{
USS_SRF02 uss{USS_SRF02::DEVICE_ADDRESS1};
USS_SRF02 uss{USS_SRF02::DEVICE_ADDRESS1};
while (running)
{
int distance = uss.getDistance();
while (running)
{
int distance = uss.getDistance();
std::cout << "joooo!\n";
if (!monitorUSS)
return;
if (!monitorUSS)
return;
std::lock_guard<std::mutex> lock{outputMutex};
std::cout << "[USS Update]\nDistance=" << distance << "\n\n";
}
std::lock_guard<std::mutex> lock{outputMutex};
std::cout << "[USS Update]\nDistance=" << distance << "\n\n";
}
catch (const std::exception & e)
{ std::cerr << e.what(); }
}};
std::cout << "\n\nMANUAL\n"
......
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