pub struct G29Interface { /* private fields */ }
Expand description
! The G29Interface
struct is the underlying driver for the G29 device, managing communication and state.
Implementations§
Source§impl G29Interface
impl G29Interface
Sourcepub fn reset(&self)
pub fn reset(&self)
Resets the G29 device, including steering wheel calibration. calibration the steering wheel of the G2
Sourcepub fn force_feedback_constant(&self, val: f32)
pub fn force_feedback_constant(&self, val: f32)
Sets constant force feedback on the G29 device.
Sourcepub fn set_autocenter(&self, strength: f32, rate: f32)
pub fn set_autocenter(&self, strength: f32, rate: f32)
Configures autocentering strength and rate. default value to be used strength = 0.5 and rate = 0.05
Sourcepub fn update_state(&mut self, byte_array: &Vec<u8>)
pub fn update_state(&mut self, byte_array: &Vec<u8>)
Updates the internal state based on the latest data.
Sourcepub fn calculate_steering(&self, start: &u8, end: &u8) -> u8
pub fn calculate_steering(&self, start: &u8, end: &u8) -> u8
Calculates the scaled steering value based on raw input.
Sourcepub fn carla_vehicle_controle(&self) -> HashMap<String, f32>
pub fn carla_vehicle_controle(&self) -> HashMap<String, f32>
Transform G29 Controller input to caral controlle throttle in range of 0 -> 1 brake in range of 0 -> 1 steer in range of -1 -> 1
Trait Implementations§
Auto Trait Implementations§
impl Freeze for G29Interface
impl !RefUnwindSafe for G29Interface
impl Send for G29Interface
impl !Sync for G29Interface
impl Unpin for G29Interface
impl !UnwindSafe for G29Interface
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