start configurator

This commit is contained in:
2025-02-27 22:46:51 +03:00
parent 70dec29f02
commit 943409c53e
14 changed files with 231 additions and 5 deletions

View File

@@ -185,6 +185,12 @@
#define X_RS2MOTSPD(r) ((int32_t)(X_RAD2MOT(r)*65536./1953.))
#define Y_MOTSPD2RS(n) (Y_MOT2RAD(n)/65536.*1953.)
#define Y_RS2MOTSPD(r) ((int32_t)(Y_RAD2MOT(r)*65536./1953.))
// motor acceleration -//-
#define X_MOTACC2RS(n) (X_MOT2RAD(n)/65536.*1953.*1953.)
#define X_RS2MOTACC(r) ((int32_t)(X_RAD2MOT(r)*65536./1953./1953.))
#define Y_MOTACC2RS(n) (Y_MOT2RAD(n)/65536.*1953.*1953.)
#define Y_RS2MOTACC(r) ((int32_t)(Y_RAD2MOT(r)*65536./1953./1953.))
// adder time to seconds vice versa
#define ADDER2S(a) ((a)*1953.)
#define S2ADDER(s) ((s)/1953.)
@@ -247,6 +253,55 @@ typedef struct{
uint16_t checksum; // 32
} __attribute__((packed)) SSlcmd; // long command
typedef struct{
uint32_t accel; // Default Acceleration (0..3900)
uint32_t backlash; // Backlash (???)
uint16_t errlimit; // Error Limit (0..32767)
uint16_t propgain; // Proportional Gain (0..32767)
uint16_t intgain; // Integral Gain (0..32767)
uint16_t derivgain; // Derivative Gain (0..32767)
uint16_t outplimit; // Output Limit, 0xFF = 100.0 (0..255)
uint16_t currlimit; // Current Limit * 100 (0..240)
uint16_t intlimit; // Integral Limit (0..24000)
} __attribute__((packed)) AxeConfig;
typedef struct{
AxeConfig Xconf;
xbits_t xbits;
uint8_t unused0;
AxeConfig Yconf;
ybits_t ybits;
uint8_t unused1;
uint8_t address;
uint8_t unused2;
uint32_t eqrate; // Equatorial Rate (platform?) (???)
int32_t eqadj; // Equatorial UpDown adjust (???)
uint32_t trackgoal; // Tracking Platform Goal (???)
uint16_t latitude; // Latitude * 100, MSB FIRST!!
uint32_t Ysetpr; // Azm Scope Encoder Ticks Per Rev, MSB FIRST!!
uint32_t Xsetpr; // Alt Scope Encoder Ticks Per Rev, MSB FIRST!!
uint32_t Ymetpr; // Azm Motor Ticks Per Rev, MSB FIRST!!
uint32_t Xmetpr; // Alt Motor Ticks Per Rev, MSB FIRST!!
int32_t Xslewrate; // Alt/Dec Slew Rate (rates are negative in "through the pole" mode!!!)
int32_t Yslewrate; // Azm/RA Slew Rate
int32_t Xpanrate; // Alt/Dec Pan Rate
int32_t Ypanrate; // Azm/RA Pan Rate
int32_t Xguiderate; // Alt/Dec Guide Rate
int32_t Yguiderate; // Azm/RA Guide Rate
uint8_t unknown0; // R/A PEC Auto Sync Enable (if low bit = 1), or PicServo Comm Timeout??
uint8_t unused3;
uint8_t baudrate; // Baud Rate??
uint8_t unused4;
uint8_t specmode; // 1 = Enable Argo Navis, 2 = Enable Sky Commander
uint8_t unused5;
uint32_t locsdeg; // Local Search Degrees * 100
uint32_t locsspeed; // Local Search Speed, arcsec per sec (???)
uint32_t backlspd; // Backlash speed
uint32_t pecticks; // RA/Azm PEC Ticks
uint16_t unused6;
uint16_t checksum;
} __attribute__((packed)) SSconfig;
uint16_t SScalcChecksum(uint8_t *buf, int len);
void SSconvstat(const SSstat *status, mountdata_t *mountdata, struct timeval *tdat);
int SStextcmd(const char *cmd, data_t *answer);