start changing T-ramp code (old was too ugly)

This commit is contained in:
eddyem
2025-04-13 17:59:51 +03:00
parent d5dd260007
commit 76ddd60c7d
5 changed files with 114 additions and 10 deletions

View File

@@ -56,10 +56,6 @@ static int move(moveparam_t *tag){
if(!tag) ERRX("move(): needs target");
moveparam_t curpos;
movestate_t curstate = model->get_state(&curpos);
if(curstate == ST_ERROR){
WARNX("move(): got error state, can't move");
return FALSE;
}
if(!move_to(tag)){
WARNX("move(): can't move to %g with max speed %g", tag->coord, tag->speed);
return FALSE;
@@ -80,7 +76,7 @@ static void monit(double tnext){
movestate_t st = model->get_state(&p);
fprintf(coordslog, "%-9.4f\t%-10.4f\t%-10.4f\t%-10.4f\n",
t - Tstart, p.coord, p.speed, p.accel);
if(st == ST_STOP || st == ST_ERROR) break;
if(st == ST_STOP) break;
usleep(G.dT);
}while(nanot() - t0 < tnext);
DBG("End of monitoring");