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

Method param_index_float

RemoteIDModule/parameters.cpp:72–92  ·  view source on GitHub ↗

get index of parameter counting only those capable of representation as float */

Source from the content-addressed store, hash-verified

70 get index of parameter counting only those capable of representation as float
71 */
72int16_t Parameters::param_index_float(const Parameters::Param *f)
73{
74 uint16_t count = 0;
75 for (const auto &p : params) {
76 if (p.flags & PARAM_FLAG_HIDDEN) {
77 continue;
78 }
79 switch (p.ptype) {
80 case ParamType::UINT8:
81 case ParamType::INT8:
82 case ParamType::UINT32:
83 case ParamType::FLOAT:
84 if (&p == f) {
85 return count;
86 }
87 count++;
88 break;
89 }
90 }
91 return -1;
92}
93
94/*
95 find by name

Callers 2

updateMethod · 0.80
process_packetMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected