diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-06-01 12:56:20 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-06-01 12:56:20 +0000 |
commit | ba5e71b50f53c97c1ce806d9582c4c32970bdcf6 (patch) | |
tree | 62e95853f436d4bb5dc1514425fb2164f7adba49 /libs/surfaces/mackie/surface.cc | |
parent | bc3aea6f93edf23c19dc672dd5b1f44bca71f571 (diff) |
MCP: Patch from Rodrigo that:
* implements Metering on/off through Button::Read as per Seablade's suggestion. I choose this button as it's the "Show meters" button in Traktion;
* removes redundant code from Meter::update_transport_rolling();
* renames Meter::update_transport_rolling() to Meter::notify_metering_state_changed();
* renamed Surface::notify_transport_state_changed() to Surface::notify_metering_state_changed();
* renamed Strip::notify_transport_state_changed() to Strip::notify_metering_state_changed();
* created MackieControlProtocol::notify_metering_state_changed() and made MackieControlProtocol::notify_transport_state_changed() use it;
* implemented turning off of timecode display and two char display in Surface::zero_all ();
* implemented master fader zeroing in Surface::zero_all ();
* calling Surfaces->zero_all() at MackieControlProtocol destructor;
* implemented restore of 2nd LCD line content after metering being active.
git-svn-id: svn://localhost/ardour2/branches/3.0@12520 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/mackie/surface.cc')
-rw-r--r-- | libs/surfaces/mackie/surface.cc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/libs/surfaces/mackie/surface.cc b/libs/surfaces/mackie/surface.cc index ca8d3904e8..6fb94cba93 100644 --- a/libs/surfaces/mackie/surface.cc +++ b/libs/surfaces/mackie/surface.cc @@ -573,8 +573,18 @@ Surface::nth_strip (uint32_t n) const void Surface::zero_all () { - // TODO turn off Timecode displays + if (_mcp.device_info().has_timecode_display ()) { + display_timecode (string (10, '0'), string (10, ' ')); + } + + if (_mcp.device_info().has_two_character_display()) { + show_two_char_display (string (2, ' '), string (2, '.')); + } + if (_mcp.device_info().has_master_fader ()) { + _port->write (_master_fader->zero ()); + } + // zero all strips for (Strips::iterator it = strips.begin(); it != strips.end(); ++it) { (*it)->zero(); @@ -591,7 +601,7 @@ Surface::zero_controls () } // turn off global buttons and leds - // global buttons are only ever on mcu_port, so we don't have + // global buttons are only ever on mcu_port, so we don't have // to figure out which port. for (Controls::iterator it = controls.begin(); it != controls.end(); ++it) { @@ -601,12 +611,6 @@ Surface::zero_controls () } } - if (_number == 0 && _mcp.device_info().has_two_character_display()) { - // any hardware-specific stuff - // clear 2-char display - show_two_char_display (" "); - } - // and the led ring for the master strip blank_jog_ring (); } @@ -847,9 +851,9 @@ Surface::route_is_locked_to_strip (boost::shared_ptr<Route> r) const } void -Surface::notify_transport_state_changed() +Surface::notify_metering_state_changed() { for (Strips::const_iterator s = strips.begin(); s != strips.end(); ++s) { - (*s)->notify_transport_state_changed (); + (*s)->notify_metering_state_changed (); } } |