From c1bf640fd5ccc6704ce36f7dbe12cf2ac2b9665c Mon Sep 17 00:00:00 2001 From: jsullivan-anl Date: Tue, 16 Jan 2007 17:15:31 +0000 Subject: [PATCH] Accel/Decel Average parameters must be .5 or greater then Accel/Decle. Round up average calculation. --- motorApp/PC6KSrc/devPC6K.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/motorApp/PC6KSrc/devPC6K.cc b/motorApp/PC6KSrc/devPC6K.cc index 6d256e84..a5e7d9d8 100755 --- a/motorApp/PC6KSrc/devPC6K.cc +++ b/motorApp/PC6KSrc/devPC6K.cc @@ -2,9 +2,9 @@ FILENAME... devPC6K.cc USAGE... Motor record device level support for Parker Compumotor drivers -Version: $Revision: 1.2 $ +Version: $Revision: 1.3 $ Modified By: $Author: sullivan $ -Last Modified: $Date: 2006-08-31 15:42:30 $ +Last Modified: $Date: 2007-01-16 17:15:31 $ */ /* @@ -278,7 +278,7 @@ STATIC RTN_STATUS PC6K_build_trans(motor_cmnd command, double *parms, struct mot motor_call->type = PC6K_table[command]; // sprintf(buff, "%dAA%.*f", axis, maxdigits, cntrl_units/2); - sprintf(buff, "%dAA%d", axis, intval/2); + sprintf(buff, "%dAA%ld", axis, NINT(dval/2.0)); strcat(motor_call->message, buff); rtnval = motor_end_trans_com(mr, drvtabptr); rtnval = (RTN_STATUS) motor_start_trans_com(mr, PC6K_cards); @@ -292,7 +292,7 @@ STATIC RTN_STATUS PC6K_build_trans(motor_cmnd command, double *parms, struct mot motor_call->type = PC6K_table[command]; // sprintf(buff, "%dADA%.*f", axis, maxdigits, cntrl_units/2); - sprintf(buff, "%dADA%d", axis, intval/2); + sprintf(buff, "%dADA%ld", axis, NINT(dval/2.0)); break; case GO: