diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-02-19 12:50:28 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-02-19 23:25:08 -0500 |
commit | 80d83fd238dbfef474b29688942ad66043214cf8 (patch) | |
tree | 3c6db7537729321577c0303dd427b4247e49fc2a /libs/surfaces/mackie/mackie_control_protocol.cc | |
parent | 55c7ce98abc285e4bf90d937530bc69168032189 (diff) |
add a hack to deal with device discovery race, in which the devices were not actually known to be ready before the last update_surfaces() call (which is where binding between strips and routes occurs) ; add support for Mackie Control touch on/off messages
Diffstat (limited to 'libs/surfaces/mackie/mackie_control_protocol.cc')
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index c83ce819d9..a2667b8a7d 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -344,7 +344,9 @@ MackieControlProtocol::switch_banks (uint32_t initial, bool force) if (_current_initial_bank <= sorted.size()) { - DEBUG_TRACE (DEBUG::MackieControl, string_compose ("switch to %1, %2, available routes %3\n", _current_initial_bank, strip_cnt, sorted.size())); + DEBUG_TRACE (DEBUG::MackieControl, string_compose ("switch to %1, %2, available routes %3 on %4 surfaces\n", + _current_initial_bank, strip_cnt, sorted.size(), + surfaces.size())); // link routes to strips @@ -520,11 +522,23 @@ MackieControlProtocol::update_global_led (int id, LedState ls) } } +void +MackieControlProtocol::device_ready () +{ + /* this is not required to be called, but for devices which do + * handshaking, it can be called once the device has verified the + * connection. + */ + + DEBUG_TRACE (DEBUG::MackieControl, string_compose ("device ready init (active=%1)\n", active())); + update_surfaces (); +} + // send messages to surface to set controls to correct values void MackieControlProtocol::update_surfaces() { - DEBUG_TRACE (DEBUG::MackieControl, "MackieControlProtocol::update_surfaces() init\n"); + DEBUG_TRACE (DEBUG::MackieControl, string_compose ("MackieControlProtocol::update_surfaces() init (active=%1)\n", active())); if (!active()) { return; } |