nxt
This commit is contained in:
@@ -29,6 +29,7 @@ typedef enum{
|
||||
MCC_E_BADFORMAT, // wrong arguments of function
|
||||
MCC_E_ENCODERDEV, // encoder device error or can't open
|
||||
MCC_E_MOUNTDEV, // mount device error or can't open
|
||||
MCC_E_FAILED, // failed to run command - protocol error
|
||||
} mcc_errcodes_t;
|
||||
|
||||
typedef struct{
|
||||
@@ -37,7 +38,7 @@ typedef struct{
|
||||
char* EncoderDevPath; // path to encoder device
|
||||
int EncoderDevSpeed; // serial speed
|
||||
int SepEncoder; // ==1 if encoder works as separate serial device
|
||||
suseconds_t MountReqInterval;// interval between subsequent mount requests (microseconds)
|
||||
double MountReqInterval; // maximal interval between subsequent mount requests (seconds)
|
||||
;
|
||||
} conf_t;
|
||||
|
||||
@@ -65,7 +66,6 @@ typedef struct{
|
||||
coords_t motposition;
|
||||
coords_t encposition;
|
||||
coords_t lastmotposition;
|
||||
coords_t motspeed;
|
||||
uint8_t keypad;
|
||||
extradata_t extradata;
|
||||
uint32_t millis;
|
||||
@@ -75,9 +75,11 @@ typedef struct{
|
||||
|
||||
// mount class
|
||||
typedef struct{
|
||||
mcc_errcodes_t (*init)(conf_t *c);
|
||||
void (*quit)();
|
||||
mcc_errcodes_t (*getMountData)(mountdata_t *d);
|
||||
mcc_errcodes_t (*init)(conf_t *c); // init device
|
||||
void (*quit)(); // deinit
|
||||
mcc_errcodes_t (*getMountData)(mountdata_t *d); // get last data
|
||||
mcc_errcodes_t (*moveTo)(double X, double Y); // move to given position ans stop
|
||||
mcc_errcodes_t (*emergStop)(); // emergency stop
|
||||
} mount_t;
|
||||
|
||||
extern mount_t Mount;
|
||||
|
||||
Reference in New Issue
Block a user