From 7a494e5cff1ca96fbd7f65cd7e487f66242cbad9 Mon Sep 17 00:00:00 2001 From: sluiter Date: Tue, 23 Aug 2016 11:03:37 -0500 Subject: [PATCH] Set motorAxisPowerOn indicator to force status update when Enable does not work. Remove unused MAX/MIN macros --- motorApp/AerotechSrc/drvA3200Asyn.cc | 5 ++--- motorApp/AerotechSrc/drvEnsembleAsyn.cc | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/motorApp/AerotechSrc/drvA3200Asyn.cc b/motorApp/AerotechSrc/drvA3200Asyn.cc index 2eb44e5f..ec8eff8b 100644 --- a/motorApp/AerotechSrc/drvA3200Asyn.cc +++ b/motorApp/AerotechSrc/drvA3200Asyn.cc @@ -191,9 +191,6 @@ static int numA3200Controllers; /* Pointer to array of controller structures */ static A3200Controller *pA3200Controller = NULL; -#define MAX(a, b) ((a)>(b) ? (a) : (b)) -#define MIN(a, b) ((a)<(b) ? (a) : (b)) - static void motorAxisReportAxis(AXIS_HDL pAxis, int level) { if (level > 0) @@ -447,6 +444,8 @@ static int motorAxisSetInteger(AXIS_HDL pAxis, motorAxisParam_t function, int va sprintf(outputBuff, "ENABLE %s", pAxis->axisName); } ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + /* Set indicator to force status update when Enable does not work. */ + motorParam->setInteger(pAxis->params, motorAxisPowerOn, value); /* Prevent Task #2 from blocking during LINEAR commands. */ ret_status = sendAndReceive(pAxis->pController, (char *) "WAIT MODE AUTO", inputBuff, sizeof(inputBuff)); diff --git a/motorApp/AerotechSrc/drvEnsembleAsyn.cc b/motorApp/AerotechSrc/drvEnsembleAsyn.cc index 565e25a2..2100fc3d 100644 --- a/motorApp/AerotechSrc/drvEnsembleAsyn.cc +++ b/motorApp/AerotechSrc/drvEnsembleAsyn.cc @@ -206,9 +206,6 @@ static int numEnsembleControllers; /* Pointer to array of controller structures */ static EnsembleController *pEnsembleController=NULL; -#define MAX(a,b) ((a)>(b)? (a): (b)) -#define MIN(a,b) ((a)<(b)? (a): (b)) - static void motorAxisReportAxis(AXIS_HDL pAxis, int level) { if (level > 0) @@ -436,6 +433,8 @@ static int motorAxisSetInteger(AXIS_HDL pAxis, motorAxisParam_t function, int va sprintf(outputBuff, "ENABLE @%d", pAxis->axis); } ret_status = sendAndReceive(pAxis->pController, outputBuff, inputBuff, sizeof(inputBuff)); + /* Set indicator to force status update when Enable does not work. */ + motorParam->setInteger(pAxis->params, motorAxisPowerOn, value); /* Prevent ASCII interpreter from blocking during MOVEABS/INC commands. */ ret_status = sendAndReceive(pAxis->pController, (char *) "WAIT MODE NOWAIT", inputBuff, sizeof(inputBuff));