This commit is contained in:
2025-02-24 22:23:52 +03:00
parent 5e3cc5b31a
commit f83f95c9cc
12 changed files with 186 additions and 61 deletions

View File

@@ -28,7 +28,7 @@
#define CMD_MOTX "X"
#define CMD_MOTY "Y"
// set X/Y position with speed "sprintf(buf, "%s%d%s%d", CMD_MOTx, tagx, CMD_MOTxS, tags)
#define CMD_MOTXS "S"
#define CMD_MOTXYS "S"
// reset current motor position to given value (and stop, if moving)
#define CMD_MOTXSET "XF"
#define CMD_MOTYSET "YF"
@@ -173,6 +173,10 @@
//#define Y_MOT_STEPSPERREV (4394496.)
#define Y_MOT_STEPSPERREV (4394960.)
// maximal speeds in rad/s: 10deg/s by X and 8deg/s by Y
#define X_SPEED_MAX (0.17453)
#define Y_SPEED_MAX (0.13963)
// motor position to radians and back
#define X_MOT2RAD(n) (2.*M_PI * (double)n / X_MOT_STEPSPERREV)
#define Y_MOT2RAD(n) (2.*M_PI * (double)n / Y_MOT_STEPSPERREV)
@@ -250,7 +254,6 @@ void SSconvstat(const SSstat *status, mountdata_t *mountdata, struct timeval *td
int SStextcmd(const char *cmd, data_t *answer);
int SSrawcmd(const char *cmd, data_t *answer);
int SSgetint(const char *cmd, int64_t *ans);
int SSXmoveto(double pos);
int SSYmoveto(double pos);
int SSemergStop();
int SSsetterI(const char *cmd, int32_t ival);
int SSstop(int emerg);
int SSshortCmd(SSscmd *cmd);