some more

This commit is contained in:
2025-01-30 22:14:10 +03:00
parent 5441a87fff
commit 31c885ba02
8 changed files with 224 additions and 62 deletions

View File

@@ -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;