diff --git a/libs/surfaces/mackie/device_info.cc b/libs/surfaces/mackie/device_info.cc index 7eb87576ed..71eb29963a 100644 --- a/libs/surfaces/mackie/device_info.cc +++ b/libs/surfaces/mackie/device_info.cc @@ -61,6 +61,7 @@ DeviceInfo::DeviceInfo() , _uses_ipmidi (false) , _no_handshake (false) , _is_qcon(false) + , _is_v1m(false) , _is_platformMp(false) , _is_proG2(false) , _is_xtouch(false) @@ -347,6 +348,12 @@ DeviceInfo::set_state (const XMLNode& node, int /* version */) _is_qcon = false; } + if ((child = node.child ("IsV1M")) != 0) { + child->get_property ("value", _is_v1m); + } else { + _is_v1m = false; + } + if ((child = node.child ("IsXTouch")) != 0) { child->get_property ("value", _is_xtouch); } else { @@ -525,6 +532,12 @@ DeviceInfo::is_qcon () const return _is_qcon; } +bool +DeviceInfo::is_v1m () const +{ + return _is_v1m; +} + bool DeviceInfo::is_platformMp () const { return _is_platformMp; diff --git a/libs/surfaces/mackie/device_info.h b/libs/surfaces/mackie/device_info.h index e4af50b445..1e22214740 100644 --- a/libs/surfaces/mackie/device_info.h +++ b/libs/surfaces/mackie/device_info.h @@ -80,6 +80,7 @@ class DeviceInfo bool uses_ipmidi() const; bool no_handshake() const; bool is_qcon() const; + bool is_v1m() const; bool is_platformMp() const; bool is_proG2() const; bool is_xtouch() const; @@ -116,6 +117,7 @@ class DeviceInfo bool _uses_ipmidi; bool _no_handshake; bool _is_qcon; + bool _is_v1m; bool _is_platformMp; bool _is_proG2; bool _is_xtouch; diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc index 12bc445993..d0c1289960 100644 --- a/libs/surfaces/mackie/strip.cc +++ b/libs/surfaces/mackie/strip.cc @@ -108,7 +108,7 @@ Strip::Strip (Surface& s, const std::string& name, int index, const mapwrite (display (0, 0, pending_display[0])); current_display[0] = pending_display[0]; + changed = true; } if (return_to_vpot_mode_display_at <= now) { return_to_vpot_mode_display_at = UINT64_MAX; return_to_vpot_mode_display (); + changed = true; } if (force || (current_display[1] != pending_display[1])) { _surface->write (display (0, 1, pending_display[1])); current_display[1] = pending_display[1]; + changed = true; } if (_lcd2_available) { if (force || (lcd2_current_display[0] != lcd2_pending_display[0])) { _surface->write (display (1, 0, lcd2_pending_display[0])); lcd2_current_display[0] = lcd2_pending_display[0]; + changed = true; } if (force || (lcd2_current_display[1] != lcd2_pending_display[1])) { _surface->write (display (1, 1, lcd2_pending_display[1])); lcd2_current_display[1] = lcd2_pending_display[1]; + changed = true; } } + + /* The iCON V1-M cannot handle many messages in quick succession. + * + * A small delay is necessary to ensure none are skipped. + */ + if (_surface->mcp().device_info().is_v1m() && changed) { g_usleep(2500); } } void @@ -1045,6 +1058,12 @@ Strip::zero () lcd2_current_display[1] = string(); } + + /* The iCON V1-M cannot handle many messages in quick succession. + * + * A small delay is necessary to ensure none are skipped. + */ + if (_surface->mcp().device_info().is_v1m()) { g_usleep(5000); } } MidiByteArray @@ -1093,18 +1112,23 @@ Strip::display (uint32_t lcd_number, uint32_t line_number, const std::string& li // code for display retval << 0x13; - if (lcd_label_pitch == 6) { - if (_index == 0) { - add_left_pad_char = true; - } - else { - left_pad_offset = 1; - } + if (_index == 0 && lcd_label_pitch == 6) { + add_left_pad_char = true; + } else if (_index != 0) { + left_pad_offset = 1; } } // offset (0 to 0x37 first line, 0x38 to 0x6f for second line) - retval << (_index * lcd_label_pitch + (line_number * 0x38) + left_pad_offset); + if (_surface->mcp().device_info().is_v1m() && lcd_number == 1) { + if (line_number == 0) { + retval << (_index * (lcd_label_pitch - 1) + (line_number * 0x38) + left_pad_offset); + } else { + retval << (_index * lcd_label_pitch + (line_number * 0x38)); + } + } else { + retval << (_index * lcd_label_pitch + (line_number * 0x38) + left_pad_offset); + } if (add_left_pad_char) { retval << ' '; // add the left pad space diff --git a/libs/surfaces/mackie/surface.cc b/libs/surfaces/mackie/surface.cc index cc876d4058..7990ddd56c 100644 --- a/libs/surfaces/mackie/surface.cc +++ b/libs/surfaces/mackie/surface.cc @@ -139,8 +139,8 @@ Surface::Surface (MackieControlProtocol& mcp, const std::string& device_name, ui if ( is_qcon ) { _has_master_display = (mcp.device_info().has_master_fader() && mcp.device_info().has_qcon_second_lcd()); - _has_master_meter = mcp.device_info().has_qcon_master_meters(); } + _has_master_meter = mcp.device_info().has_qcon_master_meters(); if (_mcp.device_info().has_global_controls()) { init_controls (); diff --git a/share/mcp/v1-m+v1-x.device b/share/mcp/v1-m+v1-x.device new file mode 100644 index 0000000000..97a7e72355 --- /dev/null +++ b/share/mcp/v1-m+v1-x.device @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/share/mcp/v1-m.device b/share/mcp/v1-m.device new file mode 100644 index 0000000000..d110a77c14 --- /dev/null +++ b/share/mcp/v1-m.device @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/share/mcp/v1-x+v1-m.device b/share/mcp/v1-x+v1-m.device new file mode 100644 index 0000000000..cd941878d3 --- /dev/null +++ b/share/mcp/v1-x+v1-m.device @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + +