mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-30 17:03:06 +01:00
faderport: allow forcing LED state for use in ::all_lights_out()
This commit is contained in:
parent
34d847e060
commit
2ea4d5c7b5
2 changed files with 4 additions and 5 deletions
|
|
@ -234,8 +234,7 @@ void
|
|||
FaderPort::all_lights_out ()
|
||||
{
|
||||
for (ButtonMap::iterator b = buttons.begin(); b != buttons.end(); ++b) {
|
||||
b->second.set_led_state (_output_port, false);
|
||||
g_usleep (1000);
|
||||
b->second.set_led_state (_output_port, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -734,9 +733,9 @@ FaderPort::ButtonInfo::set_action (boost::function<void()> f, bool when_pressed,
|
|||
}
|
||||
|
||||
void
|
||||
FaderPort::ButtonInfo::set_led_state (boost::shared_ptr<MIDI::Port> port, int onoff)
|
||||
FaderPort::ButtonInfo::set_led_state (boost::shared_ptr<MIDI::Port> port, int onoff, bool force)
|
||||
{
|
||||
if (led_on == (bool) onoff) {
|
||||
if (!force && (led_on == (bool) onoff)) {
|
||||
/* nothing to do */
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ class FaderPort : public ARDOUR::ControlProtocol, public AbstractUI<FaderPortReq
|
|||
|
||||
void set_action (std::string const& action_name, bool on_press, FaderPort::ButtonState = ButtonState (0));
|
||||
void set_action (boost::function<void()> function, bool on_press, FaderPort::ButtonState = ButtonState (0));
|
||||
void set_led_state (boost::shared_ptr<MIDI::Port>, int onoff);
|
||||
void set_led_state (boost::shared_ptr<MIDI::Port>, int onoff, bool force = false);
|
||||
void invoke (ButtonState bs, bool press);
|
||||
bool uses_flash () const { return flash; }
|
||||
void set_flash (bool yn) { flash = yn; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue