Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for "Can not change rate while motor is running (direction differs)" error when guiding #369

Merged
merged 1 commit into from Mar 28, 2021

Conversation

beaglebot
Copy link
Contributor

Resolves #358

(I've made this PR using my @beaglebot github account, rather than the @bengal123 account I used in the issue earlier)

A number of EQMOD users reported that the PHD2 star cross test was failing, and the PHD Guiding Assistant would incorrectly report large DE backlash values (mine was 22000ms). The following message was present in the EQMOD log when these errors occured:

 "[WARNING] Warning: Invalid parameter -> Can not change rate while motor is running (direction differs). "

The error was triggered when a guide north command was quickly followed by a guide south command (within 1 second). This is unlikely to happen in a normal guiding situation, but does happen during the cross test and backlash estimation.

There's a test harness which duplicates the bug here.

The cause of the error appears to be that the motor status is not updated after the call to StopMotor() between the two guiding commands, so DERunning still indicates the mount is still running in the second call to SetDERate().

NOTE: I've confirmed that this fix corrects the error in the test harness, however I haven't had a chance to do a star cross test yet, so can't be 100% sure the underlying issue is fixed. Feel free to hold off on merging this until then.

@beaglebot
Copy link
Contributor Author

Looks like I've got at least 3 nights with 100% cloud coming up, so might not be able to do the star cross test until later this week.

@knro knro merged commit 90ed501 into indilib:master Mar 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants