add short and long press timer integration

This commit is contained in:
sigil-03 2025-11-05 12:20:54 -07:00
parent d815507bcc
commit 2d8e2ce6ee

View file

@ -288,11 +288,13 @@ impl App {
self.timers.batt_adc_timer.service();
#[cfg(feature = "enable_print")]
println!("sp service");
self.timers.sp_timer.reset();
}
if self.timers.lp_timer.need_service() {
self.timers.batt_adc_timer.service();
#[cfg(feature = "enable_print")]
println!("lp service");
self.timers.lp_timer.reset();
}
if self.timers.batt_adc_timer.need_service() {
self.timers.batt_adc_timer.service();
@ -385,11 +387,17 @@ impl App {
// TODO
#[cfg(feature = "enable_print")]
println!("main button press");
self.timers.sp_timer.reset();
self.timers.lp_timer.reset();
self.timers.sp_timer.enable(true);
self.timers.lp_timer.enable(true);
}
pub fn main_button_release(&mut self) {
// TODO
#[cfg(feature = "enable_print")]
println!("main button release");
self.timers.sp_timer.reset();
self.timers.lp_timer.reset();
}
pub fn coin_detect(&self) {
#[cfg(feature = "enable_print")]