#include "includes.h" ASSIST_DEF uiAssist; unsigned char assistResult; void uTimerStart(unsigned int *timerId, unsigned int dlyTime){ *timerId=getAppTick()+dlyTime/KEY_TIMER_TICK; } char uTimerExpired(unsigned int *timerId){ return ((getAppTick()>*timerId)?1:0); } void UiassistStart(unsigned char type){ uiAssist.type=type; uiAssist.machine=0; uiAssist.status=1; } void UiassistEnd(unsigned char type){ uiAssist.type=type; uiAssist.machine=0; uiAssist.status=0; assistResult=0; } unsigned char getAssistResult(void){ unsigned char ret=0; ret=assistResult; if(assistResult) assistResult=0; return ret; } bnd_group_t groups[5]; bnd_member_t bndmembers[5]; char SimpleInfoScan(unsigned char firstIn,unsigned char direction) { static char first=1; static unsigned char machine; static unsigned int timer; char buf[40];//30 char ret =0; short TatolNum; char i,len; if(firstIn && first){ sutPocStatus.handleIndex=0;//μ±?°ò3 machine=0; first=0; ret=0; } switch(machine){ case 0: sutPocStatus.ListUpdate=0; sutPocStatus.ListFillIndex=0; sutPocStatus.ListDetailValid=0; if(sutUIstatus.Status==UIS_MENU_GROUP_SEL){ TatolNum=broad_get_groupcount(); if(TatolNum>=0){ sutPocStatus.ListUpdate=1; sutPocStatus.ListCurOnlineNum=TatolNum; MSG_INFO(1,"GET tatol %d---",TatolNum); machine=2; }else{ MSG_INFO(1,"GET tatol failed---"); } }else{ TatolNum=broad_get_membercount(sutPocStatus.LocalGroup.ID); if(TatolNum>=0){ sutPocStatus.ListUpdate=1; sutPocStatus.ListCurOnlineNum=TatolNum; MSG_INFO(1,"GET tatol %d---",TatolNum); machine=2; }else{ MSG_INFO(1,"GET tatol failed---"); } } break; case 1: if(sutPocStatus.ListUpdate || uTimerExpired(&timer) ){ if(sutPocStatus.ListCurOnlineNum<=0){ sutPocStatus.ListFillIndex=0; MSG_INFO(1,"sutPocStatus.ListUpdate==%d,ListCurOnlineNum==%d\r\n",sutPocStatus.ListUpdate,sutPocStatus.ListCurOnlineNum); goto QUIT_FUNCTION; } machine=2; } break; case 2: if(firstIn!=1){ if(direction==1){ sutPocStatus.handleIndex ++; if(sutPocStatus.handleIndex>sutPocStatus.ListCurOnlineNum/5){ sutPocStatus.handleIndex=0; } if(sutPocStatus.ListCurOnlineNum%5==0){ if(sutPocStatus.handleIndex==sutPocStatus.ListCurOnlineNum/5)sutPocStatus.handleIndex=0; } } else { if(sutPocStatus.handleIndex>0)sutPocStatus.handleIndex--; else if(sutPocStatus.handleIndex==0){ if(sutPocStatus.ListCurOnlineNum%5==0)sutPocStatus.handleIndex=(sutPocStatus.ListCurOnlineNum/5)-1; else sutPocStatus.handleIndex=sutPocStatus.ListCurOnlineNum/5; MSG_INFO(1,"sutPocStatus.ListCurOnlineNum===%d,sutPocStatus.handleIndex==%d\r\n",sutPocStatus.ListCurOnlineNum,sutPocStatus.handleIndex); } } } /* ????2ù×÷?????¨ ?¤?á?μsutPocStatus.ExceptionReadNum */ if((sutPocStatus.handleIndex+1)*5 >sutPocStatus.ListCurOnlineNum){ //3?1y ê×ò3 +1 snprintf(buf, sizeof(buf), "over:%d",sutPocStatus.handleIndex); MSG_INFO(1, buf); if(sutPocStatus.ListCurOnlineNum%5==0)sutPocStatus.ExceptionReadNum=5; else sutPocStatus.ExceptionReadNum=sutPocStatus.ListCurOnlineNum%5; } else{ sutPocStatus.ExceptionReadNum=5; // } sutPocStatus.ListFillIndex=0; machine=3; break; case 3: sutPocStatus.ListGetOneFlag=0; if(sutUIstatus.Status==UIS_MENU_GROUP_SEL){ memset(groups,0,sizeof(bnd_group_t)*5); TatolNum=sutPocStatus.handleIndex*5; TatolNum = broad_get_grouplist(groups, 16, TatolNum, 5); MSG_INFO(1,"GET except %d---",TatolNum); if(TatolNum>=0){ sutPocStatus.ListDetailValid=1; sutPocStatus.ListFillIndex=TatolNum; for(i=0;i=0){ sutPocStatus.ListDetailValid=1; sutPocStatus.ListFillIndex=TatolNum; for(i=0;i