ActionManager::get_all_actions() no longer includes <Actions> in the paths it returns...
[ardour.git] / libs / surfaces / faderport8 / fp8_strip.cc
index 0aa64e1cb9069f55a09e4e5f9fdc32e42a7e4ea6..080b774c098e9025b9b0fbfc5d60b1b8f946bb42 100644 (file)
@@ -30,8 +30,8 @@
 #include "fp8_strip.h"
 
 using namespace ARDOUR;
-using namespace ArdourSurface;
-using namespace ArdourSurface::FP8Types;
+using namespace ArdourSurface::FP_NAMESPACE;
+using namespace ArdourSurface::FP_NAMESPACE::FP8Types;
 
 uint8_t /* static */
 FP8Strip::midi_ctrl_id (CtrlElement type, uint8_t id)
@@ -60,14 +60,21 @@ FP8Strip::midi_ctrl_id (CtrlElement type, uint8_t id)
                id -= 8;
                switch (type) {
                        case BtnSolo:
-                               return 0x50 + id;
+                               switch (id) {
+                                       case 3:
+                                               return 0x58;
+                                       case 6:
+                                               return 0x59;
+                                       default:
+                                               return 0x50 + id;
+                               }
                        case BtnMute:
                                return 0x78 + id;
                        case BtnSelect:
                                if (id == 0) { // strip 8
                                        return 0x07;
                                } else {
-                                       return 0x21 + id;
+                                       return 0x20 + id;
                                }
                        case Fader:
                                return 0xe8 + id;
@@ -321,7 +328,8 @@ FP8Strip::set_stripable (boost::shared_ptr<Stripable> s, bool panmode)
 
        set_select_controllable (boost::shared_ptr<AutomationControl>());
        select_button ().set_active (s->is_selected ());
-       select_button ().set_color (s->presentation_info ().color());
+
+       set_select_button_color (s->presentation_info ().color());
        //select_button ().set_blinking (false);
 
        _stripable_name = s->name ();
@@ -635,7 +643,10 @@ FP8Strip::periodic_update_meter ()
                set_strip_mode (5); // small meters + 3 lines of text (3rd is large)  + value-bar
        }
        else if (have_meter) {
-               set_strip_mode (4); // big meters + 3 lines of text (3rd line is large)
+               /* we cannot use "big meters" mode 4, since that implies
+                * 2 "Large" (4char) text lines, followed by a HUGE 2 char line
+                * and hides timecode-clock */
+               set_strip_mode (5);
        }
        else if (have_panner) {
                set_strip_mode (0); // 3 lines of text (3rd line is large + long) + value-bar
@@ -722,8 +733,10 @@ void
 FP8Strip::periodic ()
 {
        periodic_update_fader ();
+#ifndef FADERPORT2
        periodic_update_meter ();
        if (_displaymode != PluginSelect && _displaymode != PluginParam) {
                periodic_update_timecode (_base.clock_mode ());
        }
+#endif
 }