Fixes for operator enable/disable.

pull/32/head
Holger Wirtz 5 years ago
parent ee4577abc4
commit 629c021e14
  1. 4
      MicroDexed.ino
  2. 28
      UI.hpp

@ -1381,11 +1381,11 @@ void initial_values_from_eeprom(bool init)
MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].fc_range, configuration.dexed[instance_id].fc_assign, configuration.dexed[instance_id].fc_mode); MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].fc_range, configuration.dexed[instance_id].fc_assign, configuration.dexed[instance_id].fc_mode);
MicroDexed[instance_id]->setBCController(configuration.dexed[instance_id].bc_range, configuration.dexed[instance_id].bc_assign, configuration.dexed[instance_id].bc_mode); MicroDexed[instance_id]->setBCController(configuration.dexed[instance_id].bc_range, configuration.dexed[instance_id].bc_assign, configuration.dexed[instance_id].bc_mode);
MicroDexed[instance_id]->setATController(configuration.dexed[instance_id].at_range, configuration.dexed[instance_id].at_assign, configuration.dexed[instance_id].at_mode); MicroDexed[instance_id]->setATController(configuration.dexed[instance_id].at_range, configuration.dexed[instance_id].at_assign, configuration.dexed[instance_id].at_mode);
MicroDexed[instance_id]->controllers.refresh();
MicroDexed[instance_id]->setOPs(configuration.dexed[instance_id].op_enabled); MicroDexed[instance_id]->setOPs(configuration.dexed[instance_id].op_enabled);
MicroDexed[instance_id]->doRefreshVoice();
MicroDexed[instance_id]->setMaxNotes(configuration.dexed[instance_id].polyphony); MicroDexed[instance_id]->setMaxNotes(configuration.dexed[instance_id].polyphony);
MicroDexed[instance_id]->setMonoMode(configuration.sys.mono); MicroDexed[instance_id]->setMonoMode(configuration.sys.mono);
MicroDexed[instance_id]->controllers.refresh();
MicroDexed[instance_id]->doRefreshVoice();
#if defined(USE_FX) #if defined(USE_FX)
//chorus_mixer[instance_id]->gain(0, 1.0 - pseudo_log_curve(mapfloat(configuration.fx.chorus_level[instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0), true)); //chorus_mixer[instance_id]->gain(0, 1.0 - pseudo_log_curve(mapfloat(configuration.fx.chorus_level[instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0), true));

@ -434,9 +434,7 @@ void setup_ui(void)
lcd.init(); lcd.init();
lcd.backlight(); lcd.backlight();
lcd.clear(); lcd.clear();
lcd.blink_off(); lcd.noCursor();
lcd.cursor_off();
lcd.backlight();
#else #else
lcd.begin(); lcd.begin();
lcd.clear(); lcd.clear();
@ -3420,14 +3418,7 @@ void UI_handle_OP(uint8_t param)
lcd.print(F("Operator Enable")); lcd.print(F("Operator Enable"));
lcd.setCursor(0, 1); lcd.setCursor(0, 1);
for (uint8_t i = 2; i < 8; i++) for (uint8_t i = 2; i < 8; i++)
{
lcd.print(F(" "));
lcd.write(i); lcd.write(i);
}
lcd.setCursor(op_selected * 2, 1);
lcd.print(F("["));
lcd.setCursor(op_selected * 2 + 2, 1);
lcd.print(F("]"));
#if NUM_DEXED > 1 #if NUM_DEXED > 1
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
@ -3435,12 +3426,13 @@ void UI_handle_OP(uint8_t param)
lcd.setCursor(15, 1); lcd.setCursor(15, 1);
lcd.write(1); lcd.write(1);
#endif #endif
lcd.setCursor(op_selected, 1);
lcd.blink();
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
{ {
uint8_t op_selected_old = op_selected;
if (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) if (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())
{ {
#if NUM_DEXED>1 #if NUM_DEXED>1
@ -3477,14 +3469,7 @@ void UI_handle_OP(uint8_t param)
lcd_OP_active_instance_number(selected_instance_id, configuration.dexed[selected_instance_id].op_enabled); lcd_OP_active_instance_number(selected_instance_id, configuration.dexed[selected_instance_id].op_enabled);
} }
lcd.setCursor(op_selected_old * 2, 1); lcd.setCursor(op_selected, 1);
lcd.print(F(" "));
lcd.setCursor(op_selected_old * 2 + 2, 1);
lcd.print(F(" "));
lcd.setCursor(op_selected * 2, 1);
lcd.print(F("["));
lcd.setCursor(op_selected * 2 + 2, 1);
lcd.print(F("]"));
MicroDexed[selected_instance_id]->setOPs(configuration.dexed[selected_instance_id].op_enabled); MicroDexed[selected_instance_id]->setOPs(configuration.dexed[selected_instance_id].op_enabled);
MicroDexed[selected_instance_id]->doRefreshVoice(); MicroDexed[selected_instance_id]->doRefreshVoice();
@ -3492,6 +3477,9 @@ void UI_handle_OP(uint8_t param)
if (LCDML.FUNC_close()) // ****** STABLE END ********* if (LCDML.FUNC_close()) // ****** STABLE END *********
{ {
lcd.noCursor();
lcd_special_chars(SCROLLBAR);
encoderDir[ENC_R].reset(); encoderDir[ENC_R].reset();
EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, dexed[0].op_enabled), configuration.dexed[0].op_enabled); EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, dexed[0].op_enabled), configuration.dexed[0].op_enabled);
#if NUM_DEXED > 1 #if NUM_DEXED > 1

Loading…
Cancel
Save