MCPcopy Create free account
hub / github.com/ArduPilot/ArduRemoteID / get_as_float

Method get_as_float

RemoteIDModule/parameters.cpp:241–260  ·  view source on GitHub ↗

get parameter as a float */

Source from the content-addressed store, hash-verified

239 get parameter as a float
240 */
241bool Parameters::Param::get_as_float(float &v) const
242{
243 switch (ptype) {
244 case ParamType::UINT8:
245 v = float(get_uint8());
246 break;
247 case ParamType::INT8:
248 v = float(get_int8());
249 break;
250 case ParamType::UINT32:
251 v = float(get_uint32());
252 break;
253 case ParamType::FLOAT:
254 v = get_float();
255 break;
256 default:
257 return false;
258 }
259 return true;
260}
261
262/*
263 set parameter from a float

Callers 2

updateMethod · 0.80
process_packetMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected