fix debouncer + other misc fixes for prod board

This commit is contained in:
sigil-03 2025-11-06 15:10:08 -07:00
parent b52d911c12
commit 4e9428cb5f
2 changed files with 8 additions and 8 deletions

View file

@ -48,10 +48,10 @@ mod settings {
pub fn as_brightness_divisor(&self) -> u8 { pub fn as_brightness_divisor(&self) -> u8 {
match self { match self {
Self::Off => u8::MAX, Self::Off => u8::MAX,
Self::Low => 4, Self::Low => 8,
Self::Medium => 3, Self::Medium => 6,
Self::High => 2, Self::High => 4,
Self::Maximum => 1, Self::Maximum => 2,
} }
} }
} }
@ -459,7 +459,7 @@ impl App {
if self.services.synth0.need_service() { if self.services.synth0.need_service() {
let out = match self.services.synth0.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(), // Some(value) => value / self.settings.volume.as_volume_divisor(),
None => 0, None => 0,
}; };

View file

@ -237,7 +237,7 @@ fn app_main(mut p: hal::Peripherals) -> ! {
DebouncedGPIO::new(sense_coin_pin.degrade(), core_config.tick_rate_hz, 100); DebouncedGPIO::new(sense_coin_pin.degrade(), core_config.tick_rate_hz, 100);
// main button debouncer (100ms) // main button debouncer (100ms)
let mut main_btn_input = 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) // button debouncer (100ms)
let mut volume_btn_input = let mut volume_btn_input =
DebouncedGPIO::new(volume_btn_pin.degrade(), core_config.tick_rate_hz, 100); 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); // println!("main button", value);
match value { match value {
true => app.main_button_release(), true => app.main_button_press(),
false => app.main_button_press(), false => app.main_button_release(),
} }
} }