[Kstars-devel] kdeedu/kstars/kstars/indi

Jasem Mutlaq mutlaqja at ikarustech.com
Mon Sep 15 04:46:34 CEST 2003


CVS commit by mutlaqja: 

Fixing a bug in lx200 drivers where it does not set the correct JD if a user turns off automatic time updates. The JD is now calculated regardless of automatics updates. Thanks to CJ Chitwood for pointing this problem out!

CCMAIL: kstars-devel at kde.org, cj_chitwood at bellsouth.net


  M +15 -1     lx200generic.cpp   1.14


--- kdeedu/kstars/kstars/indi/lx200generic.cpp  #1.13:1.14
@@ -215,4 +215,10 @@ void ISPoll (void *p) { telescope->ISPol
 LX200Generic::LX200Generic()
 {
+   struct tm *utp;
+   time_t t;
+   time (&t);
+   utp = gmtime (&t);
+
+   
    currentSiteNum = 1;
    currentCatalog = LX200_STAR_C;
@@ -228,5 +234,13 @@ LX200Generic::LX200Generic()
 
    localTM = new tm;
-   JD = 0;
+   
+   
+   utp->tm_mon  += 1;
+   utp->tm_year += 1900;
+   JD = UTtoJD(utp);
+   
+   IDLog("Julian Day is %g\n", JD);
+   
+   delete (utp);
 
    // Children call parent routines, this is the default




More information about the Kstars-devel mailing list