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

-

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