diff --git a/ch32v-insert-coin/src/app.rs b/ch32v-insert-coin/src/app.rs index fb7e0fc..00b764e 100644 --- a/ch32v-insert-coin/src/app.rs +++ b/ch32v-insert-coin/src/app.rs @@ -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, }; diff --git a/ch32v-insert-coin/src/main.rs b/ch32v-insert-coin/src/main.rs index dac3140..c14a77a 100644 --- a/ch32v-insert-coin/src/main.rs +++ b/ch32v-insert-coin/src/main.rs @@ -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(), } }