Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix enabling/disabling DMFC properties and remove dead code (#1050)
When e.g. Reverse motor direction is disabled, that is, DEBUG 1036.928082 sec : CMD <0X41> DEBUG 1036.955548 sec : RES <OK_FC:1.2:1:19.7:4000:0:1:0:0:0> ^ | One cannot enable it, due to reverseStatus != IUFindOnSwitchIndex(&FocusReverseSP) check where e.g. reverseStatus := 1, however, IUFillSwitch(&FocusReverseS[REVERSED_DISABLED], "DISABLED", "Disabled", ISS_ON); also results in 1. int IUFindOnSwitchIndex(const ISwitchVectorProperty *svp) { int i; for (i = 0; i < svp->nsp; i++) if (svp->sp[i].s == ISS_ON) return i; return -1; } and IUFillSwitch(&FocusReverseS[REVERSED_ENABLED], "ENABLED", "Enabled", ISS_OFF); IUFillSwitch(&FocusReverseS[REVERSED_DISABLED], "DISABLED", "Disabled", ISS_ON); IUFillSwitchVector(&FocusReverseSP, FocusReverseS, 2, m_defaultDevice->getDeviceName(), "FOCUS_REVERSE_MOTION", "Reverse Motion", groupName, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
- Loading branch information
Showing
1 changed file
with
4 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters