forked from epics_driver_modules/motorBase
fix rounding for negative steps
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user