summaryrefslogtreecommitdiff
path: root/libs/surfaces/push2/push2.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/surfaces/push2/push2.cc')
-rw-r--r--libs/surfaces/push2/push2.cc25
1 files changed, 4 insertions, 21 deletions
diff --git a/libs/surfaces/push2/push2.cc b/libs/surfaces/push2/push2.cc
index 22b9ade398..0d3e2b405d 100644
--- a/libs/surfaces/push2/push2.cc
+++ b/libs/surfaces/push2/push2.cc
@@ -300,6 +300,7 @@ int
Push2::close ()
{
init_buttons (false);
+ strip_buttons_off ();
/* wait for button data to be flushed */
AsyncMIDIPort* asp;
@@ -378,12 +379,6 @@ Push2::init_buttons (bool startup)
write (b->state_msg());
}
- /* Strip buttons should all be off (black) by default. They will change
- * color to reflect various conditions
- */
-
- strip_buttons_off ();
-
if (startup) {
/* all other buttons are off (black) */
@@ -813,15 +808,9 @@ Push2::handle_midi_note_on_message (MIDI::Parser& parser, MIDI::EventTwoBytes* e
for (FNPadMap::iterator pi = pads_with_note.first; pi != pads_with_note.second; ++pi) {
Pad* pad = pi->second;
- if (pad->do_when_pressed == Pad::FlashOn) {
- pad->set_color (LED::White);
- pad->set_state (LED::OneShot24th);
- write (pad->state_msg());
- } else if (pad->do_when_pressed == Pad::FlashOff) {
- pad->set_color (contrast_color);
- pad->set_state (LED::OneShot24th);
- write (pad->state_msg());
- }
+ pad->set_color (contrast_color);
+ pad->set_state (LED::OneShot24th);
+ write (pad->state_msg());
}
}
@@ -1655,12 +1644,6 @@ Push2::set_current_layout (Push2Layout* layout)
_previous_layout = _current_layout;
}
- /* turn off all strip buttons - let new layout set them if it
- * wants/needs to
- */
-
- strip_buttons_off ();
-
_current_layout = layout;
if (_current_layout) {