From fcada6e737b9aa09d7d4637a5db7556e5305300b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 8 Apr 2012 15:16:34 +0000 Subject: [PATCH] MCP: add debug tracing for fader (pitchbend) messages git-svn-id: svn://localhost/ardour2/branches/3.0@11829 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/surfaces/mackie/controls.h | 8 +++++--- libs/surfaces/mackie/mackie_port.cc | 9 +++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/libs/surfaces/mackie/controls.h b/libs/surfaces/mackie/controls.h index f2bca00630..b17030946b 100644 --- a/libs/surfaces/mackie/controls.h +++ b/libs/surfaces/mackie/controls.h @@ -1,5 +1,6 @@ /* Copyright (C) 2006,2007 John Anderson + Copyright (C) 2012 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +16,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef mackie_controls_h -#define mackie_controls_h + +#ifndef __mackie_controls_h__ +#define __mackie_controls_h__ #include #include @@ -299,4 +301,4 @@ public: } -#endif +#endif /* __mackie_controls_h__ */ diff --git a/libs/surfaces/mackie/mackie_port.cc b/libs/surfaces/mackie/mackie_port.cc index f725407b02..d90969f04c 100644 --- a/libs/surfaces/mackie/mackie_port.cc +++ b/libs/surfaces/mackie/mackie_port.cc @@ -329,15 +329,12 @@ void MackiePort::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size void MackiePort::handle_midi_pitchbend_message (MIDI::Parser&, MIDI::pitchbend_t pb, uint32_t fader_id) { + DEBUG_TRACE (DEBUG::MackieControl, string_compose ("handle_midi pitchbend, fader = %1 value = %2\n", fader_id, pb)); + Control* control = _mcp.surface().faders[fader_id]; if (control) { - // only the top-order 10 bits out of 14 are used - int midi_pos = pb & 0x3ff; - - // in_use is set by the MackieControlProtocol::handle_strip_button - - // relies on implicit ControlState constructor + int midi_pos = pb & 0x3ff; // only the top-order 10 bits out of 14 are used _mcp.handle_control_event (*this, *control, float (midi_pos) / float(0x3ff)); } }