Fixing chorus menus.

dev
Holger Wirtz 6 years ago
parent a0874087a0
commit 4ca5246e63
  1. 37
      UI.hpp

@ -997,11 +997,17 @@ void callback_chorus_frequency_function()
#ifdef DEBUG
Serial.println(F("callback_chorus_frequency_function"));
#endif
Serial.println("0");
menu_system.change_menu(chorus_frequency_menu);
Serial.println("1");
menu_position[EFFECTS] = encoder_value[RIGHT_ENCODER];
Serial.println("2");
encoder_value[RIGHT_ENCODER] = configuration.chorus_frequency;
Serial.println("3");
enc[RIGHT_ENCODER].write(configuration.chorus_frequency, ENC_CHORUS_FREQUENCY_MIN, ENC_CHORUS_FREQUENCY_MAX);
Serial.println("4");
menu_system.update();
Serial.println("5");
}
void callback_chorus_delay_function()
@ -1464,6 +1470,24 @@ void init_menus(void)
reverb_level_screen.set_displayLineCount(2);
reverb_level_menu.add_screen(reverb_level_screen);
// setup chorus_frequency menu
chorus_frequency_screen.add_line(chorus_frequency_line1);
chorus_frequency_screen.add_line(chorus_frequency_line2);
chorus_frequency_screen.set_displayLineCount(2);
chorus_frequency_menu.add_screen(chorus_frequency_screen);
// setup chorus_delay menu
chorus_delay_screen.add_line(chorus_delay_line1);
chorus_delay_screen.add_line(chorus_delay_line2);
chorus_delay_screen.set_displayLineCount(2);
chorus_delay_menu.add_screen(chorus_delay_screen);
// setup chorus_level menu
chorus_level_screen.add_line(chorus_level_line1);
chorus_level_screen.add_line(chorus_level_line2);
chorus_level_screen.set_displayLineCount(2);
chorus_level_menu.add_screen(chorus_level_screen);
// setup bass_lr_level menu
bass_lr_level_screen.add_line(bass_lr_level_line1);
bass_lr_level_screen.add_line(bass_lr_level_line2);
@ -1861,7 +1885,7 @@ void set_chorus_frequency(uint8_t value)
Serial.print(F("Set CHORUS_FREQUENCY "));
Serial.println(value);
#endif
float tmp = mapfloat(float(value), ENC_CHORUS_FREQUENCY_MIN, ENC_CHORUS_FREQUENCY_MAX, 0.0, 1.0);
//float tmp = mapfloat(float(value), ENC_CHORUS_FREQUENCY_MIN, ENC_CHORUS_FREQUENCY_MAX, 0.0, 1.0);
// TDB
configuration.chorus_frequency = value;
}
@ -1872,7 +1896,7 @@ void set_chorus_delay(uint8_t value)
Serial.print(F("Set CHORUS_DELAY "));
Serial.println(value);
#endif
float tmp = mapfloat(float(value), ENC_CHORUS_DELAY_MIN, ENC_CHORUS_DELAY_MAX, 0.0, 1.0);
//float tmp = mapfloat(float(value), ENC_CHORUS_DELAY_MIN, ENC_CHORUS_DELAY_MAX, 0.0, 1.0);
// TDB
configuration.chorus_delay = value;
}
@ -1883,7 +1907,7 @@ void set_chorus_level(uint8_t value)
Serial.print(F("Set CHORUS_LEVEL "));
Serial.println(value);
#endif
float tmp = mapfloat(float(value), ENC_CHORUS_LEVEL_MIN, ENC_CHORUS_LEVEL_MAX, 0.0, 1.0);
//float tmp = mapfloat(float(value), ENC_CHORUS_LEVEL_MIN, ENC_CHORUS_LEVEL_MAX, 0.0, 1.0);
// TDB
configuration.chorus_level = value;
}
@ -2657,13 +2681,6 @@ void handle_ui(void)
{
#ifdef DEBUG
Serial.println(F("from bass_lr_level to effects"));
#endif
goto_effects_menu();
}
else if (menu_system.get_currentScreen() == &effects_screen) // effects menu
{
#ifdef DEBUG
Serial.println(F("from pan_trem_frequency to effects"));
#endif
goto_effects_menu();
}

Loading…
Cancel
Save