ASCOM mount support#10
Conversation
gustavmpettersson
left a comment
There was a problem hiding this comment.
See some specific code comments
Note that several workarounds were added in the celestron code to manage the slow interface, notably state caching and internal init tracking. If possible, these should not be repeated for ascom.
| if self.model == 'celestron': | ||
| return self._is_init | ||
| elif self.model.lower() == 'ascom': | ||
| return self._is_init |
There was a problem hiding this comment.
Does the ascom API provide any method to check if a device is initialised? The ptgrey solution is not ideal
| self._debug_folder = path | ||
|
|
||
| @property | ||
| def state_cache(self): |
There was a problem hiding this comment.
Is there a fast method to get the state from ascom? If yes should be implemented here
| - For model *ascom* this can either be left blank to invoke the ASCOM telescope selection menu, or may specify | ||
| a specific installed ASCOM driver by name (case sensitive) (e.g. DeviceHub, Celestron, Simulator, SkyWatcher, etc). |
There was a problem hiding this comment.
Is there any way of identifying specific hardware resources? Unlikely to have more than one mount connected but still
| + ' rate_control=' + str(rate_control)) | ||
| self._logger.debug('Stopping mount first') | ||
| self.stop() | ||
| if self.model == 'celestron' or self.model.lower() == "ascom": |
There was a problem hiding this comment.
if self.model.lower() in ('celestron', 'ascom'):
| self._ascom_telescope.MoveAxis(self._ascom_scope_alt_axis, alt) | ||
| self._ascom_telescope.MoveAxis(self._ascom_scope_azi_axis, azi) | ||
| success[0] = True | ||
| except: |
There was a problem hiding this comment.
Fix catch-all try-except
Adds ASCOM mount support. Tested with ASCOM Scope Simulator V2 configured as alt/az type mount.
This implementation does not preclude equatorial mounts, but perhaps it should. If used with an equatorial mount, this implementation will drive the RA/Dec axes using rate commands which pypogs intended for alt/az axes. I don't see an ASCOM-specific way to check whether a mount is equatorial or alt/az.
This PR builds on PR #9 which split hardware.py into separate camera, mount, and receiver interfaces files and updated the camera interfaces file to add ASCOM camera support.