From 9b6764b0e044ec0613afe74b0d1ae6eeca2fcc6e Mon Sep 17 00:00:00 2001 From: kpetersn Date: Mon, 9 Apr 2018 13:20:58 -0500 Subject: [PATCH] Removed reconfig funcationlity (only useful for testing as written). --- motorApp/AMCISrc/ANF2Driver.cpp | 12 ++++++++---- motorApp/AMCISrc/ANF2Driver.h | 9 ++++----- motorApp/Db/ANF2Aux.template | 15 ++++++++------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/motorApp/AMCISrc/ANF2Driver.cpp b/motorApp/AMCISrc/ANF2Driver.cpp index 16c6fdd2..f45020d9 100644 --- a/motorApp/AMCISrc/ANF2Driver.cpp +++ b/motorApp/AMCISrc/ANF2Driver.cpp @@ -56,7 +56,7 @@ ANF2Controller::ANF2Controller(const char *portName, const char *ANF2InPortName, // Create controller-specific parameters createParam(ANF2ResetErrorsString, asynParamInt32, &ANF2ResetErrors_); createParam(ANF2GetInfoString, asynParamInt32, &ANF2GetInfo_); - createParam(ANF2ReconfigString, asynParamInt32, &ANF2Reconfig_); + //createParam(ANF2ReconfigString, asynParamInt32, &ANF2Reconfig_); numModules_ = numModules; axesPerModule_ = axesPerModule; @@ -247,10 +247,12 @@ asynStatus ANF2Controller::writeInt32(asynUser *pasynUser, epicsInt32 value) pAxis->getInfo(); } + /* } else if (function == ANF2Reconfig_) { // reconfig regardless of the value pAxis->reconfig(value); + */ } else { // Call base class method status = asynMotorController::writeInt32(pasynUser, value); @@ -338,10 +340,9 @@ ANF2Axis::ANF2Axis(ANF2Controller *pC, int axisNo, epicsInt32 config, epicsInt32 //printf("ANF2Axis::ANF2Axis : pasynUserForceRead_->reason=%d\n", pasynUserForceRead_->reason); /* TODO: - * test config bits and set status bits to prevent methods from sending commands that would generate errors * reduce the sleeps to see which ones are necessary * print out useful info for asyn traces - * make reconfig useful + * make reconfig useful? */ epicsThreadSleep(0.1); @@ -520,6 +521,9 @@ void ANF2Axis::getInfo() } } +/* +// reconfig was used during development. It won't be generally useful without effort. +// It isn't obvious that this is a feature that should exist on-the-fly void ANF2Axis::reconfig(epicsInt32 value) { asynStatus status; @@ -555,7 +559,7 @@ void ANF2Axis::reconfig(epicsInt32 value) epicsThreadSleep(0.05); getInfo(); } - +*/ /** Reports on status of the axis * \param[in] fp The file pointer on which report information will be written diff --git a/motorApp/AMCISrc/ANF2Driver.h b/motorApp/AMCISrc/ANF2Driver.h index d7bf39d4..6cc241bb 100644 --- a/motorApp/AMCISrc/ANF2Driver.h +++ b/motorApp/AMCISrc/ANF2Driver.h @@ -50,12 +50,12 @@ K. Goetze 2014-03-24 #define CONFIG_REG_4 4 // No. of controller-specific parameters -#define NUM_ANF2_PARAMS 3 +#define NUM_ANF2_PARAMS 2 /** drvInfo strings for extra parameters that the ACR controller supports */ #define ANF2ResetErrorsString "ANF2_RESET_ERRORS" #define ANF2GetInfoString "ANF2_GET_INFO" -#define ANF2ReconfigString "ANF2_RECONFIG" +//#define ANF2ReconfigString "ANF2_RECONFIG" class ANF2Axis : public asynMotorAxis { @@ -79,7 +79,7 @@ private: asynStatus resetErrors(); void getInfo(); epicsInt32 inputReg_[10]; - void reconfig(epicsInt32 value); + //void reconfig(epicsInt32 value); void zeroRegisters(epicsInt32 *reg); asynUser *pasynUserForceRead_; int axisNo_; @@ -134,8 +134,7 @@ public: protected: int ANF2ResetErrors_; /** Reset Errors parameter index */ int ANF2GetInfo_; /**< Get Info parameter index */ - int ANF2Reconfig_; /**< Reconfig parameter index */ - + //int ANF2Reconfig_; /**< Reconfig parameter index */ private: asynStatus writeReg16(int, int, int, double); diff --git a/motorApp/Db/ANF2Aux.template b/motorApp/Db/ANF2Aux.template index aeaeace6..93a255d7 100644 --- a/motorApp/Db/ANF2Aux.template +++ b/motorApp/Db/ANF2Aux.template @@ -18,10 +18,11 @@ record(bo,"$(P)$(R)GetInfo") { field(OUT,"@asyn($(PORT),$(ADDR))ANF2_GET_INFO") } -record(longout,"$(P)$(R)Reconfig") { - field(DESC,"Reconfig") - field(PINI, "0") - field(VAL,"0") - field(DTYP, "asynInt32") - field(OUT,"@asyn($(PORT),$(ADDR))ANF2_RECONFIG") -} +# Reconfig isn't yet implemented in a generally-useful way +#record(longout,"$(P)$(R)Reconfig") { +# field(DESC,"Reconfig") +# field(PINI, "0") +# field(VAL,"0") +# field(DTYP, "asynInt32") +# field(OUT,"@asyn($(PORT),$(ADDR))ANF2_RECONFIG") +#}