pub struct GamepadReport {Show 20 fields
pub dpad_up: bool,
pub dpad_down: bool,
pub dpad_left: bool,
pub dpad_right: bool,
pub a: bool,
pub b: bool,
pub x: bool,
pub y: bool,
pub left_bumper: bool,
pub right_bumper: bool,
pub left_stick_press: bool,
pub right_stick_press: bool,
pub menu: bool,
pub view: bool,
pub left_trigger: u16,
pub right_trigger: u16,
pub left_stick_x: i16,
pub left_stick_y: i16,
pub right_stick_x: i16,
pub right_stick_y: i16,
}Expand description
Parsed gamepad input report from a GIP controller.
Axes use the native ranges reported by the hardware: triggers are 0–1023, sticks are −32768–32767.
Fields§
§dpad_up: boolD-pad up.
dpad_down: boolD-pad down.
dpad_left: boolD-pad left.
dpad_right: boolD-pad right.
a: boolA button.
b: boolB button.
x: boolX button.
y: boolY button.
left_bumper: boolLeft bumper (LB).
right_bumper: boolRight bumper (RB).
left_stick_press: boolLeft stick click.
right_stick_press: boolRight stick click.
Menu button (≡).
view: boolView button (⧉).
left_trigger: u16Left trigger analog value (0–1023).
right_trigger: u16Right trigger analog value (0–1023).
left_stick_x: i16Left stick X axis (−32768–32767, positive = right).
left_stick_y: i16Left stick Y axis (−32768–32767, positive = up).
right_stick_x: i16Right stick X axis (−32768–32767, positive = right).
right_stick_y: i16Right stick Y axis (−32768–32767, positive = up).
Trait Implementations§
Source§impl Clone for GamepadReport
impl Clone for GamepadReport
Source§fn clone(&self) -> GamepadReport
fn clone(&self) -> GamepadReport
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GamepadReport
impl Debug for GamepadReport
Source§impl Default for GamepadReport
impl Default for GamepadReport
Source§fn default() -> GamepadReport
fn default() -> GamepadReport
Returns the “default value” for a type. Read more
Source§impl Format for GamepadReport
impl Format for GamepadReport
Source§impl PartialEq for GamepadReport
impl PartialEq for GamepadReport
impl Eq for GamepadReport
impl StructuralPartialEq for GamepadReport
Auto Trait Implementations§
impl Freeze for GamepadReport
impl RefUnwindSafe for GamepadReport
impl Send for GamepadReport
impl Sync for GamepadReport
impl Unpin for GamepadReport
impl UnwindSafe for GamepadReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more