| 327 | } |
| 328 | |
| 329 | void SerialEndpoint::stop() { |
| 330 | std::lock_guard<std::mutex> lock(m_connect_receive_thread_mutex); |
| 331 | m_console->debug("stop()-begin"); |
| 332 | _stop_requested = true; |
| 333 | if (m_connect_receive_thread && m_connect_receive_thread->joinable()) { |
| 334 | m_connect_receive_thread->join(); |
| 335 | } |
| 336 | m_connect_receive_thread = nullptr; |
| 337 | m_console->debug("stop()-end"); |
| 338 | } |
| 339 | |
| 340 | // based on mavsdk and what linux allows setting |
| 341 | // if a value is in the map, we allow the user to set it |