Great analysis Chris. So yes as you correctly pointed out, the watchdog driver now does not manage whether parking/unparking is permitted given the policy. I think this is next step. Maybe this should pave the way to remove all the interlocks logic from dome/mount drivers and just let Watchdog manage these for those who are worried about this situation. This certainly simplifies the drivers quite a bit and they can concentrate on their core functionalities instead.
Consequently, when the user selects "Mount locks" then that means it should prevent mount from unparking if the dome is parked. Since now this is implemented in the mount driver, the unparking itself is prevented from happening in the first place. However, if we move this functionality to Watchdog, then the mount will unpark normally. However, upon detecting this, the watchdog driver would then force a park command to the mount to revert the unparking action. It's not ideal of course, but if we consider moving this logic completely outside, then this is how I see it panning out.
I think that the mount park lock functionality should stay in the telescope base class because it can prevent unpark and a subsequent slew before it starts. The WDT may not know that the mount has unparked for long enough that a slew into the roof is already in progress. The functionality seems to belong in the telescope base class which snoops on the dome park state. It shouldn't affect individual drivers because it's implemented in the base class.
But the mount lock UI seems to belong with the other observatory management functionility in the WDT. Is it possible to have this? The UI in the WDT but the functionality in the telescope base class. This doesn't seem to fit with the way that Indi properties are implemented.
Or is it possible to implement some sort of check functionality where the telescope and dome driver checks the WDT to see if it's OK to unpark? I suppose that's more snooping.
Yes that would require more snooping. I just pushed a commit that simplifies things a bit:
1. Style fixes.
2. Telescope Parking Policy --> Mount Policy
3. Dome Parking Policy --> Dome Policy
4. Removed weather handling in INDI::Dome. It should be handled by Watchdog driver or external client.
5. Simplified mount and dome locking policies:
5.1. Mount Locks: This prevents dome from parking unless mount is already parked.
5.2. Dome Locks: This prevents mount from unparking unless dome is already unparked.
5.3. All other options removed.
6. Removed INDI::Dome AutoPark, since this it does not parking on weather alert anymore.
I;ve just upgrade to StellarMate 1.5.4 and am now seeing "Cannot unpark mount when dome is locking." when trying to simply unpark my EDMOD mount. I've never seen this error message before, have never had a dome. I don't know what is causing this as I now can't image for the night if I can't get this resolved.
Where do you even check the settings for this please???
While I was at my observatory I've been testing the roof closure while the mount is unparked (ie: in a position that would end in a roof/scope crash) and I'm pleased to see that the latest fixes are all good.
I can now stop stressing about "is the scope parked, will the roof come down crashing on the scope/mount"...
Please do make sure this dome/scope policy fix is locked in place and not changed. Thanks for all the coding work team.
Kstars Mac osx
Odroid C1 running indiserver (kept up-to-date with apt-get update/upgrade)
Megrez72 / HEQ5 pro / QHY5L-II-M (OAG) / Atik 314L+ / Gerd Neumann drawer