I think I got the meridian flip issue fixed. Just pull the latest from github and re-build. If the slew should move more than half a rotation, we go back to the home position first, then continue the slew. Helps with accuracy, as well, since we reset the tick count.
I've cloned your repository and built it. It all seems to work well (on a RaspberryPi 4) However when starting KSTars and connecting to the CGX the driver indi-celestron-cgx crashes. I have the latest KStar and indi installed. It looks like the problem is the Celestron Focuser. When I remove the aux cable it works. This is what I found in the log files:
Thx Rick, I'll give it a try. Quickly glancing at the code it seems that there is no special treatment for CGX/CGX-L to make use of the home switches. If the code overalls work it would be great to add that functionality. If the current contributors are happy then I might give it a try and add it (as well as support for the focuser).
If you'd like to add a PR to add the functionality to indi_celestron_cgx, I'd be happy to merge it. I'm in the process of upgrading my mount away from the CGX, and I don't have the Celestron Focuser, so I can't really give it a good test.