add support for <HasMeters value=XX/> stanza in MCP device info file
git-svn-id: svn://localhost/ardour2/branches/3.0@12440 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
239d56ccb9
commit
7d252412c3
@ -51,6 +51,7 @@ DeviceInfo::DeviceInfo()
|
|||||||
, _uses_logic_control_buttons (false)
|
, _uses_logic_control_buttons (false)
|
||||||
, _uses_ipmidi (false)
|
, _uses_ipmidi (false)
|
||||||
, _no_handshake (false)
|
, _no_handshake (false)
|
||||||
|
, _has_meters (true)
|
||||||
, _name (X_("Mackie Control Universal Pro"))
|
, _name (X_("Mackie Control Universal Pro"))
|
||||||
{
|
{
|
||||||
mackie_control_buttons ();
|
mackie_control_buttons ();
|
||||||
@ -290,6 +291,14 @@ DeviceInfo::set_state (const XMLNode& node, int /* version */)
|
|||||||
_no_handshake = false;
|
_no_handshake = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((child = node.child ("HasMeters")) != 0) {
|
||||||
|
if ((prop = child->property ("value")) != 0) {
|
||||||
|
_has_meters = string_is_affirmative (prop->value());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_has_meters = true;
|
||||||
|
}
|
||||||
|
|
||||||
if ((child = node.child ("LogicControlButtons")) != 0) {
|
if ((child = node.child ("LogicControlButtons")) != 0) {
|
||||||
if ((prop = child->property ("value")) != 0) {
|
if ((prop = child->property ("value")) != 0) {
|
||||||
_uses_logic_control_buttons = string_is_affirmative (prop->value());
|
_uses_logic_control_buttons = string_is_affirmative (prop->value());
|
||||||
|
@ -68,6 +68,7 @@ class DeviceInfo
|
|||||||
bool has_touch_sense_faders() const;
|
bool has_touch_sense_faders() const;
|
||||||
bool uses_ipmidi() const;
|
bool uses_ipmidi() const;
|
||||||
bool no_handshake() const;
|
bool no_handshake() const;
|
||||||
|
bool has_meters() const;
|
||||||
const std::string& name() const;
|
const std::string& name() const;
|
||||||
|
|
||||||
static std::map<std::string,DeviceInfo> device_info;
|
static std::map<std::string,DeviceInfo> device_info;
|
||||||
@ -88,6 +89,7 @@ class DeviceInfo
|
|||||||
bool _uses_logic_control_buttons;
|
bool _uses_logic_control_buttons;
|
||||||
bool _uses_ipmidi;
|
bool _uses_ipmidi;
|
||||||
bool _no_handshake;
|
bool _no_handshake;
|
||||||
|
bool _has_meters;
|
||||||
std::string _name;
|
std::string _name;
|
||||||
|
|
||||||
std::map<Button::ID,GlobalButtonInfo> _global_buttons;
|
std::map<Button::ID,GlobalButtonInfo> _global_buttons;
|
||||||
|
@ -80,7 +80,10 @@ Strip::Strip (Surface& s, const std::string& name, int index, const map<Button::
|
|||||||
{
|
{
|
||||||
_fader = dynamic_cast<Fader*> (Fader::factory (*_surface, index, "fader", *this));
|
_fader = dynamic_cast<Fader*> (Fader::factory (*_surface, index, "fader", *this));
|
||||||
_vpot = dynamic_cast<Pot*> (Pot::factory (*_surface, Pot::ID + index, "vpot", *this));
|
_vpot = dynamic_cast<Pot*> (Pot::factory (*_surface, Pot::ID + index, "vpot", *this));
|
||||||
_meter = dynamic_cast<Meter*> (Meter::factory (*_surface, index, "meter", *this));
|
|
||||||
|
if (s.mcp().device_info().has_meters()) {
|
||||||
|
_meter = dynamic_cast<Meter*> (Meter::factory (*_surface, index, "meter", *this));
|
||||||
|
}
|
||||||
|
|
||||||
for (map<Button::ID,StripButtonInfo>::const_iterator b = strip_buttons.begin(); b != strip_buttons.end(); ++b) {
|
for (map<Button::ID,StripButtonInfo>::const_iterator b = strip_buttons.begin(); b != strip_buttons.end(); ++b) {
|
||||||
Button* bb = dynamic_cast<Button*> (Button::factory (*_surface, b->first, b->second.base_id + index, b->second.name, *this));
|
Button* bb = dynamic_cast<Button*> (Button::factory (*_surface, b->first, b->second.base_id + index, b->second.name, *this));
|
||||||
|
Loading…
Reference in New Issue
Block a user