From d407d09d9cc15fbb576997191075d7b2393fdefe Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 16 Jun 2016 23:04:23 -0400 Subject: [PATCH] pulse metronome led when enabled --- libs/surfaces/push2/push2.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/libs/surfaces/push2/push2.cc b/libs/surfaces/push2/push2.cc index 050b541899..4628d26cbe 100644 --- a/libs/surfaces/push2/push2.cc +++ b/libs/surfaces/push2/push2.cc @@ -781,8 +781,22 @@ Push2::notify_loop_state_changed () } void -Push2::notify_parameter_changed (std::string) +Push2::notify_parameter_changed (std::string param) { + IDButtonMap::iterator b; + + if (param == "clicking") { + if ((b = id_button_map.find (Metronome)) == id_button_map.end()) { + return; + } + if (Config->get_clicking()) { + b->second->set_state (LED::Pulsing4th); + b->second->set_color (LED::White); + } else { + b->second->set_state (LED::Off); + } + write (b->second->state_msg ()); + } } void