g29 0.2.1

A library offering an interface for Logitech G29 wheel/pedal and force feedback control.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/// This example illustrates the use case of this library
/// for reading G29 input, including steering and pedals.
use g29::controller::Controller;

fn main() {
    let mut controle = Controller::new();
    // set force feedback for G29 controller - make sure to set the Logitech to PS3 Mode
    controle.g29.lock().unwrap().force_feedback_constant(0.6);
    // Start the reading thread to continuously read input from the G29 device
    controle.start_pumping();
    loop {
        println!("steering = {:?}", g29.g29.lock().unwrap().get_state());
    }
}