30 #define LX16_TAB "GPS/16 inch Features"
48 IUFillSwitchVector(&
FanStatusSP,
FanStatusS, 2,
getDeviceName(),
"Fan",
"",
LX16_TAB,
IP_RW,
ISR_1OFMANY, 0,
53 IUFillSwitchVector(&
HomeSearchSP,
HomeSearchS, 2,
getDeviceName(),
"Home",
"",
LX16_TAB,
IP_RW,
ISR_1OFMANY, 0,
113 double newAlt = 0, newAz = 0;
121 for (nset = i = 0; i < n; i++)
127 nset += newAlt >= -90. && newAlt <= 90.0;
132 nset += newAz >= 0. && newAz <= 360.0;
242 const struct timespec timeout = {0, 100000000L};
243 char altStr[64], azStr[64];
250 nanosleep(&timeout,
nullptr);
261 fs_sexa(azStr, targetAZ, 2, 3600);
262 fs_sexa(altStr, targetALT, 2, 3600);
271 int searchResult = 0;
292 if (searchResult == 0)
297 else if (searchResult == 1)
302 else if (searchResult == 2)
326 currentAZ = targetAZ;
327 currentALT = targetALT;
338 dx = targetAZ - currentAZ;
339 dy = targetALT - currentALT;
345 if (fabs(dx) <= 0.05 && fabs(dy) <= 0.05)
348 currentAZ = targetAZ;
349 currentALT = targetALT;
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 void getBasicData() override
bool updateProperties()
Called when connected state changes, to add/remove properties.
void ISGetProperties(const char *dev)
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
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.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual bool ReadScopeStatus() override
Read telescope status.
bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
Process the client newSwitch command.
INumber HorizontalCoordsN[2]
bool initProperties()
Called to initialize basic properties required all the time.
const char * getDefaultName()
void ISGetProperties(const char *dev)
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
bool ReadScopeStatus()
Read telescope status.
ISwitchVectorProperty HomeSearchSP
ISwitchVectorProperty FieldDeRotatorSP
ISwitchVectorProperty FanStatusSP
INumberVectorProperty HorizontalCoordsNP
ISwitch FieldDeRotatorS[2]
bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n)
Process the client newNumber command.
bool updateProperties()
Called when connected state changes, to add/remove properties.
const char * MAIN_CONTROL_TAB
MAIN_CONTROL_TAB Where all the primary controls for the device are located.
int fs_sexa(char *out, double a, int w, int fracbase)
Converts a sexagesimal number to a string. sprint the variable a in sexagesimal format into out[].
Implementations for common driver routines.
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.
INumber * IUFindNumber(const INumberVectorProperty *nvp, const char *name)
Find an INumber member in a number text property.
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,...)
int setObjAlt(int fd, double alt)
int getHomeSearchStatus(int fd, int *status)
int setObjAz(int fd, double az)
#define seekHomeAndSave(fd)
#define turnFieldDeRotatorOn(fd)
#define turnFieldDeRotatorOff(fd)
#define getLX200Alt(fd, x)
#define seekHomeAndSet(fd)
#define getLX200Az(fd, x)