pub struct ClassicReading {Show 21 fields
pub joystick_left_x: u8,
pub joystick_left_y: u8,
pub joystick_right_x: u8,
pub joystick_right_y: u8,
pub trigger_left: u8,
pub trigger_right: u8,
pub dpad_up: bool,
pub dpad_down: bool,
pub dpad_left: bool,
pub dpad_right: bool,
pub button_b: bool,
pub button_a: bool,
pub button_x: bool,
pub button_y: bool,
pub button_trigger_l: bool,
pub button_trigger_r: bool,
pub button_zl: bool,
pub button_zr: bool,
pub button_minus: bool,
pub button_plus: bool,
pub button_home: bool,
}
Expand description
Data from a classic controller after it has been deserialized
In low-res mode, axes with less than 8 bits of range will be scaled to approximate an 8 bit range. in hi-res mode, all axes arleady have 8 bits of range
Fields§
§joystick_left_x: u8
§joystick_left_y: u8
§joystick_right_x: u8
§joystick_right_y: u8
§trigger_left: u8
§trigger_right: u8
§dpad_up: bool
§dpad_down: bool
§dpad_left: bool
§dpad_right: bool
Implementations§
Source§impl ClassicReading
impl ClassicReading
Sourcepub fn from_data(data: &[u8]) -> Option<ClassicReading>
pub fn from_data(data: &[u8]) -> Option<ClassicReading>
Convert from a wii-ext report into controller data
Trait Implementations§
Source§impl Debug for ClassicReading
impl Debug for ClassicReading
Source§impl Default for ClassicReading
impl Default for ClassicReading
Source§fn default() -> ClassicReading
fn default() -> ClassicReading
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ClassicReading
impl RefUnwindSafe for ClassicReading
impl Send for ClassicReading
impl Sync for ClassicReading
impl Unpin for ClassicReading
impl UnwindSafe for ClassicReading
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