14namespace lvh::reports {
std::uint8_t normalize_trigger(float value)
Convert a normalized trigger value to an unsigned HID trigger value.
std::int16_t normalize_axis(float value)
Convert a normalized axis value to a signed HID axis value.
GamepadState normalize_state(const GamepadState &state)
Normalize all scalar fields in a gamepad state.
float clamp_trigger(float value)
Clamp a trigger value to the normalized range.
float clamp_axis(float value)
Clamp a stick axis value to the normalized range.
std::vector< GamepadOutput > parse_output_reports(const DeviceProfile &profile, const std::vector< std::uint8_t > &report)
Parse a backend output report into zero or more profile-neutral output events.
std::vector< std::uint8_t > pack_input_report(const DeviceProfile &profile, const GamepadState &state)
Pack a gamepad state into the profile's common input report format.
GamepadOutput parse_output_report(const DeviceProfile &profile, const std::vector< std::uint8_t > &report)
Parse a backend output report into the profile-neutral output model.
std::uint8_t hat_from_buttons(const ButtonSet &buttons)
Convert directional pad buttons to a HID hat switch value.
Descriptor and identity data used to create a virtual device.
Definition types.hpp:273
Normalized gamepad output event delivered to the consumer.
Definition types.hpp:900
Common gamepad input state accepted by libvirtualhid.
Definition types.hpp:647
Core public types for libvirtualhid.