Set motorAxisPowerOn indicator to force status update when Enable does not work. Remove unused MAX/MIN macros

This commit is contained in:
sluiter
2016-08-23 11:03:37 -05:00
parent 316760fbe9
commit 7a494e5cff
2 changed files with 4 additions and 6 deletions
+2 -3
View File
@@ -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));
+2 -3
View File
@@ -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));