Moved the polling from HXPAxis::poll to HXPController::poll to allow HXP support to work with newer firmware.
Issue 124 description:
Older versions of the HXP firmware (v2.1.0 and earlier) are able to query the positions of the virtual axes independently using the virtual group names. Newer versions of the firmware (confirmed with v3.1.0) return an error (-19: GroupName doesn't exist or unknown command). Querying the positions of all six virtual axes simultaneously works on both v2.1.0 and v3.1.0.
Fixes#124
This is from Matthew Pearson, pearsonmr@ornl.gov
A number of users and staff have requested that the motor record have a
setpoint deadband field (eg. SPDB), which prevents any motion from
happening if the readback position is within SPDB.
Without a SPDB we have issues with motors moving unnecessarily.
For example, if the RBV is 0.001 and we set VAL to 0.0, if we have a
non-zero backlash correction then the motor will move unnecessarily
to take out backlash.
Even without backlash correction we often enable and disable the
drive amplifier for no good reason.
Currently the effective setpoint deadband is equal to MRES,
but this is often too small to be an effective setpoint deadband.
The new SPDB field would default to 0.0
The new code hooks into do_work():
When the new setpoint is within DPDB, set too_small and don't move.
The new code does not use snipptes like "abs(npos - rpos)", these
already produce warnings on 64 bit sytems.
abs() is declared to work on int, but we feed long values.
Simply compare the coordinates in engineering units.
1. Changed init function arguments in model-1 drivers to int
2. Simplified the init function logic related to "after"
3. Cast the pointer to the init function as DEVSUPFUN in the motor_dset structure
The asyn module make the constructor
asynPortDriver::asynPortDriver(const char *portNameIn, int maxAddrIn,
int paramTableSize, int interfaceMask, int interruptMask,
int asynFlags, int autoConnect, int priority, int stackSize)
obsolete in R4.32.0, the more modern version should be used, which does
not have the parameter paramTableSize.
Using a modern version of asyn for the motor gives a compiler warning.
As I don't like compiler warnings, add a #ifdef construct to suppress it
for asyn > R4.32, and still allow to compile agains asyn >= R4.32
like this:
../devOmsPC68.cc:74:1: error: invalid conversion from ‘long int
(*)(int)’ to ‘DEVSUPFUN {aka long int (*)(void*)}’ [-fpermissive]
};
and this:
./devPmac.cc:66: error: invalid conversion from 'long int (*)(int)' to
'long int (*)(void*)'
Refactor the changes for the deprecated RECSUP in later EPICS base
version, which need a typedef for struct rset.
Unite all common code and put it into a single include file.
Add motor_epics_inc.h.