From baa044e82f0ad4367da86e3fe55690e2ef1db739 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Thu, 14 May 2020 11:30:20 +0200 Subject: [PATCH] Fix for operator enable when using only one instance. --- UI.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UI.hpp b/UI.hpp index 90e8ade..a2770c7 100644 --- a/UI.hpp +++ b/UI.hpp @@ -3443,6 +3443,7 @@ void UI_handle_OP(uint8_t param) if (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) { +#if NUM_DEXED>1 if (op_selected == 0) { 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); } else +#endif op_selected = constrain(op_selected - 1, 0, 5); } else if (LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) { +#if NUM_DEXED>1 if (op_selected == 5) { 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); } else +#endif op_selected = constrain(op_selected + 1, 0, 5); } else if (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())