Mount cannot be slewed to a negative by an automated procedure
Requesting the mount to move at a negative altitude causes a timed pop-up to appear, warning the end-user. This (second) pop-up appears after the horizon limits set in the Mount module are checked (see #148).
if (targetAlt < 0)
{
connect(KSMessageBox::Instance(), &KSMessageBox::accepted, this, [ = ]()
{
KSMessageBox::Instance()->disconnect(this);
checkObjectAndSend();
});
connect(KSMessageBox::Instance(), &KSMessageBox::rejected, this, [ = ]()
{
KSMessageBox::Instance()->disconnect(this);
if (EqProp)
{
RAEle->value = currentRA;
DecEle->value = currentDEC;
}
if (HorProp)
{
AzEle->value = currentAz;
AltEle->value = currentAlt;
}
});
KSMessageBox::Instance()->questionYesNo(i18n("Requested altitude is below the horizon. Are you sure you want to proceed?"),
i18n("Telescope Motion"), 15, false);
}
else
checkObjectAndSend();
There is no way for an automated procedure to bypass this step as it requires end-user approval.
There should be only one check in that situation if the Mount module limits are enabled (see #148). In addition, the pop-up should remember the end-user choice, because it actually blocks the signal sent by the caller and causes other issues related to mount status checks by clients (there is no straightforward way for a d-bus client to know the mount isn't moving).