[][src]Enum ds::JoystickValue

pub enum JoystickValue {
    Axis {
        id: u8,
        value: f32,
    },
    Button {
        id: u8,
        pressed: bool,
    },
    POV {
        id: u8,
        angle: i16,
    },
}

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

Fields of Axis

id: u8value: f32
Button

Represents a button value to be sent to the roboRIO

Fields of Button

id: u8pressed: bool
POV

Represents a POV, or D-pad value to be sent to the roboRIO

Fields of POV

id: u8angle: i16

Trait Implementations

impl Clone for JoystickValue[src]

impl Copy for JoystickValue[src]

impl Debug for JoystickValue[src]

impl PartialEq<JoystickValue> for JoystickValue[src]

impl StructuralPartialEq for JoystickValue[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,