28 #define GPS_TAB "Extended GPS Features"
46 IUFillSwitchVector(&
GPSPowerSP,
GPSPowerS, 2,
getDeviceName(),
"GPS Power",
"",
GPS_TAB,
IP_RW,
ISR_1OFMANY, 0,
52 IUFillSwitchVector(&
GPSStatusSP,
GPSStatusS, 3,
getDeviceName(),
"GPS Status",
"",
GPS_TAB,
IP_RW,
ISR_1OFMANY, 0,
57 IUFillSwitchVector(&
GPSUpdateSP,
GPSUpdateS, 2,
getDeviceName(),
"GPS System",
"",
GPS_TAB,
IP_RW,
ISR_1OFMANY, 0,
62 IUFillSwitchVector(&
AltDecPecSP,
AltDecPecS, 2,
getDeviceName(),
"Alt/Dec PEC",
"",
GPS_TAB,
IP_RW,
ISR_1OFMANY, 0,
67 IUFillSwitchVector(&
AzRaPecSP,
AzRaPecS, 2,
getDeviceName(),
"Az/RA PEC",
"",
GPS_TAB,
IP_RW,
ISR_1OFMANY, 0,
83 IUFillSwitchVector(&
OTAUpdateSP,
OTAUpdateS, 1,
getDeviceName(),
"OTA Update",
"",
GPS_TAB,
IP_RW,
ISR_ATMOST1, 0,
191 strncpy(msg,
"GPS system is in sleep mode.", 64);
196 strncpy(msg,
"GPS system is reactivated.", 64);
201 strncpy(msg,
"GPS system is restarting...", 64);
259 strncpy(msg,
"Alt/Dec Compensation Enabled.", 64);
264 strncpy(msg,
"Alt/Dec Compensation Disabled.", 64);
287 strncpy(msg,
"Ra/Az Compensation Enabled.", 64);
292 strncpy(msg,
"Ra/Az Compensation Disabled.", 64);
356 JD = ln_get_julian_day(utc);
360 ln_date_to_zonedate(utc, <m, utc_offset * 3600);
362 LOGF_DEBUG(
"Local time is %02d:%02d:%02g", ltm.hours, ltm.minutes, ltm.seconds);
367 LOG_ERROR(
"Error setting local time time.");
372 if (
setLocalDate(utc->days, utc->months, utc->years) ==
false)
386 LOG_INFO(
"Time updated, updating planetary data...");
const char * getDeviceName() const
virtual bool deleteProperty(const char *propertyName)
Delete a property and unregister it. It will also be deleted from all clients.
void defineProperty(INumberVectorProperty *property)
bool isSimulation() const
TelescopeStatus TrackState
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
virtual bool initProperties() override
Called to initialize basic properties required all the time.
bool updateProperties()
Called when connected state changes, to add/remove properties.
ISwitch AltDecBacklashS[1]
INumberVectorProperty OTATempNP
void ISGetProperties(const char *dev)
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
ISwitchVectorProperty AzRaPecSP
ISwitchVectorProperty AltDecPecSP
ISwitchVectorProperty AzRaBacklashSP
ISwitchVectorProperty AltDecBacklashSP
ISwitchVectorProperty GPSStatusSP
virtual bool UnPark()
Unpark the telescope if already parked.
ISwitchVectorProperty GPSPowerSP
bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
Process the client newSwitch command.
bool initProperties()
Called to initialize basic properties required all the time.
ISwitchVectorProperty GPSUpdateSP
ISwitchVectorProperty OTAUpdateSP
const char * getDefaultName()
virtual bool updateTime(ln_date *utc, double utc_offset)
Update telescope time, date, and UTC offset.
ISwitchVectorProperty SelenSyncSP
virtual bool sendScopeLocation()
virtual void ISGetProperties(const char *dev) override
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual bool sendScopeTime()
virtual bool setLocalDate(uint8_t days, uint8_t months, uint16_t years)
virtual bool setLocalTime24(uint8_t hour, uint8_t minute, uint8_t second)
virtual bool setUTCOffset(double offset)
void IUFillNumberVector(INumberVectorProperty *nvp, INumber *np, int nnp, const char *dev, const char *name, const char *label, const char *group, IPerm p, double timeout, IPState s)
Assign attributes for a number vector property. The vector's auxiliary elements will be set to NULL.
int IUFindOnSwitchIndex(const ISwitchVectorProperty *svp)
Returns the index of first ON switch it finds in the vector switch property.
void IUResetSwitch(ISwitchVectorProperty *svp)
Reset all switches in a switch vector property to OFF.
void IUFillSwitch(ISwitch *sp, const char *name, const char *label, ISState s)
Assign attributes for a switch property. The switch's auxiliary elements will be set to NULL.
void IUFillNumber(INumber *np, const char *name, const char *label, const char *format, double min, double max, double step, double value)
Assign attributes for a number property. The number's auxiliary elements will be set to NULL.
void IUFillSwitchVector(ISwitchVectorProperty *svp, ISwitch *sp, int nsp, const char *dev, const char *name, const char *label, const char *group, IPerm p, ISRule r, double timeout, IPState s)
Assign attributes for a switch vector property. The vector's auxiliary elements will be set to NULL.
int IUUpdateSwitch(ISwitchVectorProperty *svp, ISState *states, char *names[], int n)
Update all switches in a switch vector property.
void IDSetNumber(const INumberVectorProperty *nvp, const char *fmt,...)
void IDSetSwitch(const ISwitchVectorProperty *svp, const char *fmt,...)
#define LOGF_DEBUG(fmt,...)
#define LOG_ERROR(txt)
Shorter logging macros. In order to use these macros, the function (or method) "getDeviceName()" must...
int getOTATemp(int fd, double *value)
#define enableRaAzPec(fd)
#define activateAltDecAntiBackSlash(fd)
#define initTelescope(fd)
#define disableDecAltPec(fd)
#define enableDecAltPec(fd)
#define updateGPS_System(fd)
#define disableRaAzPec(fd)
#define activateAzRaAntiBackSlash(fd)