Compare commits
3 Commits
stream_2_6
...
stream_2_6
Author | SHA1 | Date | |
---|---|---|---|
cc5948ad0b | |||
be1943a66d | |||
d9acb47afe |
14
makefile
14
makefile
@ -1,12 +1,10 @@
|
||||
include /ioc/tools/driver.makefile
|
||||
EXCLUDE_VERSIONS = 3.13.2
|
||||
PROJECT=stream2
|
||||
PROJECT=stream
|
||||
BUILDCLASSES += Linux
|
||||
|
||||
#DOCUDIR = doc
|
||||
|
||||
DBDS = stream.dbd
|
||||
|
||||
BUSSES += AsynDriver
|
||||
BUSSES += Dummy
|
||||
|
||||
@ -42,9 +40,9 @@ HEADERS += StreamBuffer.h
|
||||
HEADERS += StreamError.h
|
||||
|
||||
ifeq (${EPICS_BASETYPE},3.13)
|
||||
USR_INCLUDES += -include $(INSTALL_INCLUDE)/compat3_13.h
|
||||
endif
|
||||
ifeq (${EPICS_BASETYPE},3.14)
|
||||
# old gcc needs full path for -include
|
||||
CXXFLAGS += -include $(foreach d,${INCLUDES:-I%=%},$(wildcard $d/compat3_13.h))
|
||||
else
|
||||
RECORDTYPES += calcout
|
||||
endif
|
||||
|
||||
@ -54,5 +52,7 @@ streamReferences:
|
||||
perl ../src/makeref.pl Interface $(BUSSES) > $@
|
||||
perl ../src/makeref.pl Converter $(FORMATS) >> $@
|
||||
|
||||
stream.dbd:
|
||||
# have to hack a bit to work with both versions of driver.makefile
|
||||
DBDFILES = O.$${EPICSVERSION}_$${T_A}/streamSup.dbd
|
||||
../O.${EPICSVERSION}_${T_A}/streamSup.dbd:
|
||||
perl ../src/makedbd.pl $(RECORDTYPES) > $@
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "devStream.h"
|
||||
#include <aiRecord.h>
|
||||
#include <menuConvert.h>
|
||||
#include <epicsExport.h>
|
||||
|
||||
static long readData (dbCommon *record, format_t *format)
|
||||
@ -45,6 +46,11 @@ static long readData (dbCommon *record, format_t *format)
|
||||
{
|
||||
long rval;
|
||||
if (streamScanf (record, format, &rval)) return ERROR;
|
||||
if (ai->linr == menuConvertNO_CONVERSION)
|
||||
{
|
||||
ai->val = (double) rval;
|
||||
return DO_NOT_CONVERT;
|
||||
}
|
||||
ai->rval = rval;
|
||||
return OK;
|
||||
}
|
||||
@ -67,6 +73,10 @@ static long writeData (dbCommon *record, format_t *format)
|
||||
}
|
||||
case DBF_LONG:
|
||||
{
|
||||
if (ai->linr == menuConvertNO_CONVERSION)
|
||||
{
|
||||
return streamPrintf (record, format, (long) ai->val);
|
||||
}
|
||||
return streamPrintf (record, format, (long) ai->rval);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user