From 6c20a04811803fac3d0cce1fff7294ab52cc5a82 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Fri, 12 Oct 2018 14:27:29 +0200 Subject: [PATCH] Super small fix. --- UI.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UI.cpp b/UI.cpp index 5dfc542..6dbd94a 100644 --- a/UI.cpp +++ b/UI.cpp @@ -291,10 +291,10 @@ void handle_ui(void) else if (enc[i].read() > ENC_FILTER_FRQ_STEPS) enc[i].write(ENC_FILTER_FRQ_STEPS); effect_filter_frq = enc[i].read(); - filter1.frequency(EXP_FUNC((float)map(enc[i].read(), 0, ENC_FILTER_FRQ_STEPS, 0, 1024) / 150.0) * 10.0 + 80.0); + filter1.frequency(EXP_FUNC((float)map(effect_filter_frq, 0, ENC_FILTER_FRQ_STEPS, 0, 1024) / 150.0) * 10.0 + 80.0); #ifdef DEBUG Serial.print(F("Setting filter frequency to: ")); - Serial.println(EXP_FUNC((float)map(enc[i].read(), 0, ENC_FILTER_FRQ_STEPS, 0, 1024) / 150.0) * 10.0 + 80.0, DEC); + Serial.println(EXP_FUNC((float)map(effect_filter_frq, 0, ENC_FILTER_FRQ_STEPS, 0, 1024) / 150.0) * 10.0 + 80.0, DEC); #endif break; case UI_MAIN_FILTER_RES: