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"); + } } }