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)
{
case 0:
case 0: // stereo
stereomono1.stereo(true);
break;
case 1:
case 1: // mono both
stereomono1.stereo(false);
configuration.pan = 0.5;
break;
case 2:
case 2: // mono right
volume_l.gain(0.0);
stereomono1.stereo(false);
configuration.pan = 0.5;
break;
case 3:
case 3: // mono left
volume_r.gain(0.0);
stereomono1.stereo(false);
configuration.pan = 0.5;
break;
}
}

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

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

Loading…
Cancel
Save