diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-10-03 12:03:07 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-10-03 13:13:58 -0400 |
commit | 6bf0d4f6274750aa6ae0a1f38d46f00355678040 (patch) | |
tree | 75c7ae71d3adeaab6017d19aefd856db66edf334 /libs/surfaces/mackie/surface.cc | |
parent | 4ef45aacc15c131170420341fab3439aefb72545 (diff) |
add basic support for HUI heartbeat, only used for HUI devices
Diffstat (limited to 'libs/surfaces/mackie/surface.cc')
-rw-r--r-- | libs/surfaces/mackie/surface.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libs/surfaces/mackie/surface.cc b/libs/surfaces/mackie/surface.cc index 3770a335e7..a4b1feccad 100644 --- a/libs/surfaces/mackie/surface.cc +++ b/libs/surfaces/mackie/surface.cc @@ -440,8 +440,12 @@ Surface::handle_midi_note_on_message (MIDI::Parser &, MIDI::EventTwoBytes* ev) if (_mcp.device_info().no_handshake()) { turn_it_on (); - } + } + if (_mcp.device_info().device_type() == DeviceInfo::HUI && ev->note_number == 0 && ev->velocity == 127) { + turn_it_on (); + } + /* fader touch sense is given by "buttons" 0xe..0xe7 and 0xe8 for the * master. */ @@ -1087,3 +1091,14 @@ Surface::set_touch_sensitivity (int sensitivity) } } } + +void +Surface::hui_heartbeat () +{ + if (!_port) { + return; + } + + MidiByteArray msg (3, MIDI::on, 0x0, 0x0); + _port->write (msg); +} |