From d26f20631bd773effbbcbc632396a3ff419df475 Mon Sep 17 00:00:00 2001 From: Thammi Date: Sat, 13 Oct 2012 16:50:14 +0200 Subject: [PATCH] sound detect: deinitialize sound detection mode --- firmware/apps/sound_detection.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/firmware/apps/sound_detection.c b/firmware/apps/sound_detection.c index c814a25..ff18a9b 100644 --- a/firmware/apps/sound_detection.c +++ b/firmware/apps/sound_detection.c @@ -16,6 +16,13 @@ */ static void sound_detection(void) { + if(mode_last_tick) { + led_off(LED_L | LED_R); + set_motor(MOTOR_OFF); + music_setNote(NOTE_PAUSE, 0); + return; + } + static timer_t mytimer; static uint16_t maxval; // maximum of ADC values read during the las timer interval static uint16_t lastmaxval; // maximum of values during last timer interval