nxt
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
// error codes
|
||||
@@ -30,11 +32,13 @@ typedef enum{
|
||||
} mcc_errcodes_t;
|
||||
|
||||
typedef struct{
|
||||
char* MountPath; // path to mount device
|
||||
int MountSpeed; // serial speed
|
||||
char* EncoderPath; // path to encoder device
|
||||
int EncoderSpeed; // serial speed
|
||||
int SepEncoder; // ==1 if encoder works as separate serial device
|
||||
char* MountDevPath; // path to mount device
|
||||
int MountDevSpeed; // serial speed
|
||||
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)
|
||||
;
|
||||
} conf_t;
|
||||
|
||||
// coordinates in degrees: X, Y and time when they were reached
|
||||
@@ -42,9 +46,31 @@ typedef struct{
|
||||
double X; double Y; struct timeval msrtime;
|
||||
} coords_t;
|
||||
|
||||
// data to read/write
|
||||
typedef struct{
|
||||
coords_t position;
|
||||
coords_t speed;
|
||||
uint8_t *buf; // data buffer
|
||||
size_t len; // its length
|
||||
size_t maxlen; // maximal buffer size
|
||||
} data_t;
|
||||
|
||||
typedef struct{
|
||||
uint8_t XBits;
|
||||
uint8_t YBits;
|
||||
uint8_t ExtraBits;
|
||||
uint16_t ain0;
|
||||
uint16_t ain1;
|
||||
} extradata_t;
|
||||
|
||||
typedef struct{
|
||||
coords_t motposition;
|
||||
coords_t encposition;
|
||||
coords_t lastmotposition;
|
||||
coords_t motspeed;
|
||||
uint8_t keypad;
|
||||
extradata_t extradata;
|
||||
uint32_t millis;
|
||||
double temperature;
|
||||
double voltage;
|
||||
} mountdata_t;
|
||||
|
||||
// mount class
|
||||
|
||||
Reference in New Issue
Block a user