From 10f616582cb078db75e35cc45e122c90591ad9ba Mon Sep 17 00:00:00 2001 From: Thomas Schmid Date: Sat, 18 Jun 2022 23:03:19 +0200 Subject: [PATCH] update zauberstab.cpp Signed-off-by: Thomas Schmid --- firmware/src/zauberstab.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/firmware/src/zauberstab.cpp b/firmware/src/zauberstab.cpp index dbe8adb..85b8389 100644 --- a/firmware/src/zauberstab.cpp +++ b/firmware/src/zauberstab.cpp @@ -10,12 +10,14 @@ static uint16_t read_mic() { } int zauberstab_init() { - FastLED.addLeds(leds, NUM_LEDS); + FastLED.addLeds(leds, NUM_LEDS); + //FastLED.setMaxPowerInVoltsAndMilliamps(5, 300); dc_cancelation_init(&dc_blocker, 0.95); return 0; } float get_sample() { - int32_t raw_sample = read_mic(); - return dc_cancelation_update(&dc_blocker, (float) raw_sample); + float sample = read_mic(); + sample = dc_cancelation_update(&dc_blocker, sample); + return sample; } \ No newline at end of file