御姬之翼攻略:请问这段程序是什么意思?

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/27 20:25:45
void Display() _task_ Monitor{
unsigned char data TempSec;
unsigned char WantShow[4];
IP |=0x01;
while(initOk==0);
while(1){
dog=dog | 0x2;
if(BeepFun==1 && AlmMum>0){
BeepSec=60;
}else{
if(BeepSec>2) BeepSec=0;
}
if(beepCount==0){
//告警声音控制
if(((usysparam.gjppara.DeviceState[3]-0x30) & 1)==1){
if(BeepSec>0){
//控制声音
if((State9000 & 0x20)==0x20){
LedSelect=State9000=State9000 & 0xdf;
}else{
LedSelect=State9000=State9000 | 0x20;
}

BeepSec--;
}
if(BeepSec==0){
//关闭声音
BeepSec=0;
LedSelect=State9000=State9000 | 0x20;
}
}else{
//关闭声音
LedSelect=State9000=State9000 | 0x20;
}
beepCount=10;
}else{
beepCount--;
}
if(TempSec!=g8563_Store[0]){
TempSec=g8563_Store[0];
if(RestoreParam>0) RestoreParam--;
if(SecLed==1){
SecLed=0;
}else{
SecLed=1;
}
SetTimeToStr();
if(StartInfrared>0){
StartInfrared--;
if(StartInfrared==0 && infraredEn==1) AlmarmLed=0;//布防灯亮AlmarmLed
}
}
if(AlmShowCount>0)AlmShowCount--;
if(AlmMum>0|| mydoor[0].AlmType){
if(AlmShowCount==0 || AlmShowCount>20){
if(AlmShowCount==0){
AlmShowCount=200;
NowShowIndex=(NowShowIndex+1)%5;
}
if((NowShowIndex<4 && myswitch[NowShowIndex].AlmType==1) || (NowShowIndex==4 && mydoor[0].AlmType>0)){
if(NowShowIndex<4){
WantShow[0]=0x77;//a
WantShow[1]=0x3f;//0
WantShow[2]=0x3f;//0
WantShow[3]=LedNumber[NowShowIndex+1];
ShowTime(1,WantShow);
}else{
if(NowShowIndex==4){
if(mydoor[0].AlmType==1){
WantShow[0]=0x5e;//d
WantShow[1]=0x5c;//o
WantShow[2]=0x5c;//o
WantShow[3]=0x70;//r
}else{
WantShow[0]=0x31;//t
WantShow[1]=0x3f;//o
WantShow[2]=0x3e;//u
WantShow[3]=0x31;//t
}
ShowTime(1,WantShow);
}
}
}
}else{
WantShow[0]=0;
WantShow[1]=0;
WantShow[2]=0;
WantShow[3]=0;
ShowTime(1,WantShow);
}
}else{
ShowTime(0,"\0");
}
if(DogSec==nowSec|| dog==7){
if(dog==7){
dog=0;
//喂狗
WDT_CONSTR=0x37;
}else{
dog=0;
}
DogSec=(nowSec+3)%59;
}

}
}
它主要完成一个什么样的功能呢?各位大虾能否给我说得尽量详细一下呢?

主要是音频控制 开关音频