diff options
author | Robin Gareus <robin@gareus.org> | 2017-04-18 03:20:33 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-04-18 03:20:33 +0200 |
commit | 629b5e0446beee9ba0627b608119cd46fd8206da (patch) | |
tree | ba14a319f3cc19511d8957ea0945e0988c1c0ef1 /libs/surfaces/faderport8/fp8_controls.cc | |
parent | dbb3c47eee3c0f8d2111697533d524f95d8b8a08 (diff) |
clear + re-init faderport at disconnect
Diffstat (limited to 'libs/surfaces/faderport8/fp8_controls.cc')
-rw-r--r-- | libs/surfaces/faderport8/fp8_controls.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libs/surfaces/faderport8/fp8_controls.cc b/libs/surfaces/faderport8/fp8_controls.cc index 5a06dc75e5..4626afd1f9 100644 --- a/libs/surfaces/faderport8/fp8_controls.cc +++ b/libs/surfaces/faderport8/fp8_controls.cc @@ -266,9 +266,7 @@ FP8Controls::initialize () } /* initally turn all lights off */ - for (CtrlButtonMap::const_iterator i = _ctrlmap.begin (); i != _ctrlmap.end (); ++i) { - i->second->set_active (false); - } + all_lights_off (); /* default modes */ button (BtnMaster).set_active (true); @@ -278,6 +276,13 @@ FP8Controls::initialize () FP8ButtonInterface::force_change = false; } +void +FP8Controls::all_lights_off () const +{ + for (CtrlButtonMap::const_iterator i = _ctrlmap.begin (); i != _ctrlmap.end (); ++i) { + i->second->set_active (false); + } +} FP8ButtonInterface& FP8Controls::button (ButtonId id) |