Revert "Console1: catch some more uncaught exceptions"

This reverts commit 99e2546477.
This commit is contained in:
Robin Gareus 2023-10-26 21:21:01 +02:00
parent 53e24168b6
commit 85d9e333c9
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 29 additions and 41 deletions

View File

@ -581,25 +581,21 @@ void
Console1::map_mute ()
{
DEBUG_TRACE (DEBUG::Console1, "Console1::map_mute ...\n");
try {
if (_current_stripable) {
if (_current_stripable->mute_control ()->muted ()) {
get_button (swap_solo_mute ? SOLO : MUTE)->set_led_state (true);
} else if (_current_stripable->mute_control ()->muted_by_others_soloing () ||
_current_stripable->mute_control ()->muted_by_masters ()) {
if (_current_stripable) {
if (_current_stripable->mute_control ()->muted ()) {
get_button (swap_solo_mute ? SOLO : MUTE)->set_led_state (true);
} else if (_current_stripable->mute_control ()->muted_by_others_soloing () ||
_current_stripable->mute_control ()->muted_by_masters ()) {
DEBUG_TRACE (DEBUG::Console1, "Console1::map_mute start blinking\n");
start_blinking (swap_solo_mute ? SOLO : MUTE);
} else {
DEBUG_TRACE (DEBUG::Console1, "Console1::map_mute stop blinking\n");
stop_blinking (swap_solo_mute ? SOLO : MUTE);
}
DEBUG_TRACE (DEBUG::Console1, "Console1::map_mute start blinking\n");
start_blinking (swap_solo_mute ? SOLO : MUTE);
} else {
DEBUG_TRACE (DEBUG::Console1, "Console1::map_mute stop blinking 2\n");
DEBUG_TRACE (DEBUG::Console1, "Console1::map_mute stop blinking\n");
stop_blinking (swap_solo_mute ? SOLO : MUTE);
}
} catch (ControlNotFoundException const&) {
DEBUG_TRACE (DEBUG::Console1, "Button not found\n");
} else {
DEBUG_TRACE (DEBUG::Console1, "Console1::map_mute stop blinking 2\n");
stop_blinking (swap_solo_mute ? SOLO : MUTE);
}
}
@ -617,28 +613,24 @@ void
Console1::map_phase ()
{
DEBUG_TRACE (DEBUG::Console1, "map_phase \n");
try {
ControllerButton* controllerButton = get_button (PHASE_INV);
if (_current_stripable && _current_stripable->phase_control ()) {
uint32_t channels = _current_stripable->phase_control ()->size ();
uint32_t inverted = 0;
for (uint32_t i = 0; i < channels; ++i) {
if (_current_stripable->phase_control ()->inverted (i))
++inverted;
}
if (inverted == 0) {
stop_blinking (PHASE_INV);
controllerButton->set_led_state (false);
} else if (inverted == channels) {
stop_blinking (PHASE_INV);
controllerButton->set_led_state (true);
} else
start_blinking (PHASE_INV);
} else {
controllerButton->set_led_state (false);
ControllerButton* controllerButton = get_button (PHASE_INV);
if (_current_stripable && _current_stripable->phase_control ()) {
uint32_t channels = _current_stripable->phase_control ()->size ();
uint32_t inverted = 0;
for (uint32_t i = 0; i < channels; ++i) {
if (_current_stripable->phase_control ()->inverted (i))
++inverted;
}
} catch (ControlNotFoundException const&) {
DEBUG_TRACE (DEBUG::Console1, "Button not found\n");
if (inverted == 0) {
stop_blinking (PHASE_INV);
controllerButton->set_led_state (false);
} else if (inverted == channels) {
stop_blinking (PHASE_INV);
controllerButton->set_led_state (true);
} else
start_blinking (PHASE_INV);
} else {
controllerButton->set_led_state (false);
}
}
@ -658,11 +650,7 @@ Console1::map_select ()
{
DEBUG_TRACE (DEBUG::Console1, "map_select())\n");
for (uint32_t i = 0; i < bank_size; ++i) {
try {
get_button (ControllerID (FOCUS1 + i))->set_led_state (i == current_strippable_index);
} catch (ControlNotFoundException const&) {
DEBUG_TRACE (DEBUG::Console1, "Button not found\n");
}
get_button (ControllerID (FOCUS1 + i))->set_led_state (i == current_strippable_index);
}
}