mackie: properly track lifetime of subview route; fix subview/potmode LED state mgmt
[ardour.git] / libs / surfaces / mackie / led.cc
index 38aa5c7f3b62ac470d88abf250d1828d51a7c988..59b9f6cb20a9026ac99b1e648dfb6b709f70c69c 100644 (file)
@@ -21,6 +21,7 @@
 #include "surface.h"
 #include "control_group.h"
 
+using namespace ArdourSurface;
 using namespace Mackie;
 
 const int Led::FaderTouch = 0x70;
@@ -39,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;
@@ -47,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);
 }