File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 */
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ void led_bluepill_off(void);
2020void repeat_blink (uint8_t count , uint16_t time );
2121void blink_collision (void );
2222void speaker_warn_low_battery (void );
23+ void speaker_play_success (void );
2324bool button_left_read (void );
2425bool button_right_read (void );
2526bool button_left_read_consecutive (uint32_t count );
Original file line number Diff line number Diff 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 ();
You can’t perform that action at this time.
0 commit comments