Subversion Repositories f9daq

Compare Revisions

No changes between revisions

Regard whitespace Rev 164 → Rev 165

/HVtest/HVtest.c
3,7 → 3,7
#include "HVtest_ui.h"
 
#define HVSLOT 3
#define NTICSMAX 120
#define NTICSMAX 240
 
static int p1h, pID, rID; //, tfID;
 
35,6 → 35,7
int HVBid_rID[4]={P1_HVBid_1,P1_HVBid_2,P1_HVBid_3,P1_HVBid_4};
char HVBfname[4][200];
FILE *HVBfp[4]={NULL,NULL,NULL,NULL};
FILE *LIDfp=NULL;
 
HSNMP crate1;
 
56,8 → 57,14
if ((p1h = LoadPanel (0, "HVtest_ui.uir", P1)) < 0) return -1;
DisplayPanel (p1h);
SetCtrlVal (p1h, P1_TESTon, 0);
LIDfp=fopen("lastids.txt","r");
for (i=0;i<4;i++) {
fscanf(LIDfp,"%s",HVBid[i]);
SetCtrlVal(p1h,HVBid_rID[i],HVBid[i]);
}
fclose(LIDfp);
LIDfp=NULL;
 
//Initial state
mainonoff=getMainSwitch(crate1);
SetCtrlVal (p1h, P1_MSW, mainonoff);
154,7 → 161,18
SetCtrlVal (p1h, P1_HVvrise, HVvrise);
}
break;
case P1_HVBidinc:
if (!TESTon) {
for (i=0;i<4;i++) {
GetCtrlVal(p1h, HVBid_rID[i], HVBid[i]);
sscanf(HVBid[i],"%d",&iret);
iret+=4;
sprintf(HVBid[i],"%3.3d",iret);
SetCtrlVal(p1h, HVBid_rID[i], HVBid[i]);
}
}
break;
}
if (!mainonoff) continue;
switch (rID) {
case P1_HVonoffall:
188,17 → 206,23
if (TESTon) {
ntics=0;
ClearStripChart (p1h, P1_G1);
LIDfp=fopen("lastids.txt","w");
for (i=0;i<4;i++) {
GetCtrlVal(p1h, HVBid_rID[i], HVBid[i]);
sprintf(HVBfname[i],"HVB_%s.dat",HVBid[i]);
sprintf(HVBfname[i],"data/HVB_%s.dat",HVBid[i]);
fprintf(LIDfp,"%s\n",HVBid[i]);
HVBfp[i]=fopen(HVBfname[i],"w");
}
fclose(LIDfp);
LIDfp=NULL;
} else {
SetCtrlVal(p1h,P1_HVonoffall, 0);
QueueUserEvent (1001, p1h, P1_HVonoffall);
for (i=0;i<4;i++)
for (i=0;i<4;i++) {
fclose(HVBfp[i]);
HVBfp[i]=NULL;
}
}
break;
// case P1_VFA0:
// GetCtrlVal (p1h, P1_VFA0, &ret);
/HVtest/HVtest_ui.h
43,6 → 43,7
#define P1_HVBid_2 28 /* control type: string, callback function: (none) */
#define P1_HVBid_1 29 /* control type: string, callback function: (none) */
#define P1_TESTon 30 /* control type: textButton, callback function: (none) */
#define P1_HVBidinc 31 /* control type: command, callback function: (none) */
 
 
/* Control Arrays: */
/HVtest/HVtest_ui.uir
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream