Fixed minor bug within read_pedals(3)

master
Dennis Potter 4 years ago
parent 6fd43a14ed
commit bef171200e
  1. 3
      src/pedal_operations.rs

@ -92,7 +92,6 @@ impl Pedals {
/// Read the current values of the pedals
pub fn read_pedals(&self, dev: & hidapi::HidDevice, peds: Vec<u8>) {
// This is kind of hacky, but for number of pedals == 2, the table shifts.
let total_width = 55 as usize;
// Check if passed pedal number is valid
@ -126,7 +125,7 @@ impl Pedals {
None => "< None >".to_string(),
};
println!("│ Pedal {ped} │ {name:<-width$}│", ped = i, name = key_name, width = total_width - 14);
println!("│ Pedal {ped} │ {name:<-width$}│", ped = ped, name = key_name, width = total_width - 14);
// Print spacer between lines
if i != peds.len() - 1 {

Loading…
Cancel
Save