This commit is contained in:
cvs
2003-03-12 13:41:03 +00:00
parent 0dea907a42
commit 9f03f7cdd7
2 changed files with 20 additions and 26 deletions

View File

@@ -170,6 +170,7 @@ static char
alarmChannels[N_SENSORS],
alarmHistory[N_SENSORS],
dev[80],
dev2[80],
devHelp[10000],
controlChannel[4]="A";
@@ -490,19 +491,25 @@ int InstalCurve(SensorT *sensor, char *dev) {
return -1;
}
int ReadTable(void) {
char nbuf[256];
if (table!=NULL && tim>tableTime+60) { FREE(table); table=NULL; }; /* clear old table */
if (table!=NULL) return 0;
str_copy(nbuf, binDir);
str_append(nbuf, TABLE_FILE);
ERR_P(table=str_read_file(nbuf));
tableTime=tim;
return 1;
OnError: return -1;
}
int PrepInput(char *label) {
char *t, *e;
char nam[16], chans[8], nbuf[256], typ;
char nam[16], chans[8], typ;
int i, j, l;
SensorT *s;
if (table!=NULL && tim>tableTime+60) { FREE(table); table=NULL; }; /* clear old table */
if (table==NULL) { /* read table */
str_copy(nbuf, binDir);
str_append(nbuf, TABLE_FILE);
ERR_P(table=str_read_file(nbuf));
tableTime=tim;
}
ERR_I(ReadTable());
t=strstr(table, label);
if (t==NULL) ERR_MSG("device not found");
e=strchr(t, '\'');
@@ -2086,17 +2093,11 @@ EndStatus:
int DevHelpHdl(int mode, void *base, int fd) {
char *t, *n, *d, *en, *ed;
char line[80], nbuf[256];
int l;
int l, iret;
static int doit=1;
if (table!=NULL && tim>tableTime+60) { FREE(table); table=NULL; }; /* clear old table */
if (table==NULL) { /* read table */
str_copy(nbuf, binDir);
str_append(nbuf, TABLE_FILE);
ERR_P(table=str_read_file(nbuf));
tableTime=tim;
doit=1;
}
ERR_I(iret=ReadTable());
if (iret) doit=1;
if (doit) {
doit=0;
t=table;
@@ -2338,6 +2339,7 @@ int main(int argc, char *argv[]) {
CocDefStr(pid, RD); CocHdl(PidSumHdl);
CocDefStr(config, RD);
CocDefStr(dev, RD);
CocDefStr(dev2, RD);
CocDefStr(devHelp, RD); CocHdl(DevHelpHdl);
CocDefInt(cod1, RD);

View File

@@ -208,15 +208,7 @@
print *
print *,'Ta,Tb,Tc,Td values of channels A,B,C,D'
print *
print *,'Temperature devices:'
print *
print *,'ill1, ill2, ill3 (as cryostat), ill3f (as cryofurnace),'
1 ,'ill4 (focus-cryo), ill5 (maxi), ori3'
print *,'cti1, cti2, cti3, cti4, cti5 (maxi), cti6 (focus), apd'
print *,'ccr4k (4K closed cycle), hef4c (TriCS 4circle cryo)'
print *,'fs (small furnace), ft (tantalum furnace)'
print *,'sup4t (supra.magnet 4T), ma09 (9T)'
print *,'rdr11, rdr12 (LTF dilution 1 & 2, 20kOhm)'
print *,'devhelp list available temperature devices'
print *
elseif (cmd .eq. 'log') then
if (line(1:l) .eq. ' ') then