|
libOpenWinControls
Multiplatform open-source library to interact with the dual-mode controller in GPD devices
|
interact with controller V1 devices More...
#include <ControllerV1.h>
Public Member Functions | |
| ControllerV1 (int controllerFeatures=0) | |
| create a new ControllerV1 controller | |
| int | getControllerType () const override |
| int value of the controller class version | |
| std::pair< int, int > | getXVersion () const |
| get the firmware xinput mode version | |
| std::pair< int, int > | getKVersion () const |
| get the firmware keyboard mode version | |
| bool | readConfig () override |
| read the whole configuration | |
| bool | writeConfig () const override |
| write the configuration | |
| bool | setButton (Button btn, const std::string &key) const override |
set a new key for the button btn | |
| std::string | getButton (Button btn) const override |
get the current key of button btn | |
| bool | setBackButton (int num, int slot, const std::string &key) const override |
set a new key in slot slot for back button num | |
| std::string | getBackButton (int num, int slot) const override |
get the current key in slot slot of back button num | |
| void | setBackButtonStartTime (int num, int slot, int timeMs) const override |
set start time for key in slot slot of back button num | |
| int | getBackButtonStartTime (int num, int slot) const override |
get start time for key in slot slot of back button num | |
| void | setRumble (RumbleMode mode) const override |
| set vibration intensity | |
| RumbleMode | getRumbleMode () const override |
| get current vibration intesity | |
| void | setLedMode (LedMode mode) const override |
| set led mode | |
| LedMode | getLedMode () const override |
| get current led mode | |
| void | setLedColor (int r, int g, int b) const override |
| set a custom color for the leds | |
| std::tuple< int, int, int > | getLedColor () const override |
| get current led custom color | |
| void | setAnalogCenter (int center, bool left) const override |
| set the analog stick offset from center (deadzone) | |
| int | getAnalogCenter (bool left) const override |
| get the current analog stick offset from center (deadzone) | |
| void | setAnalogBoundary (int boundary, bool left) const override |
| set the analog stick boundary offset (circularity) | |
| int | getAnalogBoundary (bool left) const override |
| get the current analog stick boundary offset (circularity) | |
| Public Member Functions inherited from OWC::Controller | |
| void | enableLogging (const std::function< void(const std::wstring &)> &logCB) |
| Enable log messages. | |
| bool | init () |
| Initialize the controller. | |
| bool | hasFeature (int feature) const |
Check if feature is enabled for this controller. | |
interact with controller V1 devices
|
explicit |
create a new ControllerV1 controller
| controllerFeatures | ControllerFeature flag |
|
nodiscardoverridevirtual |
get the current analog stick boundary offset (circularity)
| left | flag indicating to which analog this setting applies to (left or right) |
Implements OWC::Controller.
|
nodiscardoverridevirtual |
get the current analog stick offset from center (deadzone)
| left | flag indicating to which analog this setting applies to (left or right) |
Implements OWC::Controller.
|
nodiscardoverridevirtual |
get the current key in slot slot of back button num
num is the order of appearance in firmware config
| num | back button number (1,2 ..) |
| slot | back button key slot |
Implements OWC::Controller.
|
nodiscardoverridevirtual |
get start time for key in slot slot of back button num
num is the order of appearance in firmware config
| num | back button number (1,2 ..) |
| slot | back button key slot |
Implements OWC::Controller.
|
nodiscardoverridevirtual |
get the current key of button btn
| btn | the controller button to read |
Implements OWC::Controller.
|
inlinenodiscardoverridevirtual |
int value of the controller class version
Implements OWC::Controller.
|
inlinenodiscard |
get the firmware keyboard mode version
|
nodiscardoverridevirtual |
get current led custom color
returned color is valid only when mode is one of LedMode::Solid or LedMode::Breathe
Implements OWC::Controller.
|
nodiscardoverridevirtual |
|
nodiscardoverridevirtual |
|
inlinenodiscard |
get the firmware xinput mode version
|
nodiscardoverridevirtual |
|
overridevirtual |
set the analog stick boundary offset (circularity)
| boundary | offset |
| left | flag indicating to which analog this setting applies to (left or right) |
Implements OWC::Controller.
|
overridevirtual |
set the analog stick offset from center (deadzone)
| center | offset |
| left | flag indicating to which analog this setting applies to (left or right) |
Implements OWC::Controller.
|
nodiscardoverridevirtual |
set a new key in slot slot for back button num
num is the order of appearance in firmware config
| num | back button number (1,2, ..) |
| slot | back button key slot |
| key | one of HIDUsageIDMap or XinputUsageIDMap values (case insensitive) |
Implements OWC::Controller.
|
overridevirtual |
set start time for key in slot slot of back button num
num is the order of appearance in firmware config
| num | back button number (1,2 ..) |
| slot | back button key slot |
| timeMs | start time in milliseconds |
Implements OWC::Controller.
|
nodiscardoverridevirtual |
set a new key for the button btn
| btn | the controller button to remap |
| key | one of HIDUsageIDMap or XinputUsageIDMap values (case insensitive) |
Implements OWC::Controller.
|
overridevirtual |
set a custom color for the leds
has no effect for modes other than LedMode::Solid and LedMode::Breathe
| r | red value of the color |
| g | green value of the color |
| b | blue value of the color |
Implements OWC::Controller.
|
overridevirtual |
|
overridevirtual |
|
nodiscardoverridevirtual |