change macros to config parameters

This commit is contained in:
2026-01-20 23:18:36 +03:00
parent fd96dc395b
commit f7cb279841
11 changed files with 533 additions and 51 deletions

View File

@@ -26,6 +26,9 @@
#include "serial.h"
#include "ssii.h"
int X_ENC_ZERO, Y_ENC_ZERO;
double X_MOT_STEPSPERREV = 1., Y_MOT_STEPSPERREV = 1., X_ENC_STEPSPERREV = 1., Y_ENC_STEPSPERREV = 1.;
uint16_t SScalcChecksum(uint8_t *buf, int len){
uint16_t checksum = 0;
for(int i = 0; i < len; i++){
@@ -75,8 +78,8 @@ void SSconvstat(const SSstat *s, mountdata_t *m, struct timespec *t){
m->motXposition.t = m->motYposition.t = *t;
// fill encoder data from here, as there's no separate enc thread
if(!Conf.SepEncoder){
m->encXposition.val = X_ENC2RAD(s->Xenc);
m->encYposition.val = Y_ENC2RAD(s->Yenc);
m->encXposition.val = Xenc2rad(s->Xenc);
m->encYposition.val = Yenc2rad(s->Yenc);
m->encXposition.t = m->encYposition.t = *t;
getXspeed(); getYspeed();
}