Skip to content

Commit 89fdb37

Browse files
committed
- fix updating of rotator backlash & reverse direction
1 parent b7b32cb commit 89fdb37

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

libs/indibase/indirotatorinterface.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)