fix rounding for negative steps

This commit is contained in:
Jens Eden
2014-03-17 17:36:33 +00:00
parent 21251e1dcc
commit 576a70b70f
+5 -1
View File
@@ -48,7 +48,11 @@ asynStatus omsBaseAxis::move(double position, int relative, double min_velocity,
else
rela = 0;
pos = (epicsInt32) (position + 0.5);
if ( position < 0.0)
pos = (epicsInt32) (position - 0.5);
else
pos = (epicsInt32) (position + 0.5);
if (abs(pos) > 67000000){
asynPrint(pasynUser_, ASYN_TRACE_ERROR,
"%s:%s:%s axis %d position out of range %f\n",