Hi.
A while since I have posted here, but now I have a nice diff to the inditelescope and indidome, that I hope will be adopted
I'm posting here in case there is some clarification needed before adding a pull request on git.
Why:
On my observatory unparking mount while dome is parked or even worse parking dome when mount is unparked, will lead to an 100% guarantied collision.
What:
inditelescope has new options in option tab
Ignore dome | dome locks | dome parks | both (the last two)
* Ignore dome = default same as usual.
* dome locks = mount cannot unpark if dome is parked
* dome parks = if the dome and mount is unparked and the dome starts parking, the mount start parking.
In some cases this could be great, but if dome parks faster then mount.....
* both = dome locks & dome parks
indidome has new options
ignore telescope | telescope locks
* ignore telescope = default
* telescope locks = do not park dome if mount is unparked. Hovever this will tell the mount to park (the first attempt) if inditelescope is set to dome parks | both. The second time (if mount is done parking) the dome will park.
How to use it in a telescope or dome driver?
do not park if
INDI::Telescope::isLocked() == true
INDI::Dome::isLocked() == true
The autopark in inditelescope is just snooping so a dome does not have to think about it.
Funny enough I started on the telescope part first, then I worked on the dome part, and was having issues when I came to test on the RollOff Simulator. After some digging I found that an similar solution was implemented in that driver under the name Scope Aware. Cannot remember seeing it before, but perhaps I have!?
Anyways I think such a function is more suited to be in the super class, and not have to be implemented in every hardware specifik driver.
I removed the implementation in the RollOff Simulator and added new code to RollOff | Dome Simulator, to show how easy it can be used.
Also did the same to Celestron GPS and Telescope Simulator.
Any questions, let me know. Feel free to test it.
It's implemented on commit 4dcc62b4f592647b692c27c4a944b98db20cecc9