📄 loop3.cpp
字号:
{
vehic[i-1].Axle_type=6;
vehic[i-2].Axle_type=6;
vehic[i].Axle_type=6;
}
else
{
vehic[i].Axle_type=4;
vehic[i-1].Axle_type=4;
};
}
else
{
vehic[i].Axle_type=2;
};
};
};
//计算轴组值-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
int help_num=0;
int help_Anum=0;
do
{
switch(vehic[help_num].Axle_type)
{
case 1: AxleGr[help_Anum].Atype=1;
AxleGr[help_Anum].Aweigh=vehic[help_num].Axle_weigh;
help_num++;
help_Anum++;
break;
case 2: AxleGr[help_Anum].Atype=2;
AxleGr[help_Anum].Aweigh=vehic[help_num].Axle_weigh;
help_num++;
help_Anum++;
break;
case 4: AxleGr[help_Anum].Atype=4;
AxleGr[help_Anum].Aweigh=vehic[help_num].Axle_weigh+vehic[help_num+1].Axle_weigh;
help_num=help_num+2;
help_Anum++;
break;
case 6:AxleGr[help_Anum].Atype=6;
AxleGr[help_Anum].Aweigh=vehic[help_num].Axle_weigh + vehic[help_num+1].Axle_weigh + vehic[help_num+2].Axle_weigh;
help_num=help_num+3;
help_Anum++;
break;
};
}while(help_num<Axle_num);
AxleGr_num=help_Anum;
//last call the display for the axles
allweight->Caption;
alllimit->Caption="";
allover->Caption="";
Label35->Visible=false;
EA1->Text="";
EC1->Text="";
EL1->Text="";
EA2->Text="";
EC2->Text="";
EL2->Text="";
EA3->Text="";
EC3->Text="";
EL3->Text="";
EA4->Text="";
EC4->Text="";
EL4->Text="";
EA5->Text="";
EC5->Text="";
EL5->Text="";
EA6->Text="";
EC6->Text="";
EL6->Text="";
//for Form7
Form7->allweight->Caption;
Form7->EA17->Text="";
// Form7->EC17->Text="";
Form7->EL17->Text="";
Form7->EA27->Text="";
// Form7->EC27->Text="";
Form7->EL27->Text="";
Form7->EA37->Text="";
// Form7->EC37->Text="";
Form7->EL37->Text="";
Form7->EA47->Text="";
// Form7->EC47->Text="";
Form7->EL47->Text="";
Form7->EA57->Text="";
// Form7->EC57->Text="";
Form7->EL57->Text="";
Form7->EA67->Text="";
// Form7->EC67->Text="";
Form7->EL67->Text="";
Form7->EL77->Text="";
Form7->EA77->Text="";
// Form7->EC77->Text="";
Form7->EL87->Text="";
Form7->EA87->Text="";
// Form7->EC87->Text="";
Form7->ET17->Text="";
Form7->ET27->Text="";
Form7->ET37->Text="";
Form7->ET47->Text="";
Form7->ET57->Text="";
Form7->ET67->Text="";
Form7->ET77->Text="";
Form7->ET87->Text="";
Label16->Caption="";
int cyc,csc;
csc=total_weigh/100;
cyc=total_weigh%100;
if(cyc>=50)
csc++;
senddata[3]=csc%10+0x30;
csc=csc/10;
senddata[2]=csc%10+0x30;
csc=csc/10;
senddata[1]=csc%10+0x30;
csc=csc/10;
senddata[0]=csc%10+0x30;
csc=csc/10;
senddata[4]=0xff;
if(dpy==1)
{
sendweigh(senddata);
}
int f, fl;
fl=total_weigh/1000;
f=(total_weigh%1000)/100;
if(((total_weigh%100)/10)>=5)
f++;
if(f==10)
{
fl++;
f=0;
}
if(f==0)
allweight->Caption=IntToStr(total_weigh);
//IntToStr(fl);
else
allweight->Caption=IntToStr(total_weigh);
//IntToStr(fl)+"."+IntToStr(f);
Form7->allweight->Caption=allweight->Caption;
int tempo;
AnsiString spic=app_path+"/link/pic/C";
for(int i=0;i<AxleGr_num;i++)
{
switch(AxleGr[i].Atype)
{
case 1:spic+=1;
switch(i)
{
case 0:
Form7->ET17->Text="单轴";
break;
case 1:
Form7->ET27->Text="单轴";
break;
case 2:
Form7->ET37->Text="单轴";
break;
case 3:
Form7->ET47->Text="单轴";
break;
case 4:
Form7->ET57->Text="单轴";
break;
case 5:
Form7->ET67->Text="单轴";
break;
case 6:
Form7->ET77->Text="单轴";
break;
case 7:
Form7->ET87->Text="单轴";
break;
}
break;
case 2:spic+=1;
switch(i)
{
case 0:
Form7->ET17->Text="单轴";
break;
case 1:
Form7->ET27->Text="单轴";
break;
case 2:
Form7->ET37->Text="单轴";
break;
case 3:
Form7->ET47->Text="单轴";
break;
case 4:
Form7->ET57->Text="单轴";
break;
case 5:
Form7->ET67->Text="单轴";
break;
case 6:
Form7->ET77->Text="单轴";
break;
case 7:
Form7->ET87->Text="单轴";
break;
}
break;
case 4:spic+=2;
switch(i)
{
case 0:
Form7->ET17->Text="双联轴";
Ax-=1;
break;
case 1:
Form7->ET27->Text="双联轴";
Ax-=1;
break;
case 2:
Form7->ET37->Text="双联轴";
Ax-=1;
break;
case 3:
Form7->ET47->Text="双联轴";
Ax-=1;
break;
case 4:
Form7->ET57->Text="双联轴";
Ax-=1;
break;
case 5:
Form7->ET67->Text="双联轴";
Ax-=1;
break;
case 6:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -