Skip to content

Commit 741b7de

Browse files
committed
Add speaker indication after phase completion
1 parent 7a90649 commit 741b7de

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

src/hmi.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,17 @@ void speaker_warn_low_battery(void)
121121
sleep_ticks(50);
122122
}
123123

124+
/**
125+
* @brief Play three fast, high tones to note a successful operation.
126+
*/
127+
void speaker_play_success(void)
128+
{
129+
for (int i = 0; i < 3; i++) {
130+
speaker_play('C', 8, 0, 0.05);
131+
sleep_ticks(50);
132+
}
133+
}
134+
124135
/**
125136
* @brief Function to read button left.
126137
*/

src/hmi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ void led_bluepill_off(void);
2020
void repeat_blink(uint8_t count, uint16_t time);
2121
void blink_collision(void);
2222
void speaker_warn_low_battery(void);
23+
void speaker_play_success(void);
2324
bool button_left_read(void);
2425
bool button_right_read(void);
2526
bool button_left_read_consecutive(uint32_t count);

src/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ static void after_moving(void)
9595
reset_motion();
9696
blink_collision();
9797
} else {
98+
speaker_play_success();
9899
repeat_blink(10, 100);
99100
}
100101
reset_motion();

0 commit comments

Comments
 (0)