pub enum JoystickValue {
Axis {
id: u8,
value: f32,
},
Button {
id: u8,
pressed: bool,
},
POV {
id: u8,
angle: i16,
},
}Expand description
Enum representing a value from a Joystick to be transmitted to the roboRIO
Variants§
Axis
Represents an axis value to be sent to the roboRIO
value should range from -1.0..=1.0, or 0.0..=1.0 if the axis is a trigger
Button
Represents a button value to be sent to the roboRIO
POV
Represents a POV, or D-pad value to be sent to the roboRIO
Trait Implementations§
Source§impl Clone for JoystickValue
impl Clone for JoystickValue
Source§fn clone(&self) -> JoystickValue
fn clone(&self) -> JoystickValue
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 JoystickValue
impl Debug for JoystickValue
Source§impl PartialEq for JoystickValue
impl PartialEq for JoystickValue
impl Copy for JoystickValue
impl StructuralPartialEq for JoystickValue
Auto Trait Implementations§
impl Freeze for JoystickValue
impl RefUnwindSafe for JoystickValue
impl Send for JoystickValue
impl Sync for JoystickValue
impl Unpin for JoystickValue
impl UnsafeUnpin for JoystickValue
impl UnwindSafe for JoystickValue
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