| 280 | } |
| 281 | |
| 282 | void JoystickReader::write_matching_axis( |
| 283 | std::array<uint16_t, JoystickReader::N_CHANNELS>& rc_data, |
| 284 | const uint8_t axis_index, const Sint16 value) { |
| 285 | if (axis_index >= N_CHANNELS_RESERVED_FOR_AXES) { |
| 286 | m_console->warn("only {} channels reserved for axis, wanted {}", |
| 287 | N_CHANNELS_RESERVED_FOR_AXES, axis_index); |
| 288 | return; |
| 289 | } |
| 290 | rc_data[axis_index] = remap_sdl_to_mavlink(value); |
| 291 | } |
| 292 | |
| 293 | void JoystickReader::write_matching_button(std::array<uint16_t, 18>& rc_data, |
| 294 | const Uint8 button, bool up) { |
nothing calls this directly
no test coverage detected