dual_sense_hid::State struct

State of analogs, buttons, etc. of gamepad.

Public types

struct Acceleration
Report of linear acceleration.
struct AnalogPad
State of analog pad.
struct Audio
Information about audio capabilities.
struct Battery
State of gamepad's battery.
struct ButtonPad
State of buttons on button pad.
struct Buttons
State of buttons.
struct Gyro
Report of angular velocity.
struct TouchPoint
Data of single touch point registered by touchpad.
struct Trigger
State of trigger.
enum class DPadDirection: uint8_t { UP = 0, UP_RIGHT = 1, RIGHT = 2, DOWN_RIGHT = 3, DOWN = 4, DOWN_LEFT = 5, LEFT = 6, UP_LEFT = 7, NONE = 8 }
Direction of pressed DigitalPad buttons.
enum class PowerStatus: uint8_t { DISCHARGING = 0x00, CHARGING = 0x01, CHARGED = 0x02, VOLTAGE_ERROR = 0x0A, TEMP_ERROR = 0x0B, CHARGING_ERROR = 0x0F }
Status of power.

Public variables

DPadDirection dpad_direction
ButtonPad button_pad
Buttons buttons
Gyro gyro
Acceleration acceleration
uint8_t temperature
Battery battery
Audio audio

Analog pads state

AnalogPad left_pad
AnalogPad right_pad

Triggers state

Trigger left_trigger
Trigger right_trigger

Touchpad state

TouchPoint touch_point_0
TouchPoint touch_point_1

Enum documentation

enum class dual_sense_hid::State::DPadDirection: uint8_t

Direction of pressed DigitalPad buttons.

Enumerators
UP

North button pressed

UP_RIGHT

North and east buttons pressed

RIGHT

East button pressed

DOWN_RIGHT

South and east buttons pressed

DOWN

South button pressed

DOWN_LEFT

South and west buttons pressed

LEFT

West button pressed

UP_LEFT

North and west buttons pressed

NONE

Default state

enum class dual_sense_hid::State::PowerStatus: uint8_t

Status of power.

Enumerators
DISCHARGING

Battery is discharging

CHARGING

Battery is charging

CHARGED

Battery is charged

VOLTAGE_ERROR

Voltage error

TEMP_ERROR

Temperature error

CHARGING_ERROR

Unknown error

Variable documentation

DPadDirection dual_sense_hid::State::dpad_direction

Direction created from state of pushed buttons on arrow button pad

ButtonPad dual_sense_hid::State::button_pad

State of right button pad (circle, square, triangle, cross)

Buttons dual_sense_hid::State::buttons

Other buttons

Gyro dual_sense_hid::State::gyro

Gyroscope state

Acceleration dual_sense_hid::State::acceleration

Accelerometer state

uint8_t dual_sense_hid::State::temperature

Gamepad temperature

Battery dual_sense_hid::State::battery

Battery state (level, charging, charged)

Audio dual_sense_hid::State::audio

State of connected headphones and internal mic

AnalogPad dual_sense_hid::State::left_pad

Left stick state

AnalogPad dual_sense_hid::State::right_pad

Right stick state

Trigger dual_sense_hid::State::left_trigger

Left trigger state

Trigger dual_sense_hid::State::right_trigger

Right trigger state

TouchPoint dual_sense_hid::State::touch_point_0

First touch point

TouchPoint dual_sense_hid::State::touch_point_1

Second touch point