From 137f5d2df177428be8ee824160e54688c06e97bf Mon Sep 17 00:00:00 2001 From: cvs Date: Tue, 9 Mar 2004 15:17:56 +0000 Subject: [PATCH] improved tecs driver M.Z. SKIPPED: psi/makefile psi/psi.c psi/tecsdriv.c psi/tecsdriv.h psi/hardsup/makefile psi/tecs/coc_client.c psi/tecs/coc_util.c psi/tecs/coc_util.h psi/tecs/didi psi/tecs/instr_hosts.c psi/tecs/make_gen psi/tecs/makefile psi/tecs/makefile_linux psi/tecs/myc_time.h psi/tecs/six.c psi/tecs/tecs.c psi/tecs/tecs_cli.c psi/tecs/tecs_client.f psi/tecs/tecs_data.c psi/tecs/tecs_plot.f psi/tecs/tecs_serial.c psi/tecs/term.c psi/utils/makefile --- dummy/makefile | 4 ++-- evcontroller.c | 12 ++++++------ linux_def | 2 +- make_forward | 10 ++++------ make_gen | 7 +++++-- make_gen_dummy | 4 ++-- makefile | 2 -- makefile_linux | 2 +- maketree | 1 + matrix/makefile | 2 -- matrix/makefile_linux | 2 +- 11 files changed, 23 insertions(+), 25 deletions(-) diff --git a/dummy/makefile b/dummy/makefile index 20314656..d8b9ffcb 100644 --- a/dummy/makefile +++ b/dummy/makefile @@ -1,6 +1,6 @@ # this makefile delegates to a version specific makefile -# where this subdirectory is (relative to the sics root) -S_DOWN=dummy +# where root is +S_UP=.. include ../make_forward diff --git a/evcontroller.c b/evcontroller.c index d427365a..fe740129 100644 --- a/evcontroller.c +++ b/evcontroller.c @@ -244,7 +244,7 @@ } now = time(NULL); - tmo = (int)(ObVal(self->pParam, MAXWAIT) * 60); + tmo = (int)(ObVal(self->pParam, MAXWAIT)); /* based on this: logic ! */ if (tmo>0 && now > self->start+tmo ) /* time out */ { @@ -261,14 +261,14 @@ iCount++; return HWBusy; } - tmo = (int)(ObVal(self->pParam, SETTLE) * 60); + tmo = (int)(ObVal(self->pParam, SETTLE)); if (self->lastt <= 0) /* lastt negative: -seconds already waited */ { self->lastt += now; if (tmo>0) { - sprintf(pBueffel,"%s inside tolerance, wait %.2f min. to settle", - self->pName, (self->lastt + tmo - now)/60.0); + sprintf(pBueffel,"%s inside tolerance, wait %.2f sec. to settle", + self->pName, (self->lastt + tmo - now)*1.0); SCWrite(pCon,pBueffel,eStatus); } return HWBusy; @@ -973,10 +973,10 @@ static void ErrReport(pEVControl self) snprintf(pBueffel,255,"%s.%s = %g",self->pName, "SafeValue", ObVal(self->pParam,SAFEVALUE)); SCWrite(pCon,pBueffel, eValue); - snprintf(pBueffel,255,"%s.%s = %g",self->pName, "MaxWait", + snprintf(pBueffel,255,"%s.%s = %g (sec)",self->pName, "MaxWait", ObVal(self->pParam,MAXWAIT)); SCWrite(pCon,pBueffel, eValue); - snprintf(pBueffel,255,"%s.%s = %g",self->pName, "Settle", + snprintf(pBueffel,255,"%s.%s = %g (sec)",self->pName, "Settle", ObVal(self->pParam,SETTLE)); SCWrite(pCon,pBueffel, eValue); EVCGetPos(self,pCon,&fPos); diff --git a/linux_def b/linux_def index aec0e737..0429456f 100644 --- a/linux_def +++ b/linux_def @@ -9,4 +9,4 @@ MFLAGS=-f $(SRC)makefile_linux$(DUMMY) SRC=$(SRC) -HDFROOT=$(HOME) +HDFROOT=/afs/psi.ch/project/sinq/linux diff --git a/make_forward b/make_forward index a41ad7d0..4853490b 100644 --- a/make_forward +++ b/make_forward @@ -1,18 +1,17 @@ # This file is included by the makefile. # It forwards the execution to a version specific makefile. -# S_DOWN, S_UP and SICS_VERSION must be defined +# S_UP and SICS_VERSION must be defined # M. Zolliker 08.2003 VERS_UNDEFINED= VERS_UNDEFINED$(SICS_VERSION)=version_undefined SICS_ROOT=$(PWD)/$(S_UP) -OBJROOT=$(SICS_ROOT)/obj/$(SICS_VERSION) -MD=cd $(OBJROOT)/$(S_DOWN); \ +MD=cd $(SICS_VERSION); \ make -f $(SRC)makefile_$(SICS_VERSION) SRC=$(SRC) #define TREE only when version defined -TREE$(VERS_UNDEFINED)=$(OBJROOT)/tree +TREE$(VERS_UNDEFINED)=$(SICS_ROOT)/obj/$(SICS_VERSION)/tree # overwrite MD when SICS_VERSION undefined MD$(SICS_VERSION)=@ true @@ -53,8 +52,7 @@ $(TREE): @ echo --- End object tree --- cleanall: - $(MD:makfil=makefile_alpha) clean - $(MD:makfil=makefile_alpha_dummy) clean + $(MD) clean version_undefined: @ echo "" diff --git a/make_gen b/make_gen index f732f744..23c82091 100644 --- a/make_gen +++ b/make_gen @@ -42,8 +42,8 @@ VELOOBJ = velo.o velosim.o all: SICServer -full: matrix/libmatrix.a psi/hardsup/libhlib.a psi/tecs/libtecsl.a \ - psi/libpsi.a SICServer +# use this target when some of the libraries SUBLIBS might be incomplete +full: purge SICServer SICServer: $(SOBJ) $(MOTOROBJ) $(COUNTEROBJ) \ $(VELOOBJ) $(DIFIL) $(EXTRA) \ @@ -64,6 +64,9 @@ psi/tecs/libtecsl.a: psi/libpsi.a: cd psi; make $(MFLAGS) libpsi.a +purge: + rm -f SICServer $(SUBLIBS) + clean: rm -f *.o SICServer cd psi/hardsup; make $(MFLAGS) clean diff --git a/make_gen_dummy b/make_gen_dummy index f8dfaf2e..7af54a64 100644 --- a/make_gen_dummy +++ b/make_gen_dummy @@ -31,8 +31,8 @@ SOBJ = network.o ifile.o conman.o SCinter.o splitter.o passwd.o \ hmcontrol.o userscan.o rs232controller.o lomax.o \ fourlib.o motreg.o motreglist.o anticollider.o \ s_rnge.o sig_die.o gpibcontroller.o $(NIOBJ) \ - hmdata.o nxscript.o \ - tclintimpl.o sicsdata.o + hmdata.o nxscript.o nxupdate.o wwildcard.o \ + tclintimpl.o sicsdata.o help.o tcldrivable.o MOTOROBJ = motor.o simdriv.o COUNTEROBJ = countdriv.o simcter.o counter.o diff --git a/makefile b/makefile index bdf941cb..11342d79 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,5 @@ # this makefile delegates to a version specific makefile -# where this subdirectory is (relative to root) -S_DOWN=. # where root is S_UP=. diff --git a/makefile_linux b/makefile_linux index 10ab0ce9..1a64f442 100644 --- a/makefile_linux +++ b/makefile_linux @@ -27,7 +27,7 @@ EXTRA=nintf.o SUBLIBS = psi/libpsi.a psi/hardsup/libhlib.a matrix/libmatrix.a \ psi/tecs/libtecsl.a LIBS = -static -L$(HDFROOT)/lib $(SUBLIBS) $(NILIB)\ - -ltcl8.4 $(HDFROOT)/lib/libhdf5.a \ + -ltcl8.3 $(HDFROOT)/lib/libhdf5.a \ $(HDFROOT)/lib/libmfhdf.a $(HDFROOT)/lib/libdf.a \ $(HDFROOT)/lib/libjpeg.a -ldl -lz -lm -lc diff --git a/maketree b/maketree index 3f5f640e..914d4b13 100755 --- a/maketree +++ b/maketree @@ -30,6 +30,7 @@ else rm -f $o/src echo ln -s $SICS_ROOT/$1 $o/src ln -s $SICS_ROOT/$1 $o/src + ln -s $o $SICS_ROOT/$1/$SICS_VERSION rm -f $o/cd_obj echo "cd $SICS_ROOT/$1" > $o/cd_obj endif diff --git a/matrix/makefile b/matrix/makefile index 44bdaed0..1d73dcd7 100644 --- a/matrix/makefile +++ b/matrix/makefile @@ -1,7 +1,5 @@ # this makefile delegates to a version specific makefile -# where this subdirectory is (relative to the sics root) -S_DOWN=matrix # where root is (from here) S_UP=.. diff --git a/matrix/makefile_linux b/matrix/makefile_linux index 2be8fbda..a349e678 100644 --- a/matrix/makefile_linux +++ b/matrix/makefile_linux @@ -6,7 +6,7 @@ # Markus Zolliker, March 2003 #-------------------------------------------------------------------------- -include ../linux_def +include ../$(SRC)linux_def CC = gcc CFLAGS = -g $(DFORTIFY)