I am currently developing a new mount driver that integrates the Alignment subsystem. I've successfully enabled the "Alignment Subsystem Active" by default when starting Ekos and connecting to the driver with the following code:

// Set alignment system to be active by default
getSwitch("ALIGNMENT_SUBSYSTEM_ACTIVE")[0].setState(ISS_ON);

However, I'm facing a challenge with automatically loading the alignment database from local storage when the driver starts. My goal is to have the alignment points loaded without requiring manual UI interaction each time.

Here's what I've tried so far, but these attempts haven't worked:
getSwitch("ALIGNMENT_POINTSET_ACTION")[LOAD_DATABASE].setState(ISS_ON);
getSwitch("ALIGNMENT_POINTSET_COMMIT")[0].setState(ISS_ON);

I confirmed that SaveAlignmentConfigProperties(fp) properly saves the properties to driverName_alignment_database.xml, and I can manually load the alignment points through the user interface.

Is there a specific or preferred method to automatically load the alignment database upon the driver's command?

Any guidance or suggestions on how to achieve this would be greatly appreciated.

Read More...