From 1fb6a248f350eb133f5d5d512ce86c42706de562 Mon Sep 17 00:00:00 2001 From: MarkRivers Date: Tue, 1 Sep 2009 15:31:50 +0000 Subject: [PATCH] Change int to size_t and remove unused waitMotors function to avoid compiler warnings --- motorApp/NewportSrc/MM4005_trajectoryScan.st | 24 ++------------------ 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/motorApp/NewportSrc/MM4005_trajectoryScan.st b/motorApp/NewportSrc/MM4005_trajectoryScan.st index bfdd1395..bd1f0404 100755 --- a/motorApp/NewportSrc/MM4005_trajectoryScan.st +++ b/motorApp/NewportSrc/MM4005_trajectoryScan.st @@ -132,7 +132,6 @@ unsigned long startTime; %% static int writeRead(SS_ID ssId, struct UserVar *pVar, char *command); %% static int getMotorPositions(SS_ID ssId, struct UserVar *pVar, double *pos); %% static int getMotorMoving(SS_ID ssId, struct UserVar *pVar); -%% static int waitMotors(SS_ID ssId, struct UserVar *pVar); %% static int getEpicsMotorMoving(SS_ID ssId, struct UserVar *pVar); %% static int waitEpicsMotors(SS_ID ssId, struct UserVar *pVar); @@ -598,7 +597,7 @@ ss trajectoryAbort { static int writeOnly(SS_ID ssId, struct UserVar *pVar, char *command) { asynStatus status; - int nwrite; + size_t nwrite; char buffer[MAX_MM4000_STRING]; /* Copy command so we can add terminator */ @@ -614,7 +613,7 @@ static int writeOnly(SS_ID ssId, struct UserVar *pVar, char *command) static int writeRead(SS_ID ssId, struct UserVar *pVar, char *command) { asynStatus status; - int nwrite, nread; + size_t nwrite, nread; int eomReason; char buffer[MAX_MM4000_STRING]; @@ -692,25 +691,6 @@ static int getEpicsMotorMoving(SS_ID ssId, struct UserVar *pVar) } -/* waitMotors waits for all motors to stop moving. It reads and posts the - * motor positions during each loop. */ -static int waitMotors(SS_ID ssId, struct UserVar *pVar) -{ - int j; - - /* Logic is that we always want to post position motor positions - * after the end of move is detected. */ - while(getMotorMoving(ssId, pVar)) { - /* Get the current motor positions, post them */ - getMotorPositions(ssId, pVar, pVar->motorCurrent); - for (j=0; jnumAxes; j++) seq_pvPut(ssId, pVar->motorCurrentIndex[j], 0); - epicsThreadSleep(POLL_INTERVAL); - } - getMotorPositions(ssId, pVar, pVar->motorCurrent); - for (j=0; jnumAxes; j++) seq_pvPut(ssId, pVar->motorCurrentIndex[j], 0); - return(0); -} - /* waitEpicsMotors waits for all motors to stop moving using the EPICS motor * records.. It reads and posts the motor positions during each loop. */ static int waitEpicsMotors(SS_ID ssId, struct UserVar *pVar)