/********************************************************************
*********/
while(1)
{
mic_1=AI(8);
if(mic_1>750)
{
break;
}
}
//SetMotor(0x1111,100,100,0,0);
SetMotor(0x1111,(int)(100*gf_1),(int)(100*gf_1),0,0);
wait(0.300000);
while(1)
{/*四号房*****************************/
/************************************************************/
while(1)
{
ma_7=AI(6);
if(ma_7<gi_8)
{
gi_2=AI(9);
gi_4=AI(11);
if((gi_2<gi_10)||(gi_4<gi_10))
{
//SetMotor(0x1111,90,10,0,0);
SetMotor(0x1111,(int)(90*gf_1),(int)(10*gf_1),0,0);/*有火时进四号房
*************/
wait(0.100000);
//SetMotor(0x1111,80,80,0,0);
SetMotor(0x1111,(int)(80*gf_1),(int)(80*gf_1),0,0);/*有火时进四号房
*************/
wait(0.050000);
while(1)
{
ma_7=AI(6);
gi_2=AI(9);
if((ma_7<gi_8)&&(gi_2<300))/*四号灭火*/
{
StopMotor(0x1111);
//SetMotor(0x1111,100,-100,0,0);
评论4
最新资源