Fix and UI improvments for panorama.

pull/8/head
Holger Wirtz 5 years ago
parent d1577d4ef1
commit f03960fb75
  1. 11
      MicroDexed.ino
  2. 21
      UI.hpp
  3. 2
      config.h

@ -1018,19 +1018,22 @@ void set_volume(uint8_t v, int8_t p, uint8_t m)
switch (m) switch (m)
{ {
case 0: case 0: // stereo
stereomono1.stereo(true); stereomono1.stereo(true);
break; break;
case 1: case 1: // mono both
stereomono1.stereo(false); stereomono1.stereo(false);
configuration.pan = 0.5;
break; break;
case 2: case 2: // mono right
volume_l.gain(0.0); volume_l.gain(0.0);
stereomono1.stereo(false); stereomono1.stereo(false);
configuration.pan = 0.5;
break; break;
case 3: case 3: // mono left
volume_r.gain(0.0); volume_r.gain(0.0);
stereomono1.stereo(false); stereomono1.stereo(false);
configuration.pan = 0.5;
break; break;
} }
} }

@ -1428,6 +1428,11 @@ void UI_func_panorama(uint8_t param)
// setup function // setup function
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("Panorama")); lcd.print(F("Panorama"));
if (configuration.mono > 0)
{
lcd.setCursor(0, 1);
lcd.print(F("MONO-disabled"));
}
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1436,25 +1441,29 @@ void UI_func_panorama(uint8_t param)
{ {
LCDML.FUNC_goBackToMenu(); LCDML.FUNC_goBackToMenu();
} }
else if (LCDML.BT_checkDown()) else if (LCDML.BT_checkDown() && configuration.mono == 0)
{ {
if (configuration.pan < PANORAMA_MAX) if (configuration.pan < PANORAMA_MAX)
{ {
configuration.pan++; configuration.pan++;
} }
} }
else if (LCDML.BT_checkUp()) else if (LCDML.BT_checkUp() && configuration.mono == 0)
{ {
if (configuration.pan > PANORAMA_MIN) if (configuration.pan > PANORAMA_MIN)
{ {
configuration.pan--; configuration.pan--;
} }
} }
if (configuration.mono == 0)
{
lcd.setCursor(0, 1); lcd.setCursor(0, 1);
lcd_display_int(configuration.pan, 2, false, true, true); lcd_display_int(configuration.pan, 2, false, true, true);
set_volume(configuration.vol, configuration.pan, configuration.mono); set_volume(configuration.vol, configuration.pan, configuration.mono);
} }
}
if (LCDML.FUNC_close()) // ****** STABLE END ********* if (LCDML.FUNC_close()) // ****** STABLE END *********
{ {
@ -1496,13 +1505,13 @@ void UI_func_stereo_mono(uint8_t param)
switch (configuration.mono) switch (configuration.mono)
{ {
case 0: case 0:
lcd.print(F("[MONO ]"));
stereomono1.stereo(false);
break;
case 1:
lcd.print(F("[STEREO]")); lcd.print(F("[STEREO]"));
stereomono1.stereo(true); stereomono1.stereo(true);
break; break;
case 1:
lcd.print(F("[MONO ]"));
stereomono1.stereo(false);
break;
case 2: case 2:
lcd.print(F("[MONO-R]")); lcd.print(F("[MONO-R]"));
stereomono1.stereo(false); stereomono1.stereo(false);

@ -265,7 +265,7 @@
#else #else
#define MONO_MIN 0 #define MONO_MIN 0
#define MONO_MAX 3 #define MONO_MAX 3
#define MONO_DEFAULT 1 #define MONO_DEFAULT 0
#endif #endif
#define VOLUME_MIN 0 #define VOLUME_MIN 0

Loading…
Cancel
Save