@@ -253,9 +253,9 @@ bool RotatorInterface::processSwitch(const char *dev, const char *name, ISState
253253 // //////////////////////////////////////////
254254 else if (ReverseRotatorSP.isNameMatch (name))
255255 {
256- m_defaultDevice->updateProperty (ReverseRotatorSP, states, names, n, [this , states ]()
256+ m_defaultDevice->updateProperty (ReverseRotatorSP, states, names, n, [this , names ]()
257257 {
258- bool enabled = states [0 ] == ISS_ON;
258+ bool enabled = ReverseRotatorSP [0 ]. isNameMatch (names[ 0 ]) == ISS_ON;
259259
260260 if (ReverseRotator (enabled))
261261 {
@@ -274,9 +274,9 @@ bool RotatorInterface::processSwitch(const char *dev, const char *name, ISState
274274 // //////////////////////////////////////////
275275 else if (RotatorBacklashSP.isNameMatch (name))
276276 {
277- m_defaultDevice->updateProperty (RotatorBacklashSP, states, names, n, [this , states ]()
277+ m_defaultDevice->updateProperty (RotatorBacklashSP, states, names, n, [this , names ]()
278278 {
279- bool enabled = states [0 ] == ISS_ON;
279+ bool enabled = RotatorBacklashSP [0 ]. isNameMatch (names[ 0 ]) == ISS_ON;
280280
281281 if (SetRotatorBacklashEnabled (enabled))
282282 {
0 commit comments