Fixed a wrong state in management of unparking error, causing unparking errors to leave the park state busy unparking.
Reworked parkMount like unParkMount, managing D-Bus errors properly.
Fixed transitions to un/parked states, so that those states now match the current state of the mount instead of an expected transition in the state machine.
Added a safeguard against a null pointer dereference for edge cases leading to null job execution.
Fixed startup state when Scheduler is stopping, causing unparked states to never be checked properly.
Details
A straightforward way to reproduce the main issue that is fixed here is to use "culmination_no_twilight".
Start the Scheduler, observe as:
- Observatory is started, and elements unparked
- Scheduler selects one of the jobs, eventually processes it, then sleeps waiting for the next
Then stop , and restart the Scheduler.
Without the fix, Scheduler repeatedly logs "Mount unparked", unable to request any element to unpark (actually unable to restart the observatory properly).
With the fix, Scheduler goes through the different steps of the observatory startup, unparking elements properly.
From there, various situation may be tested with parking states in order to desynchronize the parking engine from the mount actual state.
Notable is that this differential also restores connection to an INDI mount driver that has disconnected.
This restoration is done as part of the observatory startup, and a loss of connection during capture is still not managed (except by a subsequent failing guide).
Diff Detail
- Repository
- R321 KStars
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Looks good, I could reproduce the problem and checked it being fixed against simulators.
I'm putting all on hold until DBus branch is merged back to master. So hopefully with a day or two.