Removed reconfig funcationlity (only useful for testing as written).

This commit is contained in:
kpetersn
2018-04-09 13:20:58 -05:00
parent 16141699d8
commit 9b6764b0e0
3 changed files with 20 additions and 16 deletions
+8 -4
View File
@@ -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
+4 -5
View File
@@ -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);
+8 -7
View File
@@ -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")
#}