From ff0ee75a565ade3c7290d37272681af30893e76c Mon Sep 17 00:00:00 2001 From: Jan Lentfer Date: Thu, 3 Jan 2019 00:03:31 +0100 Subject: [PATCH] LCXL: Fix a problem in switch_bank --- libs/surfaces/launch_control_xl/controllers.cc | 1 + libs/surfaces/launch_control_xl/launch_control_xl.cc | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/surfaces/launch_control_xl/controllers.cc b/libs/surfaces/launch_control_xl/controllers.cc index ee9ca7719b..12d2439937 100644 --- a/libs/surfaces/launch_control_xl/controllers.cc +++ b/libs/surfaces/launch_control_xl/controllers.cc @@ -674,6 +674,7 @@ LaunchControlXL::solo_mute_rec_changed(uint32_t n) { if (!stripable[n]) { return; } + DEBUG_TRACE (DEBUG::LaunchControlXL, "solo_mute_rec_changed - CALLING switch_bank(bank_start)\n"); switch_bank(bank_start); //update_track_control_led(n); } diff --git a/libs/surfaces/launch_control_xl/launch_control_xl.cc b/libs/surfaces/launch_control_xl/launch_control_xl.cc index a1f22be301..9f8909d1dd 100644 --- a/libs/surfaces/launch_control_xl/launch_control_xl.cc +++ b/libs/surfaces/launch_control_xl/launch_control_xl.cc @@ -271,6 +271,7 @@ LaunchControlXL::init_buttons() void LaunchControlXL::init_buttons (ButtonID buttons[], uint8_t i) { + DEBUG_TRACE (DEBUG::LaunchControlXL, "init_buttons buttons[]\n"); for (uint8_t n = 0; n < i; ++n) { boost::shared_ptr button = boost::dynamic_pointer_cast (id_note_button_map[buttons[n]]); if (button) { @@ -307,6 +308,7 @@ LaunchControlXL::init_buttons (ButtonID buttons[], uint8_t i) void LaunchControlXL::init_buttons (bool startup) { + DEBUG_TRACE (DEBUG::LaunchControlXL, "init_buttons (bool startup)\n"); if (startup && !device_mode()) { switch_bank(bank_start); return; @@ -1090,7 +1092,6 @@ LaunchControlXL::switch_bank (uint32_t base) if (n == stripable_counter) { /* last strip +1 -> another bank exists */ DEBUG_TRACE (DEBUG::LaunchControlXL, string_compose ("StripableList iterator - n: %1. Filling next_base\n", n)); next_base = *strip; - bank_start = base; break; } @@ -1101,6 +1102,8 @@ LaunchControlXL::switch_bank (uint32_t base) /* not even the first stripable exists, do nothing */ DEBUG_TRACE (DEBUG::LaunchControlXL, "not even first stripable exists.. returning\n"); return; + } else { + bank_start = base; } if (sl && sr) {