Change poll times to doubles in constructor, but still int in C linkage for vxWorks

This commit is contained in:
MarkRivers
2011-03-29 22:58:32 +00:00
parent d62b61d6b2
commit 2d46405cea
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -27,7 +27,8 @@ March 4, 2011
static const char *driverName = "ACRMotorDriver";
ACRController::ACRController(const char *portName, const char *ACRPortName, int numAxes, int movingPollPeriod, int idlePollPeriod)
ACRController::ACRController(const char *portName, const char *ACRPortName, int numAxes,
double movingPollPeriod, double idlePollPeriod)
: asynMotorController(portName, numAxes, NUM_ACR_PARAMS,
asynInt32Mask | asynFloat64Mask | asynUInt32DigitalMask,
asynInt32Mask | asynFloat64Mask | asynUInt32DigitalMask,
@@ -93,10 +94,11 @@ ACRController::ACRController(const char *portName, const char *ACRPortName, int
/** Configuration command, called directly or from iocsh */
extern "C" int ACRCreateController(const char *portName, const char *ACRPortName, int numAxes, int movingPollPeriod, int idlePollPeriod)
extern "C" int ACRCreateController(const char *portName, const char *ACRPortName, int numAxes,
int movingPollPeriod, int idlePollPeriod)
{
ACRController *pACRController
= new ACRController(portName, ACRPortName, numAxes, movingPollPeriod, idlePollPeriod);
= new ACRController(portName, ACRPortName, numAxes, movingPollPeriod/1000., idlePollPeriod/1000.);
pACRController = NULL;
return(asynSuccess);
}
+1 -1
View File
@@ -50,7 +50,7 @@ friend class ACRController;
class ACRController : public asynMotorController {
public:
ACRController(const char *portName, const char *ACRPortName, int numAxes, int movingPollPeriod, int idlePollPeriod);
ACRController(const char *portName, const char *ACRPortName, int numAxes, double movingPollPeriod, double idlePollPeriod);
/* These are the methods that we override from asynMotorDriver */
asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);