X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fsurfaces%2Fmackie%2Fled.cc;h=59b9f6cb20a9026ac99b1e648dfb6b709f70c69c;hb=4c13018656b2c655025c733a4056b53c3a93e941;hp=342db049a5605954c432b4cc5871d63a90b17629;hpb=c0bdc7f31e3919602f5ec8fed06024e513b880b1;p=ardour.git diff --git a/libs/surfaces/mackie/led.cc b/libs/surfaces/mackie/led.cc index 342db049a5..59b9f6cb20 100644 --- a/libs/surfaces/mackie/led.cc +++ b/libs/surfaces/mackie/led.cc @@ -21,8 +21,15 @@ #include "surface.h" #include "control_group.h" +using namespace ArdourSurface; using namespace Mackie; +const int Led::FaderTouch = 0x70; +const int Led::Timecode = 0x71; +const int Led::Beats = 0x72; +const int Led::RudeSolo = 0x73; +const int Led::RelayClick = 0x74; + Control* Led::factory (Surface& surface, int id, const char* name, Group& group) { @@ -33,7 +40,7 @@ Led::factory (Surface& surface, int id, const char* name, Group& group) return l; } -MidiByteArray +MidiByteArray Led::set_state (LedState new_state) { state = new_state; @@ -41,18 +48,18 @@ Led::set_state (LedState new_state) MIDI::byte msg = 0; switch (state.state()) { - case LedState::on: - msg = 0x7f; + case LedState::on: + msg = 0x7f; break; - case LedState::off: - msg = 0x00; + case LedState::off: + msg = 0x00; break; - case LedState::flashing: - msg = 0x01; + case LedState::flashing: + msg = 0x01; break; - case LedState::none: + case LedState::none: return MidiByteArray (); } - + return MidiByteArray (3, 0x90, id(), msg); }