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

@@ -107,13 +107,13 @@ void waitmoving(int N){
}
/**
* @brief getMotPos - get current
* @brief getPos - get current position
* @param mot (o) - motor position (or NULL)
* @param Y (o) - encoder position (or NULL)
* @return FALSE if failed
*/
int getPos(coords_t *mot, coords_t *enc){
mountdata_t mdata;
mountdata_t mdata = {0};
int errcnt = 0;
do{
if(MCC_E_OK != Mount.getMountData(&mdata)) ++errcnt;
@@ -137,7 +137,8 @@ void chk0(int ncycles){
if(!getPos(&M, NULL)) signals(2);
if(M.X || M.Y){
WARNX("Mount position isn't @ zero; moving");
Mount.moveTo(0., 0.);
double zero = 0.;
Mount.moveTo(&zero, &zero);
waitmoving(ncycles);
green("Now mount @ zero\n");
}