diff --git a/site_ansto/motor_dmc2280.c b/site_ansto/motor_dmc2280.c index 3ea4c91a..cd995315 100644 --- a/site_ansto/motor_dmc2280.c +++ b/site_ansto/motor_dmc2280.c @@ -2516,6 +2516,7 @@ static void DMCState_Moving(pDMC2280Driv self, pEvtEvent event) { SICSLogWrite(line, eStatus); } set_lastMotion(self, self->currSteps, self->currCounts); + self->preseek = 2; /* special one-shot */ absolute = motCreep(self, target); } } @@ -2555,6 +2556,8 @@ static void DMCState_Moving(pDMC2280Driv self, pEvtEvent event) { } cmdPosition(self, absolute); self->subState = 3; + if (self->preseek == 2) /* change of direction */ + self->preseek = 0; /* don't do it again */ return; } }