summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-04-11 23:52:37 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-04-11 23:52:37 +0000
commit1aa8baf6f9d714d8a19947f23475863520af0dd7 (patch)
treeecedd951131ab67a816894375578b8147a22e09c
parentfdffab5831146512f725873c2d6fbdc098b6cec7 (diff)
MCP: maybe get vpot id's right; more debug tracing for gain notify
git-svn-id: svn://localhost/ardour2/branches/3.0@11926 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/surfaces/mackie/pot.cc5
-rw-r--r--libs/surfaces/mackie/pot.h2
-rw-r--r--libs/surfaces/mackie/strip.cc9
3 files changed, 12 insertions, 4 deletions
diff --git a/libs/surfaces/mackie/pot.cc b/libs/surfaces/mackie/pot.cc
index 3b8e8b65a5..d21a18f6ae 100644
--- a/libs/surfaces/mackie/pot.cc
+++ b/libs/surfaces/mackie/pot.cc
@@ -81,7 +81,10 @@ Pot::update_message ()
msg += (lrintf (value * 10.0) + 1) & 0x0f; // 0b00001111
}
- return MidiByteArray (3, 0xb0, id(), msg);
+ /* outbound LED message requires 0x20 to be added to the LED's id
+ */
+
+ return MidiByteArray (3, 0xb0, 0x20 + id(), msg);
}
diff --git a/libs/surfaces/mackie/pot.h b/libs/surfaces/mackie/pot.h
index ccb6eec0f1..5e9ca6e682 100644
--- a/libs/surfaces/mackie/pot.h
+++ b/libs/surfaces/mackie/pot.h
@@ -9,7 +9,7 @@ class Pot : public Control
{
public:
enum base_id_t {
- base_id = 0x30,
+ base_id = 0x10,
};
enum Mode {
diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc
index ac20bb49ac..c3df0e4c19 100644
--- a/libs/surfaces/mackie/strip.cc
+++ b/libs/surfaces/mackie/strip.cc
@@ -259,7 +259,7 @@ Strip::notify_route_deleted ()
void
Strip::notify_gain_changed (bool force_update)
{
- DEBUG_TRACE (DEBUG::MackieControl, string_compose ("gain changed for strip %1\n", _index));
+ DEBUG_TRACE (DEBUG::MackieControl, string_compose ("gain changed for strip %1, flip mode\n", _index, _surface->mcp().flip_mode()));
if (_route && _fader) {
@@ -282,11 +282,16 @@ Strip::notify_gain_changed (bool force_update)
}
pos = gain_to_slider_position (pos);
+
if (force_update || pos != _last_fader_position_written) {
_surface->write (_fader->set_position (pos));
_last_fader_position_written = pos;
+ } else {
+ DEBUG_TRACE (DEBUG::MackieControl, "value is stale, no message sent\n");
}
- }
+ } else {
+ DEBUG_TRACE (DEBUG::MackieControl, "fader in use, no message sent\n");
+ }
}
}