Manualfocusdrive command needs to get negative numbers for inward direction.
Next step is to replace conditional logic with e.g. strategy pattern
Details
- Reviewers
mutlaqja - Group Reviewers
KStars - Commits
- R321:166d69d540fc: Fix manualfocusdrive based focus bug due to fix in commit de12d97ddefc
Regression tests on the simulator and Canon 40D for relative focus position
Test on Nikon Z6, Nikon D 7100, Canon 40D for manualfocusdrive with iterative and polynominal algorithms.
Diff Detail
- Repository
- R321 KStars
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
I cannot test this, so I offer pedantic comments ;)
kstars/indi/indifocuser.cpp | ||
---|---|---|
178 | This makes "steps" the opposite of its previous value. If your intent is to make an inward move result in a negative value, you should consider the sign of "steps" at some point. | |
185 | If your observation is that the Z6 fails on steps = 1, you should test for that. Your code is stating that values - 1, 0 and +1 make the Z6 fail. If you noticed your specific device has a deviation, you might want to create an informative flag when the property is created, instead of comparing a string everytime you move the focuser. But this is minor. |