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

Method get_float

OpenHD/ohd_telemetry/src/mavsdk_temporary/param_value.cpp:490–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

488}
489
490[[nodiscard]] std::optional<float> ParamValue::get_float() const {
491 if (std::get_if<float>(&_value)) {
492 return std::get<float>(_value);
493 } else {
494 LogErr() << "Not float type";
495 return {};
496 }
497}
498
499[[nodiscard]] std::optional<std::string> ParamValue::get_custom() const {
500 if (std::get_if<std::string>(&_value)) {

Calls 1

LogErrFunction · 0.85

Tested by

no test coverage detected