Fix version reporting on older Celestron NexStar mounts #1988
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Celestron NexStar mount hand controllers have been introduced with a number of firmware versions over the years. Starting with the 4.xx NexStar controllers, the minor version is a 2-digit value (currently 4.22). The older hand controllers (while sporting fewer features) still will talk to INDI since the basic serial communication protocol has not changed.
For these older controllers (v1.2, v1.6, and v2.2), the minor version is a single-digit value. The current code in
CelestronDriver::get_version()
forces a two-digit minor version, so, for instance, the v2.2 controller is recorded as "2.02". When the version is checked against device capabilities,2.02 < 2.2
, so it is incorrectly rejected.This PR checks the major version of the hand controller, and uses a 2-digit minor version for more recent models, and a 1-digit minor version for earlier models.