renamed most source files
This commit is contained in:
30
tecs/tecs.c
30
tecs/tecs.c
@@ -1,14 +1,16 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <sys/timeb.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include "errhdl.h"
|
||||
#include "server.h"
|
||||
#include "logfile.h"
|
||||
#include "err_handling.h"
|
||||
#include "coc_server.h"
|
||||
#include "coc_logfile.h"
|
||||
#include "str_util.h"
|
||||
#include "lsc.h"
|
||||
#include "dlog.h"
|
||||
#include "tecs_lsc.h"
|
||||
#include "tecs_dlog.h"
|
||||
|
||||
#define TABLE_FILE "lsc.tab"
|
||||
#define NO_CODE 999
|
||||
@@ -146,7 +148,7 @@ int instCurve(char *nam, char *channel) {
|
||||
if (num>20) ERR_MSG("illegal standard curve number");
|
||||
|
||||
retstat=-1; /* an error could be fixed */
|
||||
ERR_P(LscCmd(ser, "CRVHDR?[num]>>head"));
|
||||
ERR_P(LscCmd(ser, "CRVHDR?[num]>head"));
|
||||
|
||||
} else {
|
||||
|
||||
@@ -189,7 +191,7 @@ int instCurve(char *nam, char *channel) {
|
||||
if (num<21 || num>60) ERR_MSG("illegal curve number");
|
||||
|
||||
retstat=-1; /* an error could be fixed */
|
||||
ERR_P(LscCmd(ser, "CRVHDR?[num]>>head"));
|
||||
ERR_P(LscCmd(ser, "CRVHDR?[num]>head"));
|
||||
|
||||
e=strchr(entry, '\n');
|
||||
if (e!=NULL) { *e='\0'; e++; }
|
||||
@@ -216,7 +218,7 @@ int instCurve(char *nam, char *channel) {
|
||||
|
||||
n=3;
|
||||
do {
|
||||
ERR_P(LscCmd(ser, "CRVDEL [num];CRVHDR?[num]>buf1"));
|
||||
ERR_P(LscCmd(ser, "CRVDEL [num];CRVHDR?[num]>buf1,"));
|
||||
buf1[4]='\0';
|
||||
i=strcmp(buf1, "User");
|
||||
n--;
|
||||
@@ -359,7 +361,7 @@ int loadCache() {
|
||||
bufi[2]=buf3;
|
||||
bufi[3]=buf4;
|
||||
for (i=60; i>21; i-=4) {
|
||||
sprintf(buf, "CRVHDR?%d>>buf1;CRVHDR?%d>>buf2;CRVHDR?%d>>buf3;CRVHDR?%d>>buf4", i, i-1, i-2, i-3);
|
||||
sprintf(buf, "CRVHDR?%d>buf1;CRVHDR?%d>buf2;CRVHDR?%d>buf3;CRVHDR?%d>buf4", i, i-1, i-2, i-3);
|
||||
ERR_P(LscCmd(ser, buf));
|
||||
k=0;
|
||||
for (j=i; j>i-4; j--) {
|
||||
@@ -422,7 +424,7 @@ int SetTemp(int switchOn) {
|
||||
str_copy(chan, ch);
|
||||
tempH=tempC+tShift;
|
||||
if (switchOn) {
|
||||
ERR_P(LscCmd(ser, "CSET 1:[chan],1;RANGE:5;SETP 1:[tempH]"));
|
||||
ERR_P(LscCmd(ser, "CSET 1:[chan],1,1,0;RANGE:[iRange];SETP 1:[tempH]"));
|
||||
} else {
|
||||
ERR_P(LscCmd(ser, "CSET 1:[chan],1;SETP 1:[tempH]"));
|
||||
}
|
||||
@@ -445,7 +447,7 @@ int ReadTemp() {
|
||||
|
||||
if (noResp) { /* check serial number */
|
||||
k=serialNo;
|
||||
ERR_P(LscCmd(ser, "*IDN?>buf1,buf2,serialNo"));
|
||||
ERR_P(LscCmd(ser, "*IDN?>buf1,buf2,serialNo,"));
|
||||
if (0!=strcmp(buf1, "LSCI") || 0!=strcmp(buf2, "MODEL340") || serialNo==0) return(0);
|
||||
if (k!=serialNo) {
|
||||
if (cryo.manual || cryo.code!=0) cryo.dirty=1;
|
||||
@@ -615,7 +617,11 @@ int Settings() {
|
||||
}
|
||||
}
|
||||
power=pw;
|
||||
ERR_P(LscCmd(ser, "CLIMIT 1:[tLimit],0,0,[iAmp],[iRange];CSET 1:[cryo.ch1],1,1,0")); /* some times .ch2? */
|
||||
logfileOut(LOG_MAIN, "power %f\n", power, iAmp, iRange);
|
||||
ERR_P(LscCmd(ser, "CLIMIT 1:[tLimit],0,0,[iAmp],[iRange]"));
|
||||
tempC=0.001; tShift=0;
|
||||
ERR_I(SetTemp(1));
|
||||
tempC=0;
|
||||
}
|
||||
if (samp.nSens>=cryo.nSens) {
|
||||
maxfld=2*samp.nSens;
|
||||
|
||||
Reference in New Issue
Block a user