diff --git a/Makefile b/Makefile index 4679100..193898d 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,10 @@ BUILDCLASSES=Linux EPICS_VERSIONS=7.0.7 ARCH_FILTER=RHEL% -TEMPLATES += epluse.db -TEMPLATES += epluse.proto +REQUIRED+=asyn +REQUIRED+=stream + +TEMPLATES += db/epluse.db +TEMPLATES += db/epluse.proto SCRIPTS += epluse.cmd diff --git a/db/epluse.db b/db/epluse.db index 11f8bd2..48fc690 100644 --- a/db/epluse.db +++ b/db/epluse.db @@ -2,7 +2,7 @@ record(bo, "$(PREFIX):FETCH") { field(DTYP, "stream") field(DESC, "Initialization parameters") - field(OUT,"@epluse_rht.proto fetch_rht($(PREFIX)) $(PORT) 0") + field(OUT,"@$(PROTO) fetch_rht($(PREFIX)) $(PORT) 0") field(SCAN,"1 second") } diff --git a/db/epluse.proto b/db/epluse.proto index 30401d9..f08e278 100644 --- a/db/epluse.proto +++ b/db/epluse.proto @@ -21,6 +21,6 @@ fetch_rht { # 2 ieee_754 floats. # Read exactly one char, but drop it. crc8 # The device sometimes adds an extra 0x00 at the end...weird - $ this is handled with ?c command - in 0xca 0x8b 0x67 0x0A 0x06 0x00 "%(\$1:TEMP)#R%(\$1:RELHUM)#R%*c%?c"; + # this is handled with ?c command + in 0xca 0x8b 0x67 0x0A 0x06 0x00 "%(\$1:TEMP)#R%(\$1:RELHUM)#R%*c%*?1c"; } diff --git a/epluse.cmd b/epluse.cmd index 7a4aef9..7783872 100644 --- a/epluse.cmd +++ b/epluse.cmd @@ -9,4 +9,4 @@ epicsEnvSet("PROTO", "$(epluse_DB)epluse.proto") drvAsynIPPortConfigure("$(INSTR)-sps", "$(MOXA_ADDR)",0,0,0) -dbLoadRecords("$(epluse_DB)epluse.db", "PREFIX=SQ:$(INSTR), PORT=$(INSTR)-sps") +dbLoadRecords("$(epluse_DB)epluse.db", "PREFIX=SQ:$(INSTR), PROTO=$(PROTO), PORT=$(INSTR)-sps")