subtle rework/rename of per-strip revert-to-vpot-display code
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 7 Oct 2015 22:06:43 +0000 (18:06 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 8 Oct 2015 16:50:05 +0000 (12:50 -0400)
libs/surfaces/mackie/strip.cc
libs/surfaces/mackie/strip.h

index 3633430e9843bcdd71dff0a0922fdd4f329c67a8..616947b71f252d4c2cc6be2967f1871b11e37b1d 100644 (file)
@@ -760,11 +760,13 @@ Strip::periodic (uint64_t usecs)
                return;
        }
 
-       update_automation ();
-       update_meter ();
-
-       if (_reset_display_at && _reset_display_at < usecs) {
-               reset_display ();
+       if (_reset_display_at >= usecs) {
+               return;
+       } else if (_reset_display_at) {
+               return_to_vpot_mode_display ();
+       } else {
+               update_automation ();
+               update_meter ();
        }
 }
 
@@ -1010,21 +1012,19 @@ Strip::queue_display_reset (uint32_t msecs)
 }
 
 void
-Strip::clear_display_reset ()
+Strip::return_to_vpot_mode_display ()
 {
-       _reset_display_at = 0;
-}
+       /* returns the second line of the two-line per-strip display
+          back the mode where it shows what the VPot controls.
+       */
 
-void
-Strip::reset_display ()
-{
        if (_route) {
                _surface->write (display (1, vpot_mode_string()));
        } else {
                _surface->write (blank_display (1));
        }
 
-       clear_display_reset ();
+       _reset_display_at = 0;
 }
 
 struct RouteCompareByName {
index 55a6fbef8c97b68d5245c5233a1295438cf8993e..87c96b3687b30513247e5b3ca2929246273a5faa 100644 (file)
@@ -129,8 +129,7 @@ private:
        std::string vpot_mode_string () const;
 
        void queue_display_reset (uint32_t msecs);
-       void clear_display_reset ();
-       void reset_display ();
+       void return_to_vpot_mode_display ();
 
        struct RedisplayRequest {
                ARDOUR::AutomationType type;