From 29ff1cf709eb986eed1976f2b7ba57bf41fa8db7 Mon Sep 17 00:00:00 2001 From: Ron Sluiter Date: Mon, 14 May 2001 20:13:48 +0000 Subject: [PATCH] Merged with V4.3 --- motorApp/SoftMotorSrc/Makefile.Vx | 2 ++ motorApp/SoftMotorSrc/devSoft.c | 16 ++++++++++++++-- motorApp/SoftMotorSrc/devSoft.h | 8 ++++++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/motorApp/SoftMotorSrc/Makefile.Vx b/motorApp/SoftMotorSrc/Makefile.Vx index 3dd78b0f..3c929f4f 100644 --- a/motorApp/SoftMotorSrc/Makefile.Vx +++ b/motorApp/SoftMotorSrc/Makefile.Vx @@ -4,6 +4,8 @@ include $(TOP)/config/CONFIG_APP #---------------------------------------- # ADD MACRO DEFINITIONS AFTER THIS LINE +#USR_CFLAGS += -DDMR_SOFTMOTOR_MODS + # The following is required for the Soft Channel (i.e., MotorSoft) device driver. SRCS.c += ../devSoft.c ../devSoftAux.c diff --git a/motorApp/SoftMotorSrc/devSoft.c b/motorApp/SoftMotorSrc/devSoft.c index ea670f00..f98f29d2 100644 --- a/motorApp/SoftMotorSrc/devSoft.c +++ b/motorApp/SoftMotorSrc/devSoft.c @@ -2,9 +2,9 @@ FILENAME... devSoft.c USAGE... Motor record device level support for Soft channel. -Version: $Revision: 1.2 $ +Version: $Revision: 1.3 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2000-03-03 22:35:49 $ +Last Modified: $Date: 2001-05-14 20:13:47 $ */ /* @@ -75,6 +75,14 @@ STATIC long update(struct motorRecord *mr) { struct soft_private *ptr = (struct soft_private *) mr->dpvt; +#ifdef DMR_SOFTMOTOR_MODS + if (ptr->load_position) + { + mr->rmp = ptr->new_position; + mr->rep = ptr->new_position; + ptr->load_position = FALSE; + } +#endif mr->msta = ptr->dinp_value ? RA_DONE : 0; return(ptr->callback_flag); } @@ -121,6 +129,10 @@ STATIC long build(motor_cmnd command, double *parms, struct motorRecord *mr) { struct soft_private *ptr = (struct soft_private *) mr->dpvt; +#ifdef DMR_SOFTMOTOR_MODS + ptr->load_position = TRUE; + ptr->new_position = *parms; +#endif mr->msta = RA_DONE; callbackRequest(&ptr->callback); } diff --git a/motorApp/SoftMotorSrc/devSoft.h b/motorApp/SoftMotorSrc/devSoft.h index 08c7b37c..809b5884 100644 --- a/motorApp/SoftMotorSrc/devSoft.h +++ b/motorApp/SoftMotorSrc/devSoft.h @@ -4,9 +4,9 @@ FILENAME.. devSoft.h USAGE... This file contains information that is common to all Soft channel device support modules. -Version: $Revision: 1.2 $ +Version: $Revision: 1.3 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2000-03-03 22:36:52 $ +Last Modified: $Date: 2001-05-14 20:13:48 $ */ /* @@ -45,6 +45,10 @@ struct soft_private { CALLBACK callback; long callback_flag; +#ifdef DMR_SOFTMOTOR_MODS + BOOLEAN load_position; + long new_position; +#endif short dinp_value; /* Value from DINP link. */ BOOLEAN default_done_behavior; /* If the DINP is not programmed, exhibit * "immediate done" default behavior. */