get count of parameters capable of being converted to load */
| 47 | get count of parameters capable of being converted to load |
| 48 | */ |
| 49 | uint16_t Parameters::param_count_float(void) |
| 50 | { |
| 51 | uint16_t count = 0; |
| 52 | for (const auto &p : params) { |
| 53 | if (p.flags & PARAM_FLAG_HIDDEN) { |
| 54 | continue; |
| 55 | } |
| 56 | switch (p.ptype) { |
| 57 | case ParamType::UINT8: |
| 58 | case ParamType::INT8: |
| 59 | case ParamType::UINT32: |
| 60 | case ParamType::FLOAT: |
| 61 | count++; |
| 62 | break; |
| 63 | } |
| 64 | } |
| 65 | // remove 1 for DONE_INIT |
| 66 | return count-1; |
| 67 | } |
| 68 | |
| 69 | /* |
| 70 | get index of parameter counting only those capable of representation as float |
no outgoing calls
no test coverage detected