fix debouncer + other misc fixes for prod board
This commit is contained in:
parent
b52d911c12
commit
4e9428cb5f
2 changed files with 8 additions and 8 deletions
|
|
@ -48,10 +48,10 @@ mod settings {
|
|||
pub fn as_brightness_divisor(&self) -> u8 {
|
||||
match self {
|
||||
Self::Off => u8::MAX,
|
||||
Self::Low => 4,
|
||||
Self::Medium => 3,
|
||||
Self::High => 2,
|
||||
Self::Maximum => 1,
|
||||
Self::Low => 8,
|
||||
Self::Medium => 6,
|
||||
Self::High => 4,
|
||||
Self::Maximum => 2,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -459,7 +459,7 @@ impl App {
|
|||
|
||||
if self.services.synth0.need_service() {
|
||||
let out = match self.services.synth0.service() {
|
||||
Some(value) => value / 4,
|
||||
Some(value) => value / 10,
|
||||
// Some(value) => value / self.settings.volume.as_volume_divisor(),
|
||||
None => 0,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ fn app_main(mut p: hal::Peripherals) -> ! {
|
|||
DebouncedGPIO::new(sense_coin_pin.degrade(), core_config.tick_rate_hz, 100);
|
||||
// main button debouncer (100ms)
|
||||
let mut main_btn_input =
|
||||
DebouncedGPIO::new(main_btn_pin.degrade(), core_config.tick_rate_hz, 100);
|
||||
DebouncedGPIO::new(main_btn_pin.degrade(), core_config.tick_rate_hz, 20);
|
||||
// button debouncer (100ms)
|
||||
let mut volume_btn_input =
|
||||
DebouncedGPIO::new(volume_btn_pin.degrade(), core_config.tick_rate_hz, 100);
|
||||
|
|
@ -398,8 +398,8 @@ fn app_main(mut p: hal::Peripherals) -> ! {
|
|||
// println!("main button", value);
|
||||
|
||||
match value {
|
||||
true => app.main_button_release(),
|
||||
false => app.main_button_press(),
|
||||
true => app.main_button_press(),
|
||||
false => app.main_button_release(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue