3,7 → 3,7 |
#include "HVtest_ui.h" |
|
#define HVSLOT 3 |
#define NTICSMAX 240 |
#define NTICSMAX 120 |
|
static int p1h, pID, rID; //, tfID; |
|
35,8 → 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; |
|
if (InitCVIRTE (hInstance, 0, 0) == 0) |
57,13 → 56,7 |
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); |
161,17 → 154,6 |
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) { |
206,22 → 188,16 |
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],"data/HVB_%s.dat",HVBid[i]); |
fprintf(LIDfp,"%s\n",HVBid[i]); |
sprintf(HVBfname[i],"HVB_%s.dat",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: |