13
0

adds support for iCon Platform M+ controller

Adds a device profile for iCon Platform M+ controller and new function
that flips between editor and mixer window. This function is mapped to
"mixer" button on controller.
This commit is contained in:
Caleb Potter 2022-03-04 14:08:31 -06:00 committed by Paul Davis
parent fc961f1622
commit d1f4679abc
6 changed files with 49 additions and 0 deletions

View File

@ -60,6 +60,7 @@ DeviceInfo::DeviceInfo()
, _uses_ipmidi (false)
, _no_handshake (false)
, _is_qcon(false)
, _is_platformMp(false)
, _has_qcon_second_lcd(false)
, _has_qcon_master_meters(false)
, _has_meters (true)
@ -339,6 +340,12 @@ DeviceInfo::set_state (const XMLNode& node, int /* version */)
_is_qcon = false;
}
if ((child = node.child ("IsPlatformMp")) != 0) {
child->get_property ("value", _is_platformMp);
} else {
_is_platformMp = false;
}
if ((child = node.child ("HasQConSecondLCD")) != 0) {
child->get_property ("value", _has_qcon_second_lcd);
} else {
@ -499,6 +506,11 @@ DeviceInfo::is_qcon () const
return _is_qcon;
}
bool DeviceInfo::is_platformMp () const
{
return _is_platformMp;
}
bool
DeviceInfo::has_qcon_second_lcd () const
{

View File

@ -81,6 +81,7 @@ class DeviceInfo
bool uses_ipmidi() const;
bool no_handshake() const;
bool is_qcon() const;
bool is_platformMp() const;
bool has_qcon_second_lcd() const;
bool has_qcon_master_meters() const;
bool has_meters() const;
@ -114,6 +115,7 @@ class DeviceInfo
bool _uses_ipmidi;
bool _no_handshake;
bool _is_qcon;
bool _is_platformMp;
bool _has_qcon_second_lcd;
bool _has_qcon_master_meters;
bool _has_meters;

View File

@ -1586,6 +1586,10 @@ MackieControlProtocol::build_device_specific_button_map()
#define DEFINE_BUTTON_HANDLER(b,p,r) button_map.insert (pair<Button::ID,ButtonHandlers> ((b), ButtonHandlers ((p),(r))));
if (_device_info.is_platformMp()) {
DEFINE_BUTTON_HANDLER (Button::Marker, &MackieControlProtocol::flip_window_press, &MackieControlProtocol::flip_window_release);
}
}
void

View File

@ -511,6 +511,8 @@ class MackieControlProtocol
Mackie::LedState view_release (Mackie::Button&);
Mackie::LedState bank_release (Mackie::Button&, uint32_t bank_num);
Mackie::LedState flip_window_press (Mackie::Button&);
Mackie::LedState flip_window_release (Mackie::Button&);
};
} // namespace

View File

@ -495,6 +495,19 @@ MackieControlProtocol::marker_release (Button &)
return off;
}
LedState
MackieControlProtocol::flip_window_press (Button &)
{
access_action("Common/toggle-editor-and-mixer");
return on;
}
LedState
MackieControlProtocol::flip_window_release (Button &)
{
return off;
}
/////////////////////////////////////
// Transport Buttons
/////////////////////////////////////

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<MackieProtocolDevice>
<Name value="iCON Platform M+"/>
<Strips value="8"/>
<MasterFader value="yes"/>
<TimecodeDisplay value="no"/>
<TwoCharacterDisplay value="no"/>
<Extenders value="0"/>
<MasterPosition value="0"/>
<GlobalControls value="yes"/>
<JogWheel value="yes"/>
<TouchSenseFaders value="yes"/>
<NoHandShake value="yes"/>
<HasMeters value="no"/>
<IsPlatformMp value="yes"/>
</MackieProtocolDevice>