MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / parse_float

Method parse_float

libraries/SITL/SIM_Frame.cpp:433–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431}
432
433void Frame::parse_float(AP_JSON::value val, const char* label, float &param) {
434 if (!val.is<double>()) {
435 AP_HAL::panic("Bad json type for %s: %s", label, val.to_str().c_str());
436 }
437 param = val.get<double>();
438}
439
440void Frame::parse_vector3(AP_JSON::value val, const char* label, Vector3f &param) {
441 if (!val.is<AP_JSON::value::array>() || !val.contains(2) || val.contains(3)) {

Callers

nothing calls this directly

Calls 3

is<double>Method · 0.80
to_strMethod · 0.80
panicFunction · 0.50

Tested by

no test coverage detected