| 197 | } |
| 198 | |
| 199 | void OLED::parse_numbers(std::string s, float* nums, uint8_t maxnums) { |
| 200 | size_t pos = 0; |
| 201 | size_t nextpos = -1; |
| 202 | size_t i = 0; |
| 203 | do { |
| 204 | if (i >= maxnums) { |
| 205 | return; |
| 206 | } |
| 207 | nextpos = s.find_first_of(",", pos); |
| 208 | auto num = s.substr(pos, nextpos - pos); |
| 209 | string_util::from_float(num, nums[i++]); |
| 210 | pos = nextpos + 1; |
| 211 | } while (nextpos != std::string::npos); |
| 212 | } |
| 213 | |
| 214 | void OLED::parse_axes(std::string s, float* axes) { |
| 215 | size_t pos = 0; |
nothing calls this directly
no test coverage detected