state->counter_idx=0;//reset counter index
}
print_counter(state);
+ beep_counter(state);
break;
case EVENT_ALARM_LONG_PRESS:
state->counter_idx=0; // reset counter index
return true;
}
+// beep counter index times
+void beep_counter(counter_state_t *state) {
+
+ int low_count = state->counter_idx/5;
+ int high_count = state->counter_idx - low_count * 5;
+
+ for (int i=0; i<low_count; i++) {
+ watch_buzzer_play_note(BUZZER_NOTE_A6, 50);
+ watch_buzzer_play_note(BUZZER_NOTE_REST, 100);
+ }
+
+ //sleep between high and low
+ watch_buzzer_play_note(BUZZER_NOTE_REST, 200);
+
+ for (int i=0; i<high_count; i++) {
+ watch_buzzer_play_note(BUZZER_NOTE_B6, 50);
+ watch_buzzer_play_note(BUZZER_NOTE_REST, 100);
+ }
+}
+
+
// print counter index at the center of display.
void print_counter(counter_state_t *state) {
char buf[14];
void counter_face_resign(movement_settings_t *settings, void *context);
void print_counter(counter_state_t *state);
+void beep_counter(counter_state_t *state);
#define counter_face ((const watch_face_t){ \
counter_face_setup, \