yan zhang
/
NB_CLOCK_180505
clock
Diff: main.cpp
- Revision:
- 3:b8766d623f01
- Parent:
- 2:e54d9d87c6cb
--- a/main.cpp Mon May 14 00:04:42 2018 +0000 +++ b/main.cpp Tue May 22 09:10:05 2018 +0000 @@ -7,52 +7,51 @@ *******************************/ int main() { - tm *tim; - - string strx,stry, strz; - int n,f; + //tm *tim; + //string strx,stry, strz; + //int n,f; - f401Act::init(); //映射平台初始化 + //f401Act::init(); //映射平台初始化 maiAct::init_scorp(); //增强硬件初始化 - f401Act::put_rwdg(); //Refresh iwdg + //f401Act::put_rwdg(); //Refresh iwdg maiAct::init_dat(); //data initialization maiAct::init_star(); //start initialization - while(1){ - if(know::polSta[46]=="1"){ //state of tick2S - time_t seconds=time(NULL); - tim=localtime(&seconds); + while(1){ + if(know::polSta[46]=='1'){ //state of tick2S + //time_t seconds=time(NULL); + //tim=localtime(&seconds); - strx=know::task[0]; - stry=strx.substr(13,12); //提取时间,从索引13开始12个字符 + //strx=know::task[0]; + //stry=strx.substr(13,12); //提取时间,从索引13开始12个字符 //strz="yymmddhh"+to_string(tim->tm_min)+"ss"; - if(stry == strz){ //bc95动作 - know::polDat[1]= tim->tm_hour; - know::polDat[2]= tim->tm_min; - know::polDat[3]= tim->tm_sec; + //if(stry == strz){ //bc95动作 + //know::polDat[1]= tim->tm_hour; + //know::polDat[2]= tim->tm_min; + //know::polDat[3]= tim->tm_sec; bc95Act:: put(); - } - if(know::polSta[16]=="1"&& know::polSta[15]=="0") bc95Act::get_knw(); // puts, getknwS - if(know::polSta[15]=="1"&& know::polSta[18]=="0") bc95Act::setrtc(); // setrtcS私有 - if(know::polSta[18]=="1"&& know::polSta[0]=="0") knowAct::buildtsk(); // buildtskS + //} + if(know::polSta[16]=='1'&& know::polSta[15]=='0') bc95Act::get_knw(); // puts, getknwS + if(know::polSta[15]=='1'&& know::polSta[18]=='0') bc95Act::setrtc(); // setrtcS私有 + if(know::polSta[18]=='1'&& know::polSta[0]=='0') knowAct::buildtsk(); // buildtskS - n=0; - f=1; - while(f==1){ - n++; - strx=know::task[n]; - stry= strx.substr(13,12); //提取时间,从索引13开始12个字符 + //n=0; + //f=1; + //while(f==1){ + //n++; + //strx=know::task[n]; + //stry= strx.substr(13,12); //提取时间,从索引13开始12个字符 //strz= "yymmdd"+ to_string (tim->tm_hour)+to_string (tim->tm_min)+"ss"; - if(stry == strz){ - stry= strx. substr(12,2); //提取语音编号 + //if(stry == strz){ + //stry= strx. substr(12,2); //提取语音编号 //播放 - f=0; - } - } + //f=0; + //} + //} } //f401Act::sys_sleepy(); //cpu sleep } @@ -90,7 +89,7 @@ set_time(1514806505);//自1970年1月1日0时0分0秒到2018年1月1日11时35分05秒 f401Act::ready(); - //cloDAct::ready(); + cloDAct::ready(); cloSAct::ready(); }