Removed connection object reference from data structure, can't use it.
r1035 | ffr | 2006-08-01 13:09:41 +1000 (Tue, 01 Aug 2006) | 2 lines
This commit is contained in:

committed by
Douglas Clowes

parent
7d8657e41e
commit
69b09fe0fd
@ -79,7 +79,6 @@ typedef struct __MoDriv {
|
|||||||
|
|
||||||
|
|
||||||
/* DMC-2280 specific fields */
|
/* DMC-2280 specific fields */
|
||||||
/*@observer@*//*@dependent@*/SConnection *pCon;
|
|
||||||
prs232 controller;
|
prs232 controller;
|
||||||
int errorCode;
|
int errorCode;
|
||||||
char units[256]; /**< physical units for axis */
|
char units[256]; /**< physical units for axis */
|
||||||
@ -91,6 +90,7 @@ typedef struct __MoDriv {
|
|||||||
float maxDecel; /**< physical units per second^2 */
|
float maxDecel; /**< physical units per second^2 */
|
||||||
char axisLabel;
|
char axisLabel;
|
||||||
char lastCmd[1024];
|
char lastCmd[1024];
|
||||||
|
char dmc2280Error[1024];
|
||||||
float home; /**< home position for axis, default=0 */
|
float home; /**< home position for axis, default=0 */
|
||||||
int motorHome; /**< motor home position in steps */
|
int motorHome; /**< motor home position in steps */
|
||||||
int noPowerSave; /**< Flag = 1 to leave motors on after a move */
|
int noPowerSave; /**< Flag = 1 to leave motors on after a move */
|
||||||
@ -227,7 +227,7 @@ static int DMC2280ReadChar(pDMC2280Driv self, /*@out@*/char *reply) {
|
|||||||
'?' for an invalid command or
|
'?' for an invalid command or
|
||||||
':' or space for a valid command */
|
':' or space for a valid command */
|
||||||
static int DMC2280Send(pDMC2280Driv self, char *command) {
|
static int DMC2280Send(pDMC2280Driv self, char *command) {
|
||||||
char cmdValid, pError[ERRLEN], reply[256];
|
char cmdValid, reply[256];
|
||||||
char *GetEMsg = "TC 1";
|
char *GetEMsg = "TC 1";
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
@ -263,8 +263,7 @@ static int DMC2280Send(pDMC2280Driv self, char *command) {
|
|||||||
}
|
}
|
||||||
if (FAILURE == DMC2280Receive(self, reply))
|
if (FAILURE == DMC2280Receive(self, reply))
|
||||||
return HWFault;
|
return HWFault;
|
||||||
snprintf(pError, ERRLEN, "DMC2280ERROR: Bad command '%s'", command);
|
strncpy(self->dmc2280Error, reply, CMDLEN);
|
||||||
SCWrite(self->pCon, reply, eError);
|
|
||||||
SICSLogWrite(reply, eError);
|
SICSLogWrite(reply, eError);
|
||||||
self->errorCode = BADCMD;
|
self->errorCode = BADCMD;
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
@ -581,7 +580,8 @@ static void DMC2280Error(void *pData, int *iCode, char *error, int errLen){
|
|||||||
strncpy(error,"Motor still busy",(size_t)errLen);
|
strncpy(error,"Motor still busy",(size_t)errLen);
|
||||||
break;
|
break;
|
||||||
case BADCMD:
|
case BADCMD:
|
||||||
snprintf(error, (size_t)errLen, "Bad command: '%s'", self->lastCmd);
|
snprintf(error, (size_t)errLen, "Bad command: '%s'\ndmcError: ", self->lastCmd);
|
||||||
|
strncat(error, self->dmc2280Error, (size_t)errLen);
|
||||||
break;
|
break;
|
||||||
case BADPAR:
|
case BADPAR:
|
||||||
strncpy(error,"Bad parameter",(size_t)errLen);
|
strncpy(error,"Bad parameter",(size_t)errLen);
|
||||||
@ -976,6 +976,7 @@ static void KillDMC2280(/*@only@*/void *pData){
|
|||||||
pNew->name = NULL;
|
pNew->name = NULL;
|
||||||
pNew->errorCode = 0;
|
pNew->errorCode = 0;
|
||||||
pNew->lastCmd[0] = '\0';
|
pNew->lastCmd[0] = '\0';
|
||||||
|
pNew->dmc2280Error[0] = '\0';
|
||||||
pNew->absEncHome = 0;
|
pNew->absEncHome = 0;
|
||||||
pNew->cntsPerX = 0;
|
pNew->cntsPerX = 0;
|
||||||
/* Get hostname and port from the list of named parameters */
|
/* Get hostname and port from the list of named parameters */
|
||||||
@ -1008,7 +1009,6 @@ static void KillDMC2280(/*@only@*/void *pData){
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
strcpy(pNew->name, motor);
|
strcpy(pNew->name, motor);
|
||||||
pNew->pCon = pCon;
|
|
||||||
pNew->home = 0.0;
|
pNew->home = 0.0;
|
||||||
pNew->fLower = 0.0;//(float)atof(argv[2]);
|
pNew->fLower = 0.0;//(float)atof(argv[2]);
|
||||||
pNew->fUpper = 100.0;//(float)atof(argv[3]);
|
pNew->fUpper = 100.0;//(float)atof(argv[3]);
|
||||||
|
Reference in New Issue
Block a user