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

Macros

#define NULL_PTR(x)   (x *)0
 

Typedefs

typedef fd_set telfds
 

Functions

int ConnectTel (char *port)
 
void DisconnectTel (void)
 
int CheckConnectTel (void)
 
void SetRate (int newRate)
 
void SetLimits (double limitLower, double limitHigher)
 
double GetRA (void)
 
double GetDec (void)
 
int SlewToCoords (double newRA, double newDec)
 
int SyncToCoords (double newRA, double newDec)
 
int CheckCoords (double desRA, double desDec, double tolRA, double tolDEC)
 
void StopNSEW (void)
 
int SetSlewRate (void)
 
int SyncLST (double newTime)
 
int SyncLocalTime (void)
 
void Reticle (int reticle)
 
void Focus (int focus)
 
void Derotator (int rotate)
 
void Fan (int fan)
 
void GetRAandDec (void)
 
static int readn (int fd, char *ptr, int nbytes, int sec)
 
static int writen (int fd, char *ptr, int nbytes)
 
static int telstat (int fd, int sec, int usec)
 
int StartSlew (int direction)
 
int StopSlew (int direction)
 
int isScopeSlewing ()
 
int updateLocation (double lng, double lat)
 
int updateTime (struct ln_date *utc, double utc_offset)
 

Variables

static int TelPortFD
 
static int TelConnectFlag = 0
 
static double returnRA
 
static double returnDec
 
static int updateRA
 
static int updateDec
 
static int slewRate
 
static double offsetRA = 0
 
static double offsetDec = 0
 

Macro Definition Documentation

◆ NULL_PTR

#define NULL_PTR (   x)    (x *)0

Typedef Documentation

◆ telfds

typedef fd_set telfds

Function Documentation

◆ CheckConnectTel()

int CheckConnectTel ( void  )

◆ CheckCoords()

int CheckCoords ( double  desRA,
double  desDec,
double  tolRA,
double  tolDEC 
)

◆ ConnectTel()

int ConnectTel ( char *  port)

◆ Derotator()

void Derotator ( int  rotate)

◆ DisconnectTel()

void DisconnectTel ( void  )

◆ Fan()

void Fan ( int  fan)

◆ Focus()

void Focus ( int  focus)

◆ GetDec()

double GetDec ( void  )

◆ GetRA()

double GetRA ( void  )

◆ GetRAandDec()

void GetRAandDec ( void  )

◆ isScopeSlewing()

int isScopeSlewing ( )

◆ readn()

static int readn ( int  fd,
char *  ptr,
int  nbytes,
int  sec 
)
static

◆ Reticle()

void Reticle ( int  reticle)

◆ SetLimits()

void SetLimits ( double  limitLower,
double  limitHigher 
)

◆ SetRate()

void SetRate ( int  newRate)

◆ SetSlewRate()

int SetSlewRate ( void  )

◆ SlewToCoords()

int SlewToCoords ( double  newRA,
double  newDec 
)

◆ StartSlew()

int StartSlew ( int  direction)

◆ StopNSEW()

void StopNSEW ( void  )

◆ StopSlew()

int StopSlew ( int  direction)

◆ SyncLocalTime()

int SyncLocalTime ( void  )

◆ SyncLST()

int SyncLST ( double  newTime)

◆ SyncToCoords()

int SyncToCoords ( double  newRA,
double  newDec 
)

◆ telstat()

static int telstat ( int  fd,
int  sec,
int  usec 
)
static

◆ updateLocation()

int updateLocation ( double  lng,
double  lat 
)

◆ updateTime()

int updateTime ( struct ln_date *  utc,
double  utc_offset 
)

◆ writen()

static int writen ( int  fd,
char *  ptr,
int  nbytes 
)
static

Variable Documentation

◆ offsetDec

double offsetDec = 0
static

◆ offsetRA

double offsetRA = 0
static

◆ returnDec

double returnDec
static

◆ returnRA

double returnRA
static

◆ slewRate

int slewRate
static

◆ TelConnectFlag

int TelConnectFlag = 0
static

◆ TelPortFD

int TelPortFD
static

◆ updateDec

int updateDec
static

◆ updateRA

int updateRA
static