diff --git a/acsMotionApp/src/SPiiPlusAuxDriver.cpp b/acsMotionApp/src/SPiiPlusAuxDriver.cpp index 3c0c753..9669866 100644 --- a/acsMotionApp/src/SPiiPlusAuxDriver.cpp +++ b/acsMotionApp/src/SPiiPlusAuxDriver.cpp @@ -26,11 +26,11 @@ static void SPiiPlusAuxIOThreadC(void *pPvt) static void shutdownCallback(void *pPvt) { - SPiiPlusController *pC = static_cast(pPvt); + SPiiPlusAuxIO *pAux = static_cast(pPvt); - pC->lock(); - pC->shuttingDown_ = 1; - pC->unlock(); + pAux->lock(); + pAux->shuttingDown_ = 1; + pAux->unlock(); } SPiiPlusAuxIO::SPiiPlusAuxIO(const char *ACSAuxPortName, const char* asynPortName, int numChannels, double pollPeriod) @@ -52,7 +52,7 @@ SPiiPlusAuxIO::SPiiPlusAuxIO(const char *ACSAuxPortName, const char* asynPortNam pComm_ = new SPiiPlusComm(ACSCommPortName, asynPortName, numChannels); /* Set an EPICS exit handler that will shut down polling before asyn kills the IP sockets */ - epicsAtExit(shutdownCallback, pC_); + epicsAtExit(shutdownCallback, this); /* * MP4U controllers have significantly larger arrays for the AIN, AOUT, IN and OUT commands than the controller diff --git a/acsMotionApp/src/SPiiPlusAuxDriver.h b/acsMotionApp/src/SPiiPlusAuxDriver.h index 8cd7334..56e5a1f 100644 --- a/acsMotionApp/src/SPiiPlusAuxDriver.h +++ b/acsMotionApp/src/SPiiPlusAuxDriver.h @@ -49,7 +49,6 @@ class epicsShareClass SPiiPlusAuxIO : public asynPortDriver { #define LAST_SPIIPLUS_AUXIO_PARAM analogOutput_ private: - SPiiPlusController *pC_; double pollPeriod_; int forceCallback_; double ain_[MAX_SIGNALS];