Struct robotics_signals::sensors::joystick::JoystickFeedback
source · [−]#[repr(C)]pub struct JoystickFeedback {
pub ty: FeedbackType,
pub id: u8,
pub intensity: f32,
}
Fields
ty: FeedbackType
id: u8
This will hold an id number for each type of each feedback. Example, the first led would be id=0, the second would be id=1
intensity: f32
Intensity of the feedback, from 0.0 to 1.0, inclusive. If device is actually binary, driver should treat 0<=x<0.5 as off, 0.5<=x<=1 as on.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for JoystickFeedback
impl<'de> Deserialize<'de> for JoystickFeedback
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for JoystickFeedback
impl Serialize for JoystickFeedback
Auto Trait Implementations
impl RefUnwindSafe for JoystickFeedback
impl Send for JoystickFeedback
impl Sync for JoystickFeedback
impl Unpin for JoystickFeedback
impl UnwindSafe for JoystickFeedback
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more