diff options
author | Joey Castillo <jose.castillo@gmail.com> | 2021-10-03 19:16:14 -0400 |
---|---|---|
committer | Joey Castillo <jose.castillo@gmail.com> | 2021-10-03 19:16:14 -0400 |
commit | 64485b4255271dca8d6d38a91fa9ace610bf7222 (patch) | |
tree | 55b55757070d9f6d352387e952fe125ca29e6123 | |
parent | a6d8a098507ed13537e17e51bb545dcadb579d40 (diff) | |
download | Sensor-Watch-64485b4255271dca8d6d38a91fa9ace610bf7222.tar.gz Sensor-Watch-64485b4255271dca8d6d38a91fa9ace610bf7222.tar.bz2 Sensor-Watch-64485b4255271dca8d6d38a91fa9ace610bf7222.zip |
implement beep / silent preference
-rw-r--r-- | launcher/launcher.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/launcher/launcher.c b/launcher/launcher.c index 0d4fbe86..77dc303c 100644 --- a/launcher/launcher.c +++ b/launcher/launcher.c @@ -40,6 +40,7 @@ void launcher_move_to_next_widget() { void app_init() { memset(&launcher_state, 0, sizeof(launcher_state)); launcher_state.launcher_settings.bit.led_green_color = 0xF; + launcher_state.launcher_settings.bit.button_should_sound = true; watch_date_time date_time = watch_rtc_get_date_time(); watch_rtc_set_date_time(date_time); } @@ -80,7 +81,9 @@ bool app_loop() { // play a beep if the widget has changed in response to a user's press of the MODE button if (launcher_state.widget_changed) { // low note for nonzero case, high note for return to widget 0 - watch_buzzer_play_note(launcher_state.current_widget ? BUZZER_NOTE_C7 : BUZZER_NOTE_C8, 50); + if (launcher_state.launcher_settings.bit.button_should_sound) { + watch_buzzer_play_note(launcher_state.current_widget ? BUZZER_NOTE_C7 : BUZZER_NOTE_C8, 50); + } launcher_state.widget_changed = false; } |