From 074c275db2630bf7e56ee3744f82281b6243ac60 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Thu, 19 Sep 2019 13:23:12 +0200 Subject: [PATCH] Fixing mono/stereo switch. --- UI.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/UI.hpp b/UI.hpp index 7f56123..0ee54eb 100644 --- a/UI.hpp +++ b/UI.hpp @@ -1983,7 +1983,7 @@ void set_treble(uint8_t value) configuration.treble = value; } -void set_stereo(int8_t value) +void set_stereo(uint8_t value) { if (value > ENC_STEREO_MAX) value = ENC_STEREO_MAX; @@ -2413,13 +2413,15 @@ void set_mono(uint8_t mode) #endif if (mode == 0) { - set_stereo(configuration.stereo); + ep->setStereo(mapfloat(float(configuration.stereo), ENC_STEREO_MIN, ENC_STEREO_MAX, 0.0, 1.0)); inverter.gain(-1.0); // change phase for second modulated delay (faked stereo mode) + configuration.mono = 0; } else { - set_stereo(ENC_STEREO_MIN); + ep->setStereo(0.0); inverter.gain(1.0); + configuration.mono = 1; } }