LCXL: Make knobs' leds' color constant when controlling master bus

This commit is contained in:
Térence Clastres 2018-08-19 18:38:42 +02:00
parent 3f77c1245c
commit 65cadf2cb6

View file

@ -368,10 +368,11 @@ LaunchControlXL::update_knob_led(uint8_t n)
uint32_t absolute_strip_num = (n + bank_start) % 8; uint32_t absolute_strip_num = (n + bank_start) % 8;
if (stripable[n]) {
switch (absolute_strip_num) { switch (absolute_strip_num) {
case 0: case 0:
case 4: case 4:
if (stripable[n] && stripable[n]->is_selected()) { if (stripable[n]->is_selected()) {
color = RedFull; color = RedFull;
} else { } else {
color = RedLow; color = RedLow;
@ -380,7 +381,7 @@ LaunchControlXL::update_knob_led(uint8_t n)
case 1: case 1:
case 5: case 5:
if (stripable[n] && stripable[n]->is_selected()) { if (stripable[n]->is_selected()) {
color = YellowFull; color = YellowFull;
} else { } else {
color = YellowLow; color = YellowLow;
@ -389,7 +390,7 @@ LaunchControlXL::update_knob_led(uint8_t n)
case 2: case 2:
case 6: case 6:
if (stripable[n] && stripable[n]->is_selected()) { if (stripable[n]->is_selected()) {
color = GreenFull; color = GreenFull;
} else { } else {
color = GreenLow; color = GreenLow;
@ -398,12 +399,17 @@ LaunchControlXL::update_knob_led(uint8_t n)
case 3: case 3:
case 7: case 7:
if (stripable[n] && stripable[n]->is_selected()) { if (stripable[n]->is_master()) {
color = RedFull;
} else {
if (stripable[n]->is_selected()) {
color = AmberFull; color = AmberFull;
} else { } else {
color = AmberLow; color = AmberLow;
} }
} }
}
}
Knob* knobs_col[3]; Knob* knobs_col[3];
knobs_by_column(n, knobs_col); knobs_by_column(n, knobs_col);
@ -440,7 +446,7 @@ LaunchControlXL::update_track_control_led(uint8_t n)
} }
break; break;
case TrackSolo: case TrackSolo:
if (ac && stripable[n] != master ) { if (ac && !(stripable[n]->is_master())) {
if (ac->get_value()) { if (ac->get_value()) {
b->set_color(GreenFull); b->set_color(GreenFull);
} else { } else {