some more
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
// error codes
|
||||
typedef enum{
|
||||
MCC_E_OK = 0, // all OK
|
||||
@@ -32,18 +34,24 @@ typedef struct{
|
||||
int MountSpeed; // serial speed
|
||||
char* EncoderPath; // path to encoder device
|
||||
int EncoderSpeed; // serial speed
|
||||
int SepEncoder; // ==1 if encoder works as separate serial device
|
||||
} conf_t;
|
||||
|
||||
// coordinates in degrees: X, Y and time when they were reached
|
||||
typedef struct{
|
||||
double X; double Y; double msrtime;
|
||||
double X; double Y; struct timeval msrtime;
|
||||
} coords_t;
|
||||
|
||||
typedef struct{
|
||||
coords_t position;
|
||||
coords_t speed;
|
||||
} mountdata_t;
|
||||
|
||||
// mount class
|
||||
typedef struct{
|
||||
mcc_errcodes_t (*init)(conf_t *c);
|
||||
void (*quit)();
|
||||
mcc_errcodes_t (*getEnc)(coords_t *c);
|
||||
mcc_errcodes_t (*getMountData)(mountdata_t *d);
|
||||
} mount_t;
|
||||
|
||||
extern mount_t Mount;
|
||||
|
||||
Reference in New Issue
Block a user