📄 menu_1.cpp
字号:
dra_screen(0,1);
board(1,4,17,10,20,7);
disp_shadow_str(16,106,spara_c_hz[0],0);
disp_shadow_str(16,142,spara_c_hz[1],0);
bell(400,1);
sel_R=spara.sel_R;
if(sel_R>15) sel_R=15;
else if(sel_R<0) sel_R=0;
ivp[count].scan_v=spara.first_v;
for(i=0;i<=11;i++) inv[i]=0;
count=1;
ivp[count].scan_v=spara.first_v;
ivp[count].insist=insist_set[sel_R];
selinsist(sel_R);
ivp[count].current=0;
// dra_screen(0,1);
do{
outportb(0x220,0x40);
scanv=ivp[count].scan_v;
itoa_text(90,148,scanv,0,7);
for(t=1;t<=(spara.t_width*1000-500);t++)
{
if(kbhit()) break;
delay(1);
}
for(t=1;t<=7;t++){
delay(2);
inv[t]=ad_v();
}
for(t=1;t<=6;t++){
for(i=t+1;i<=7;i++){
if(inv[t]>inv[i]){ inv[t]=inv[i]; }
}
}
for(t=2;t<=6;t++){
ivp[count].current=ivp[count].current+inv[t];
}
ivp[count].current=ivp[count].current/5;
count=count+1;
ivp[count].scan_v=ivp[count-1].scan_v+spara.pulse;
da_v(ivp[count].scan_v);
for(t=1;t<=(spara.p_width);t++){
if(kbhit()) break; delay(1);}
for(t=1;t<=7;t++){
delay(2);
inv[t]=ad_v();
}
for(t=1;t<=6;t++){
for(i=t+1;i<=7;i++){
if(inv[t]>inv[i]){ inv[t]=inv[i]; }
}
}
for(t=2;t<=6;t++){
ivp[count].current=ivp[count].current+inv[t];
}
ivp[count].current=ivp[count].current/5;
ivp[count].scan_v=ivp[count].scan_v-spara.pulse+spara.slope;
da_v(ivp[count].scan_v);
selinsist(sel_R);
ivp[count].insist=insist_set[sel_R];
ivp[count-1].current=ivp[count-1].current-ivp[count].current;
ivp[count-1].current=(ivp[count-1].current)/ivp[count-1].insist*1E+5;
if(count>9){
temp[0]=ivp[count-1].current-ivp[count-2].current;
temp[1]=ivp[count-2].current-ivp[count-3].current;
if((temp[0]!=0)&&(temp[1]!=0))
if((fabs(temp[0]/temp[1])>sz_sys.SM)||(fabs(temp[1]/temp[0])>sz_sys.SM))
ivp[count-1].current=ivp[count-2].current;
}
drascreen(ivp[count-1].scan_v,ivp[count-1].current/cur_flag,0);
if(kbhit()){
key=bioskey(0);
switch(key){
case 283:
bell(400,0);
goto BRK_ZJ;
case 18688:
if(cur_flag>0.01){
cls_right_scrn();
dra_screen(0,1);
cur_flag=cur_flag/10;
for(i=0;i<count;i++)
drascreen(ivp[i].scan_v,ivp[i].current/cur_flag,0);
}
break;
case 20736:
if(cur_flag<1000000){
cls_right_scrn();
dra_screen(0,1);
cur_flag=cur_flag*10;
for(i=0;i<count;i++)
drascreen(ivp[i].scan_v,ivp[i].current/cur_flag,0);
}
break;
case 18432:
sel_R++;
if(sel_R>15) sel_R=15;
selinsist(sel_R);
break;
case 20480:
sel_R--;
if(sel_R<0) sel_R=0;
selinsist(sel_R);
break;
default:
button("PgUp:放大;PgDn:缩小;↑、↓:换档;ESC:返回! ",0,0,1,0);
break;
}
spara.sel_R=sel_R;
}
}while(ivp[count].scan_v <= spara.end_v);
bell(400,1);
BRK_ZJ: da_v(spara.brush_v);
return;
}
void mcrcfa()
{
int t,i,sel_R,scanv,key;
float inv[11],temp[2]={0,0};
int jg_time=0;
char *spara_c_hz[7]={
"系统正在工作",
"扫描电位",
"正在清洗",
"准备好后按任一键",
"正在通气",
"正在富集",
"溶液静止,请稍候",
};
cls_all_scrn();
dra_screen(0,1);
board(1,4,20,7,0,7);
disp_shadow_str(16,96,spara_c_hz[2],0);
bell(400,1);
outportb(0x220,0x18);
da_v(spara.brush_v);
if(watch(50,169,30,15,spara.brush_t)==283){
cls_all_scrn();
outportb(0x220,0x00);
bell(400,0);
return;
}
bell(400,1);
cls_left_scrn();
if(mc_flag==0){
board(1,4,20,7,0,7);
disp_shadow_str(16,96,spara_c_hz[5],0);
outportb(0x220,0x08);
da_v(spara.fuji_v);
if(watch(50,169,30,15,spara.fuji_t)==283){
cls_all_scrn();
outportb(0x220,0x00);
bell(400,0);
return;
}
bell(400,1);
cls_left_scrn();
}
outportb(0x220,0x00);
board(1,4,20,7,0,7);
disp_shadow_str(14,92,spara_c_hz[6],0);
for(i=0;i<spara.stat_t;i++){
if(kbhit()){
if(bioskey(0)==283){
cls_all_scrn();
bell(400,0);
return;
}
else break;
}
sleep(1);
}
sel_R=spara.sel_R;
if(sel_R>15) sel_R=15;
else if(sel_R<0) sel_R=0;
cls_left_scrn();
board(1,4,17,10,20,7);
disp_shadow_str(16,106,spara_c_hz[0],0);
disp_shadow_str(16,142,spara_c_hz[1],0);
bell(400,1);
count=1;
ivp[count].scan_v=spara.first_v;
for(i=0;i<=11;i++){inv[i]=0.;}
ivp[count].scan_v=spara.first_v;
ivp[count].insist=insist_set[sel_R];
selinsist(sel_R);
ivp[count].current=0;
da_v(spara.first_v);
if(spara.t_width==0) jg_time=500;
else jg_time=spara.t_width*1000;
// dra_screen(0,1);
do{
scanv=ivp[count].scan_v;
itoa_text(90,148,scanv,0,7);
for(t=1;t<=(jg_time-spara.p_width-30);t++)
{
if(kbhit()) break;
delay(1);
}
for(t=1;t<=7;t++){
delay(2);
inv[t]=ad_v();
}
for(t=1;t<=6;t++){
for(i=t+1;i<=7;i++){
if(inv[t]>inv[i]){ inv[t]=inv[i];}
}
}
for(t=2;t<=6;t++){
ivp[count].current+=inv[t];
}
ivp[count].current=ivp[count].current/5;
count++;
ivp[count].scan_v=ivp[count-1].scan_v+spara.pulse;
da_v(ivp[count].scan_v);
for(t=1;t<=(spara.p_width);t++){
if(kbhit()) break; delay(1);}
for(t=1;t<=7;t++){
delay(2);
inv[t]=ad_v();
}
for(t=1;t<=6;t++){
for(i=t+1;i<=7;i++){
if(inv[t]>inv[i]){inv[t]=inv[i];}
}
}
for(t=2;t<=6;t++){
ivp[count].current+=inv[t];
}
ivp[count].current=ivp[count].current/5;
ivp[count].scan_v=ivp[count].scan_v-spara.pulse+spara.slope;
da_v(ivp[count].scan_v);
sel_R=spara.sel_R;
selinsist(sel_R);
ivp[count].insist=insist_set[sel_R];
ivp[count-1].current=ivp[count-1].current-ivp[count].current;
ivp[count-1].current=(ivp[count-1].current)/ivp[count-1].insist*1E+6;
//printf("current:%f\n",ivp[count-1].current);
if(count>9){
temp[0]=ivp[count-1].current-ivp[count-2].current;
temp[1]=ivp[count-2].current-ivp[count-3].current;
if((temp[0]!=0)&&(temp[1]!=0))
if((fabs(temp[0]/temp[1])>sz_sys.SM)||(fabs(temp[1]/temp[0])>sz_sys.SM))
ivp[count-1].current=ivp[count-2].current;
}
drascreen(ivp[count-1].scan_v,ivp[count-1].current/cur_flag,0);
if(kbhit()){
key=bioskey(0);
switch(key){
case 283:
bell(400,0);
goto BRK_MC;
case 18688:
if(cur_flag>0.01){
cls_right_scrn();
dra_screen(0,1);
cur_flag=cur_flag/10;
for(i=0;i<count;i++)
drascreen(ivp[i].scan_v,ivp[i].current/cur_flag,0);
}
break;
case 20736:
if(cur_flag<1000000){
cls_right_scrn();
dra_screen(0,1);
cur_flag=cur_flag*10;
for(i=0;i<count;i++)
drascreen(ivp[i].scan_v,ivp[i].current/cur_flag,0);
}
break;
case 18432:
sel_R++;
if(sel_R>15) sel_R=15;
selinsist(sel_R);
break;
case 20480:
sel_R--;
if(sel_R<0) sel_R=0;
selinsist(sel_R);
break;
default:
button("PgUp:放大;PgDn:缩小;↑、↓:换档;ESC:返回! ",0,0,1,0);
break;
}
spara.sel_R=sel_R;
}
}while(ivp[count].scan_v <= spara.end_v);
bell(400,1);
BRK_MC: da_v(spara.brush_v);
for(i=0;i<6;i++){
smooth();
smooth1();
}
cls_all_scrn();
maxfind1();
board(1,4,16,7,0,7);
if(sz_sys.IE==1) drascr(rate_flag,1,0);
diffrance();
maxfind();
if(sz_sys.QD==1){
board(1,4,16,7,0,7);
diffdrascr();
diffcalpeak();
}
return;
}
void yjrcfa()
{
int t,i,sel_R,scanv,key;
int jg_time=0;
float inv[11],temp[2]={0,0};
char *spara_c_hz[7]={
"系统正在工作",
"扫描电位",
"正在清洗",
"准备好后按任一键",
"正在通气",
"正在富集",
"溶液静止,请稍候",
};
cls_all_scrn();
board(1,4,20,7,0,7);
dra_screen(0,0);
disp_shadow_str(16,96,spara_c_hz[2],0);
bell(400,1);
outportb(0x220,0x18);
da_v(spara.brush_v);
if(watch(50,169,30,15,spara.brush_t)==283){
cls_all_scrn();
outportb(0x220,0x00);
bell(400,0);
return;
}
bell(400,1);
cls_left_scrn();
if(mc_flag==0){
board(1,4,20,7,0,7);
disp_shadow_str(16,96,spara_c_hz[5],0);
outportb(0x220,0x08);
da_v(spara.fuji_v);
if(watch(50,169,30,15,spara.fuji_t)==283){
cls_all_scrn();
outportb(0x220,0x00);
bell(400,0);
return;
}
bell(400,1);
cls_left_scrn();
}
outportb(0x220,0x00);
board(1,4,20,7,0,7);
disp_shadow_str(16,92,spara_c_hz[6],0);
for(i=0;i<spara.stat_t;i++){
if(kbhit()){
if(bioskey(0)==283){
cls_all_scrn();
bell(400,0);
return;
}
else break;
}
sleep(1);
}
sel_R=spara.sel_R;
if(sel_R>15) sel_R=15;
else if(sel_R<0) sel_R=0;
cls_left_scrn();
board(1,4,17,10,20,7);
disp_shadow_str(16,106,spara_c_hz[0],0);
disp_shadow_str(16,142,spara_c_hz[1],0);
bell(400,1);
count=1;
ivp[count].scan_v=spara.first_v;
for(i=0;i<=11;i++){inv[i]=0.;}
ivp[count].scan_v=spara.first_v;
ivp[count].insist=insist_set[sel_R];
selinsist(sel_R);
ivp[count].current=0;
if(spara.t_width==0) jg_time=500;
else jg_time=spara.t_width*1000;
// dra_screen(0,0);
do{
scanv=ivp[count].scan_v;
itoa_text(90,148,scanv,0,7);
for(t=1;t<=(jg_time-spara.p_width-30);t++)
{
if(kbhit()) break;
delay(1);
}
for(t=1;t<=7;t++){
delay(2);
inv[t]=ad_v();
}
for(t=1;t<=6;t++){
for(i=t+1;i<=7;i++){
if(inv[t]>inv[i]){inv[t]=inv[i];}
}
}
for(t=2;t<=6;t++){
ivp[count].current=ivp[count].current+inv[t];
}
ivp[count].current=ivp[count].current/5;
count=count+1;
ivp[count].scan_v=ivp[count-1].scan_v+spara.pulse;
da_v(ivp[count].scan_v);
for(t=1;t<=(spara.p_width);t++){
if(kbhit()) break;
delay(1);
}
for(t=1;t<=7;t++){
delay(2);
inv[t]=ad_v();
}
for(t=1;t<=6;t++){
for(i=t+1;i<=7;i++){
if(inv[t]>inv[i]){inv[t]=inv[i];}
}
}
for(t=2;t<=6;t++){
ivp[count].current=ivp[count].current+inv[t];
}
ivp[count].current=ivp[count].current/5;
ivp[count].scan_v=ivp[count].scan_v-spara.pulse-spara.slope;
da_v(ivp[count].scan_v);
sel_R=spara.sel_R;
selinsist(sel_R);
ivp[count].insist=insist_set[sel_R];
ivp[count-1].current=ivp[count-1].current-ivp[count].current;
ivp[count-1].current=(ivp[count-1].current)/ivp[count-1].insist*1E+6;
if(count>9){
temp[0]=ivp[count-1].current-ivp[count-2].current;
temp[1]=ivp[count-2].current-ivp[count-3].current;
if((temp[0]!=0)&&(temp[1]!=0))
if((fabs(temp[0]/temp[1])>sz_sys.SM)||(fabs(temp[1]/temp[0])>sz_sys.SM))
ivp[count-1].current=ivp[count-2].current;
}
yjdrascreen(ivp[count-1].scan_v,ivp[count-1].current/cur_flag,0);
if(kbhit()){
key=bioskey(0);
switch(key){
case 283:
bell(400,0);
goto BRK_YJ;
case 18688:
if(cur_flag>0.01){
cls_right_scrn();
dra_screen(0,0);
cur_flag=cur_flag/10;
for(i=0;i<count;i++)
yjdrascreen(ivp[i].scan_v,ivp[i].current/cur_flag,0);
}
break;
case 20736:
if(cur_flag<1000000){
cls_right_scrn();
dra_screen(0,0);
cur_flag=cur_flag*10;
for(i=0;i<count;i++)
yjdrascreen(ivp[i].scan_v,ivp[i].current/cur_flag,0);
}
break;
case 18432:
sel_R++;
if(sel_R>15) sel_R=15;
selinsist(sel_R);
break;
case 20480:
sel_R--;
if(sel_R<0) sel_R=0;
selinsist(sel_R);
break;
default:
button("PgUp:放大;PgDn:缩小;↑、↓:换档;ESC:返回! ",0,0,1,0);
break;
}
spara.sel_R=sel_R;
}
}while(ivp[count].scan_v >= spara.end_v);
bell(400,1);
BRK_YJ: da_v(spara.brush_v);
for(i=0;i<6;i++){
smooth();
smooth1();
}
cls_all_scrn();
maxfind1();
board(1,4,16,7,0,7);
if(sz_sys.IE==1) drascr(rate_flag,0,0);
diffrance();
maxfind();
if(sz_sys.QD==1){
board(1,4,16,7,0,7);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -