Fix for operator enable when using only one instance.

pull/32/head
Holger Wirtz 5 years ago
parent 39609188a3
commit baa044e82f
  1. 4
      UI.hpp

@ -3443,6 +3443,7 @@ void UI_handle_OP(uint8_t param)
if (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) if (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())
{ {
#if NUM_DEXED>1
if (op_selected == 0) if (op_selected == 0)
{ {
selected_instance_id = !selected_instance_id; selected_instance_id = !selected_instance_id;
@ -3450,10 +3451,12 @@ 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);
} }
else else
#endif
op_selected = constrain(op_selected - 1, 0, 5); op_selected = constrain(op_selected - 1, 0, 5);
} }
else if (LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) else if (LCDML.BT_checkDown() && encoderDir[ENC_R].Down())
{ {
#if NUM_DEXED>1
if (op_selected == 5) if (op_selected == 5)
{ {
selected_instance_id = !selected_instance_id; selected_instance_id = !selected_instance_id;
@ -3461,6 +3464,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);
} }
else else
#endif
op_selected = constrain(op_selected + 1, 0, 5); op_selected = constrain(op_selected + 1, 0, 5);
} }
else if (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort()) else if (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())

Loading…
Cancel
Save