Fix static list (still only partially filled out)
This commit is contained in:
parent
ca87295359
commit
dde97be4a0
1 changed files with 4 additions and 2 deletions
|
@ -22,7 +22,7 @@ fn main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const JOYSTICK_BUTTONS: &[evdev::KeyCode] = &[
|
static JOYSTICK_BUTTONS: [evdev::KeyCode; 11] = [
|
||||||
evdev::KeyCode::BTN_TRIGGER_HAPPY1,
|
evdev::KeyCode::BTN_TRIGGER_HAPPY1,
|
||||||
evdev::KeyCode::BTN_TRIGGER_HAPPY2,
|
evdev::KeyCode::BTN_TRIGGER_HAPPY2,
|
||||||
evdev::KeyCode::BTN_TRIGGER_HAPPY3,
|
evdev::KeyCode::BTN_TRIGGER_HAPPY3,
|
||||||
|
@ -71,7 +71,9 @@ fn print_device(path: PathBuf, device: RawDevice, verbose: u8) {
|
||||||
if let Ok(abs_info) = device.get_absinfo() {
|
if let Ok(abs_info) = device.get_absinfo() {
|
||||||
if abs_info.count() > 0 {
|
if abs_info.count() > 0 {
|
||||||
println!("\tAxis Data:");
|
println!("\tAxis Data:");
|
||||||
abs_info.for_each(|info| println!("\t\t{} {}"));
|
for (axis, info) in abs_info {
|
||||||
|
println!("\t\t{} {}-{}", axis, info.minimum(), info.maximum());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue