From 52ba3b371022ea5fb0340d156acbb5b02fff5f07 Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Sat, 28 Aug 2021 14:46:58 -0400 Subject: fix buzzer demo, add note about extwake --- Sensor Watch Buzzer Demo/app.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'Sensor Watch Buzzer Demo') diff --git a/Sensor Watch Buzzer Demo/app.c b/Sensor Watch Buzzer Demo/app.c index 5c2dbc7b..4d378b5c 100644 --- a/Sensor Watch Buzzer Demo/app.c +++ b/Sensor Watch Buzzer Demo/app.c @@ -4,15 +4,12 @@ typedef struct ApplicationState { bool play; - bool debounce_wait; } ApplicationState; ApplicationState application_state; void cb_alarm_pressed() { - if (application_state.debounce_wait) return; - application_state.debounce_wait = true; application_state.play = true; } @@ -24,7 +21,7 @@ void app_wake_from_deep_sleep() { } void app_setup() { - watch_register_button_callback(BTN_ALARM, cb_alarm_pressed); + watch_register_extwake_callback(BTN_ALARM, cb_alarm_pressed, true); watch_enable_display(); @@ -129,9 +126,5 @@ bool app_loop() { } } - // Wait a moment to debounce button input - delay_ms(250); - application_state.debounce_wait = false; - return true; } -- cgit v1.2.3