BLE-Gamepad-Client 0.3.2
Loading...
Searching...
No Matches
BLEControlsEvent Struct Reference

Public Attributes

float leftStickX {0.0f}
 Left stick deflection along the X-axis. Takes values between -1.0 and 1.0. No deflection should yield 0.0, unless affected by stick drift. Positive values represent deflection to the right, and negative values to the left.
float leftStickY {0.0f}
 Left stick deflection along the Y-axis. Takes values between -1.0 and 1.0. No deflection should yield 0.0, unless affected by stick drift. Positive values represent upward deflection, and negative values downward.
float rightStickX {0.0f}
 Right stick deflection along the X-axis. Takes values between -1.0 and 1.0. No deflection should yield 0.0, unless affected by stick drift. Positive values represent deflection to the right, and negative values to the left.
float rightStickY {0.0f}
 Right stick deflection along the Y-axis. Takes values between -1.0 and 1.0. No deflection should yield 0.0, unless affected by stick drift. Positive values represent upward deflection, and negative values downward.
bool leftStickButton {false}
 Button activated when pressing down on the left stick, also known as the L3 button.
bool rightStickButton {false}
 Button activated when pressing down on the right stick, also known as the R3 button.
bool dpadUp {false}
 Up button on the directional pad.
bool dpadDown {false}
 Down button on the directional pad.
bool dpadLeft {false}
 Left button on the directional pad.
bool dpadRight {false}
 Right button on the directional pad.
bool buttonA {false}
 Face button A, also known as the cross button.
bool buttonB {false}
 Face button B, also known as the circle button.
bool buttonX {false}
 Face button B, also known as the triangle button.
bool buttonY {false}
 Face button B, also known as the square button.
bool leftBumper {false}
 Left bumper button, also known as the L1 or L shoulder button.
bool rightBumper {false}
 Right bumper button, also known as the R1 or R shoulder button.
float leftTrigger {0.0f}
 Pressure level of a left trigger. Takes values between 0.0 and 1.0. No pressure should yield 0.0. This control is also known as L2.
float rightTrigger {0.0f}
 Pressure level of a right trigger. Takes values between 0.0 and 1.0. No pressure should yield 0.0. This control is also known as R2.
bool share {false}
 Share button.
bool menu {false}
 Menu button, also known as start button.
bool view {false}
 View button, also known as back button.
bool xbox {false}
 Xbox button, also known as guide button.
Public Attributes inherited from BLEBaseEvent
NimBLEAddress controllerAddress {}
 Peer address of the controller that send this event.

Member Data Documentation

◆ leftStickX

float BLEControlsEvent::leftStickX {0.0f}

Left stick deflection along the X-axis. Takes values between -1.0 and 1.0. No deflection should yield 0.0, unless affected by stick drift. Positive values represent deflection to the right, and negative values to the left.

This is a visual representation of the coordinate system used. The o represents the stick position when there is no deflection.

 1.0    /‾‾‾‾‾‾‾\
       /         \
 0.5  /           \
     |             |
 0.0 |      o      |
     |             |
-0.5  \           /
       \         /
-1.0    \_______/
    -1.0   0.0   1.0

◆ leftStickY

float BLEControlsEvent::leftStickY {0.0f}

Left stick deflection along the Y-axis. Takes values between -1.0 and 1.0. No deflection should yield 0.0, unless affected by stick drift. Positive values represent upward deflection, and negative values downward.

This is a visual representation of the coordinate system used. The o represents the stick position when there is no deflection.

 1.0    /‾‾‾‾‾‾‾\
       /         \
 0.5  /           \
     |             |
 0.0 |      o      |
     |             |
-0.5  \           /
       \         /
-1.0    \_______/
    -1.0   0.0   1.0

◆ rightStickX

float BLEControlsEvent::rightStickX {0.0f}

Right stick deflection along the X-axis. Takes values between -1.0 and 1.0. No deflection should yield 0.0, unless affected by stick drift. Positive values represent deflection to the right, and negative values to the left.

This is a visual representation of the coordinate system used. The o represents the stick position when there is no deflection.

 1.0    /‾‾‾‾‾‾‾\
       /         \
 0.5  /           \
     |             |
 0.0 |      o      |
     |             |
-0.5  \           /
       \         /
-1.0    \_______/
    -1.0   0.0   1.0

◆ rightStickY

float BLEControlsEvent::rightStickY {0.0f}

Right stick deflection along the Y-axis. Takes values between -1.0 and 1.0. No deflection should yield 0.0, unless affected by stick drift. Positive values represent upward deflection, and negative values downward.

This is a visual representation of the coordinate system used. The o represents the stick position when there is no deflection.

 1.0    /‾‾‾‾‾‾‾\
       /         \
 0.5  /           \
     |             |
 0.0 |      o      |
     |             |
-0.5  \           /
       \         /
-1.0    \_______/
    -1.0   0.0   1.0

The documentation for this struct was generated from the following file: