X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fsurfaces%2Fmackie%2Fled.cc;h=6a090cdc749207848d2413f6901ceded2c982458;hb=53c47e0ccd663ee2118f988c0dde140b7aee4173;hp=8dc1d626cc3fa6db526d3dd5bd5eedd8a6d99c85;hpb=7c9c4d6dc746604eac95d0ee767a9b9f2795366e;p=ardour.git diff --git a/libs/surfaces/mackie/led.cc b/libs/surfaces/mackie/led.cc index 8dc1d626cc..6a090cdc74 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) { @@ -36,24 +43,23 @@ Led::factory (Surface& surface, int id, const char* name, Group& group) MidiByteArray Led::set_state (LedState new_state) { - if (new_state != state) { - return MidiByteArray(); - } - state = new_state; MIDI::byte msg = 0; switch (state.state()) { case LedState::on: - msg = 0x7f; break; + msg = 0x7f; + break; case LedState::off: - msg = 0x00; break; + msg = 0x00; + break; case LedState::flashing: - msg = 0x01; break; + msg = 0x01; + break; case LedState::none: return MidiByteArray (); } - return MidiByteArray (3, 0x90, raw_id(), msg); + return MidiByteArray (3, 0x90, id(), msg); }