add speed + a lot of refactoring
This commit is contained in:
@@ -169,7 +169,9 @@
|
||||
#define SITECH_LOOP_FREQUENCY (1953.)
|
||||
|
||||
// steps per revolution
|
||||
// 13312000 / 4 = 3328000
|
||||
#define X_MOT_STEPSPERREV (3325952.)
|
||||
// 17578668 / 4 = 4394667
|
||||
#define Y_MOT_STEPSPERREV (4394960.)
|
||||
|
||||
// maximal speeds in rad/s: 10deg/s by X and 8deg/s by Y
|
||||
@@ -199,9 +201,12 @@
|
||||
// encoder per revolution
|
||||
#define X_ENC_STEPSPERREV (67108864.)
|
||||
#define Y_ENC_STEPSPERREV (67108864.)
|
||||
// encoder zero position
|
||||
#define X_ENC_ZERO (46033555)
|
||||
#define Y_ENC_ZERO (36674010)
|
||||
// encoder position to radians and back
|
||||
#define X_ENC2RAD(n) (2.*M_PI * ((double)n) / X_ENC_STEPSPERREV)
|
||||
#define Y_ENC2RAD(n) (2.*M_PI * ((double)n) / Y_ENC_STEPSPERREV)
|
||||
#define X_ENC2RAD(n) (2.*M_PI * ((double)(n-X_ENC_ZERO)) / X_ENC_STEPSPERREV)
|
||||
#define Y_ENC2RAD(n) (2.*M_PI * ((double)(n-Y_ENC_ZERO)) / Y_ENC_STEPSPERREV)
|
||||
#define X_RAD2ENC(r) ((uint32_t)((r) / 2./M_PI * X_ENC_STEPSPERREV))
|
||||
#define Y_RAD2ENC(r) ((uint32_t)((r) / 2./M_PI * Y_ENC_STEPSPERREV))
|
||||
|
||||
@@ -304,7 +309,7 @@ typedef struct{
|
||||
} __attribute__((packed)) SSconfig;
|
||||
|
||||
uint16_t SScalcChecksum(uint8_t *buf, int len);
|
||||
void SSconvstat(const SSstat *status, mountdata_t *mountdata, struct timeval *tdat);
|
||||
void SSconvstat(const SSstat *status, mountdata_t *mountdata, double t);
|
||||
int SStextcmd(const char *cmd, data_t *answer);
|
||||
int SSrawcmd(const char *cmd, data_t *answer);
|
||||
int SSgetint(const char *cmd, int64_t *ans);
|
||||
|
||||
Reference in New Issue
Block a user