class
#include <dual_sense_hid/gamepad.hpp>
Gamepad Gamepad handle used to poll state from device.
Public types
- class Lights
- Proxy object for calls which mutate state of gamepad's lights.
Constructors, destructors, conversion operators
- Gamepad(const DeviceInfo& device_info, bool fetch_calibration_data = true) explicit
- Constructor.
Public functions
- auto poll(bool use_calibration_data = true) const -> State
- Poll state of gamepad from report queue.
- void push_state(bool full_update = false)
- Push internal gamepad state to real device.
- auto get_calibration_data() const -> const Calibration&
- Get calibration data (cached)
- auto lights() -> Lights&
- Get gamepad's lights proxy object.
Function documentation
dual_sense_hid:: Gamepad:: Gamepad(const DeviceInfo& device_info,
bool fetch_calibration_data = true) explicit
Constructor.
Parameters | |
---|---|
device_info | Device info to create gamepad instance for |
fetch_calibration_data | Prefetch calibration data while initializing (default: true) |
void dual_sense_hid:: Gamepad:: push_state(bool full_update = false)
Push internal gamepad state to real device.
Parameters | |
---|---|
full_update | When set to false push only changed sections, otherwise push everything |
const Calibration& dual_sense_hid:: Gamepad:: get_calibration_data() const
Get calibration data (cached)
Returns | Calibration data from gamepad |
---|