From 73863dd19152d3bdaa9f1d0b875257fca4ffc6ef Mon Sep 17 00:00:00 2001 From: duembgen Date: Tue, 4 May 2021 17:56:24 +0200 Subject: [PATCH] Add break and modify sweep --- firmware/audio_shield_firmware/Core/Inc/sound.h | 2 +- firmware/audio_shield_firmware/Core/Src/main.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/audio_shield_firmware/Core/Inc/sound.h b/firmware/audio_shield_firmware/Core/Inc/sound.h index 0c221790..538a31b8 100644 --- a/firmware/audio_shield_firmware/Core/Inc/sound.h +++ b/firmware/audio_shield_firmware/Core/Inc/sound.h @@ -77,7 +77,7 @@ freq_list_t freq_list_tim[] = { }; -int16_t sweep[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, REPEAT}; +int16_t sweep[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, STOP}; int16_t sweep_three[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, diff --git a/firmware/audio_shield_firmware/Core/Src/main.c b/firmware/audio_shield_firmware/Core/Src/main.c index e9142c57..454556ce 100644 --- a/firmware/audio_shield_firmware/Core/Src/main.c +++ b/firmware/audio_shield_firmware/Core/Src/main.c @@ -376,6 +376,7 @@ int main(void) for (int i = 0; i < sizeof(melodies); i++) { if (melodies[i].index == buzzer_idx) { melody_index = i; + break; } }