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
This commit is contained in:
parent
fdffab5831
commit
1aa8baf6f9
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ class Pot : public Control
|
||||
{
|
||||
public:
|
||||
enum base_id_t {
|
||||
base_id = 0x30,
|
||||
base_id = 0x10,
|
||||
};
|
||||
|
||||
enum Mode {
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user