From 092fdb5b46feb7c3bc612f7dbdd1c27fd3ac6ed7 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 26 Aug 2022 19:31:15 -0600 Subject: [PATCH] push2: turn off scene buttons when appropriate --- libs/surfaces/push2/cues.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libs/surfaces/push2/cues.cc b/libs/surfaces/push2/cues.cc index 929c92f508..8d74de0df9 100644 --- a/libs/surfaces/push2/cues.cc +++ b/libs/surfaces/push2/cues.cc @@ -138,7 +138,7 @@ CueLayout::show () } Push2::ButtonID scene_buttons[] = { - Push2::Fwd32ndT, Push2::Fwd32nd, Push2::Fwd16th, Push2::Fwd16thT, + Push2::Fwd32ndT, Push2::Fwd32nd, Push2::Fwd16th, Push2::Fwd16thT, Push2::Fwd8thT, Push2::Fwd8th, Push2::Fwd4trT, Push2::Fwd4tr }; @@ -157,7 +157,17 @@ CueLayout::show () void CueLayout::hide () { + Push2::ButtonID scene_buttons[] = { + Push2::Fwd32ndT, Push2::Fwd32nd, Push2::Fwd16th, Push2::Fwd16thT, + Push2::Fwd8thT, Push2::Fwd8th, Push2::Fwd4trT, Push2::Fwd4tr + }; + for (auto & sb : scene_buttons) { + boost::shared_ptr b = _p2.button_by_id (sb); + b->set_color (Push2::LED::Black); + b->set_state (Push2::LED::NoTransition); + _p2.write (b->state_msg()); + } } void