MCPcopy Create free account
hub / github.com/OpenHD/OpenHD / configure

Method configure

OpenHD/ohd_telemetry/src/endpoints/SerialEndpoint.cpp:385–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385void SerialEndpointManager::configure(const SerialEndpoint::HWOptions& options,
386 const std::string& tag,
387 MAV_MSG_CALLBACK cb) {
388 std::lock_guard<std::mutex> guard(m_serial_endpoint_mutex);
389 if (m_serial_endpoint != nullptr) {
390 // Disable the currently running uart configuration, if there is any
391 m_console->info("Stopping already existing FC UART");
392 m_serial_endpoint->stop();
393 m_serial_endpoint.reset();
394 m_serial_endpoint = nullptr;
395 }
396 m_serial_endpoint = std::make_unique<SerialEndpoint>(tag, options);
397 m_serial_endpoint->registerCallback(std::move(cb));
398}
399
400std::optional<std::string> serial_openhd_param_to_linux_fd(
401 const std::string& param_name) {

Callers

nothing calls this directly

Calls 3

registerCallbackMethod · 0.80
stopMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected