Hello,
I am controlling my Celestron Nextar 8SE mount with a joystick. I know that in the Telescope simulator for example, it is possible to set the slew rate, to park/unpark the mount or abort the motion with buttons or axes of the joystick. However, I don't see those capabilities in the indi_celestron_gps driver, I can only set the "N/S/W/E Control".
In the file inditelescope.cpp, at the line 124, I see that:
124 controller->mapController("MOTIONDIR", "N/S/W/E Control", INDI::Controller::CONTROLLER_JOYSTICK, "JOYSTICK_1");
125 if (nSlewRate >= 4)
126 controller->mapController("SLEWPRESET", "Slew Rate", INDI::Controller::CONTROLLER_JOYSTICK, "JOYSTICK_2");
127 if (CanAbort())
128 controller->mapController("ABORTBUTTON", "Abort", INDI::Controller::CONTROLLER_BUTTON, "BUTTON_1");
129 if (CanPark())
130 {
131 controller->mapController("PARKBUTTON", "Park", INDI::Controller::CONTROLLER_BUTTON, "BUTTON_2");
132 controller->mapController("UNPARKBUTTON", "UnPark", INDI::Controller::CONTROLLER_BUTTON, "BUTTON_3");
133 }
And in the line 227 of the file celestrongps.cpp, the parameter nSlewRate is initialized to 9 through the method SetTelescopeCapability:
SetTelescopeCapability(cap,9);
So the nSlewRate is higher than 4, so it should be possible to assign the joystick buttons/axes to the slew rate control?
If I want to add this capability, do I have to edit the C++ files, or is it possible to do it only with XML files? I have looked at the default XML config file of the celestron driver, and the part concerning the joystick control is the following:
<newTextVector device='Celestron GPS' name='JOYSTICKSETTINGS'>
<oneText name='MOTIONDIR'>
JOYSTICK_3
</oneText>
</newTextVector>
So I have tried to add the button controls:
<newTextVector device='Celestron GPS' name='JOYSTICKSETTINGS'>
<oneText name='MOTIONDIR'>
JOYSTICK_3
</oneText>
<oneText name='SLEW_GUIDE'>
BUTTON_5
</oneText>
<oneText name='SLEW_CENTERING'>
BUTTON_3
</oneText>
<oneText name='SLEW_FIND'>
BUTTON_4
</oneText>
<oneText name='SLEW_MAX'>
BUTTON_6
</oneText>
<oneText name='ABORT_MOTION'>
BUTTON_2
</oneText>
</newTextVector>
I do not get any error when loading the new XML config file, but the new options do not show up in the Celestron tab.