TwiceAsNice  2019-02-18
Macros | Functions | Variables
skycommander.c File Reference
#include "lx200driver.h"
#include "indidevapi.h"
#include "indicom.h"
#include <termios.h>
Include dependency graph for skycommander.c:

Macros

#define mydev   "Sky Commander"
 
#define BASIC_GROUP   "Main Control"
 
#define POLLMS   1000
 
#define currentRA   eq[0].value
 
#define currentDEC   eq[1].value
 
#define SKYCOMMANDER_TIMEOUT   5
 

Functions

static void ISPoll (void *)
 
static void ISInit (void)
 
static void connectTelescope (void)
 
void ISGetProperties (const char *dev)
 Get Device Properties. More...
 
void ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
 Update the value of an existing switch vector property. More...
 
void ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n)
 Update the value of an existing text vector property. More...
 
void ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n)
 
void ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
 Update data of an existing blob vector property. More...
 
void ISSnoopDevice (XMLEle *root)
 Function defined by Drivers that is called when another Driver it is snooping (by having previously called IDSnoopDevice()) sent any INDI message. More...
 
int updateSkyCommanderCoord (int fd, double *ra, double *dec)
 

Variables

int fd
 
static ISwitch PowerS [] = { { "CONNECT", "Connect", ISS_OFF, 0, 0 }, { "DISCONNECT", "Disconnect", ISS_ON, 0, 0 } }
 
ISwitchVectorProperty PowerSP
 
static IText PortT [] = { { "PORT", "Port", 0, 0, 0, 0 } }
 
static ITextVectorProperty PortTP
 
INumber eq []
 
INumberVectorProperty eqNum
 

Macro Definition Documentation

◆ BASIC_GROUP

#define BASIC_GROUP   "Main Control"

◆ currentDEC

#define currentDEC   eq[1].value

◆ currentRA

#define currentRA   eq[0].value

◆ mydev

#define mydev   "Sky Commander"

◆ POLLMS

#define POLLMS   1000

◆ SKYCOMMANDER_TIMEOUT

#define SKYCOMMANDER_TIMEOUT   5

Function Documentation

◆ connectTelescope()

void connectTelescope ( void  )
static

◆ ISInit()

static void ISInit ( void  )
static

◆ ISNewNumber()

void ISNewNumber ( const char *  dev,
const char *  name,
double  values[],
char *  names[],
int  n 
)

◆ ISPoll()

static void ISPoll ( void *  p)
static

◆ updateSkyCommanderCoord()

int updateSkyCommanderCoord ( int  fd,
double *  ra,
double *  dec 
)

Variable Documentation

◆ eq

INumber eq[]
Initial value:
= {
{ "RA", "RA H:M:S", "%10.6m", 0., 24., 0., 0., 0, 0, 0 },
{ "DEC", "Dec D:M:S", "%10.6m", -90., 90., 0., 0., 0, 0, 0 },
}

◆ eqNum

Initial value:
= {
mydev, "EQUATORIAL_EOD_COORD", "Equatorial JNow", BASIC_GROUP, IP_RO, 0, IPS_IDLE, eq, NARRAY(eq), "", 0
}
Definition: indiapi.h:176
Definition: indiapi.h:155
#define mydev
Definition: skycommander.c:30
INumber eq[]
Definition: skycommander.c:52
#define NARRAY(a)
Handy macro to find the number of elements in array a[].
Definition: indiapi.h:492
#define BASIC_GROUP
Definition: skycommander.c:31

◆ fd

int fd

◆ PortT

IText PortT[] = { { "PORT", "Port", 0, 0, 0, 0 } }
static

◆ PortTP

ITextVectorProperty PortTP
static
Initial value:
= { mydev, "DEVICE_PORT", "Ports", BASIC_GROUP, IP_RW, 0,
IPS_IDLE, PortT, NARRAY(PortT), "", 0 }
Definition: indiapi.h:155
#define mydev
Definition: skycommander.c:30
Definition: indiapi.h:178
static IText PortT[]
Definition: skycommander.c:47
#define NARRAY(a)
Handy macro to find the number of elements in array a[].
Definition: indiapi.h:492
#define BASIC_GROUP
Definition: skycommander.c:31

◆ PowerS

ISwitch PowerS[] = { { "CONNECT", "Connect", ISS_OFF, 0, 0 }, { "DISCONNECT", "Disconnect", ISS_ON, 0, 0 } }
static

◆ PowerSP

Initial value:
= { mydev, "CONNECTION", "Connection", BASIC_GROUP, IP_RW, ISR_1OFMANY,
0, IPS_IDLE, PowerS, NARRAY(PowerS), "", 0 }
static ISwitch PowerS[]
Definition: skycommander.c:43
Definition: indiapi.h:155
Definition: indiapi.h:166
#define mydev
Definition: skycommander.c:30
Definition: indiapi.h:178
#define NARRAY(a)
Handy macro to find the number of elements in array a[].
Definition: indiapi.h:492
#define BASIC_GROUP
Definition: skycommander.c:31