forked from epics_driver_modules/motorBase
Merged with V4.3
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user