| 31 | data.emplace_back(static_cast<uint8_t>((value >> 8) % 0xff)); |
| 32 | } |
| 33 | void writeAngle(std::vector<uint8_t>& data, float value) |
| 34 | { |
| 35 | if (value > 180.0f) { |
| 36 | value -= 360.0f; |
| 37 | } |
| 38 | if (value < -180.0f) { |
| 39 | value += 360.0f; |
| 40 | } |
| 41 | data.emplace_back(static_cast<uint8_t>(static_cast<int8_t>(value / 180 * 120))); |
| 42 | } |
| 43 | void writeDensity(std::vector<uint8_t>& data, float value) |
| 44 | { |
| 45 | data.emplace_back(static_cast<uint8_t>(static_cast<int8_t>((value * 2 - 1) * 128))); |
no outgoing calls
no test coverage detected