We could try that method to see if it works. I left the comment in there where it can be added. Maybe if we detect something odd, such as this case where a guide step comes in and we are not guiding as far as we know, we could call that method and get an updated state.
I'm giving it a try. If it works, it could make the connection to PHD2 more robust. There are other places in the code where the phd2 class "guesses" a new state from some behavior. All these places could be stepwise migrated to a re-sync with the PHD2 state instead of speculating what it should be.
Somewhat half OT. But as you work on Meridian flip, and now look at PHD2 control - any chance to integrate an option to send a 'flip calibration' command to PHD2 after a meridian flip? The API supports it, but it's not used by EKOS (so far). As my mount doesn't have pier side info, this keeps me from automatic flips. I always have to stop and manually flip the calibration....