[Kstars-devel] kdeedu/kstars/kstars/indi
Jasem Mutlaq
mutlaqja at ikarustech.com
Thu Oct 16 00:40:03 CEST 2003
CVS commit by mutlaqja:
Using CheckCoords to check if the telescope finished slewing instead of an absolute and arbitrary threshold that was used before. Thanks to Quinn Jensen for the patch!
CCMAIL: kstars-devel at kde.org
CCMAIL: quinn at zdomain.com
M +11 -6 celestrongps.cpp 1.8
--- kdeedu/kstars/kstars/indi/celestrongps.cpp #1.7:1.8
@@ -551,4 +551,5 @@ void CelestronGPS::ISPoll()
double dx, dy;
double currentRA, currentDEC;
+ int status;
@@ -586,8 +587,14 @@ void CelestronGPS::ISPoll()
eqNum.n[1].value = currentDEC;
+ status = CheckCoords(targetRA, targetDEC);
+
// Wait until acknowledged or within 3.6', change as desired.
- if (fabs(dx) <= RA_THRESHOLD && fabs(dy) <= DEC_THRESHOLD)
+ switch (status)
{
-
+ case 0: /* goto in progress */
+ IDSetNumber (&eqNum, NULL);
+ break;
+ case 1: /* goto complete within tolerance */
+ case 2: /* goto complete but outside tolerance */
currentRA = targetRA;
currentDEC = targetDEC;
@@ -626,8 +633,6 @@ void CelestronGPS::ISPoll()
IDSetNumber (&eqNum, NULL);
//IDSetNumber (&DEC, NULL);
-
- } else
- IDSetNumber (&eqNum, NULL);
-
+ break;
+ }
break;
More information about the Kstars-devel
mailing list