UI.c 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188
  1. #include "includes.h"
  2. char showPIP[40];
  3. char showGIP[40];
  4. signed char netshowvalue=-1;
  5. signed char tempnetshowvalue=-1;
  6. //unsigned char Nonloop=0; //第一次按菜单不压栈
  7. SUT_UI_STATUS sutUIstatus;
  8. UI_STACK UI_Stack;
  9. SUT_LIST_BOX sutListBox;
  10. SUT_PALACE sutPalace;
  11. static void UserAssistAdd(void);
  12. static void UI_Loop(void);
  13. PT_THREAD (ptUITask(struct pt *pt)){
  14. static timer_t ptTimer;
  15. PT_BEGIN(pt);
  16. while(1){
  17. if(uTimerExpired(&bootMapCnt))UI_Loop();
  18. UI_Key();
  19. PTTimerStart(&pt_timerPool, &ptTimer, 1);//1
  20. PT_WAIT_UNTIL(pt, PTTimerIsExpired(&ptTimer));
  21. }
  22. PT_END(pt);
  23. }
  24. /******************************************************
  25. UISetNextStatus
  26. 设置下一个UI状态
  27. *******************************************************/
  28. void UISetNextStatus(unsigned char status)
  29. {
  30. sutUIstatus.LastStatus=sutUIstatus.NextStatus;
  31. sutUIstatus.NextStatus=status;
  32. }
  33. void UI_Init(void)
  34. {
  35. memset(&sutUIstatus,0,sizeof(SUT_UI_STATUS));
  36. UISetNextStatus(UIS_STANDBY);
  37. }
  38. void ShowSingle(int CSQ);
  39. static void ShowGPSICon(void);
  40. static void ShowBatttery(int bat);
  41. static void ShowTime(char update);
  42. static void Show_Net(unsigned int s_netshowvalue);
  43. /************************************************************************
  44. ShowStatusBar
  45. 显示状态栏
  46. *************************************************************************/
  47. void ShowStatusBar(char Update,char change)
  48. {
  49. static char batFirstShow=0;
  50. static uint8_t siHNS;
  51. static int siCSQ;
  52. static int siVbat;
  53. unsigned short usGps;
  54. static unsigned short susGps;
  55. static STATUE lastPPPStatus;
  56. static signed char s_netshowvalue=-1;
  57. //static signed char danhu=-1;
  58. static signed char ItemShow=-1;
  59. static signed char LastSimSelect=-1;
  60. static signed char LastthisYunYingShang=-1;
  61. static signed char lastcharge=1;
  62. if(ItemShow==-1){
  63. GuiFillRect(0,0,159,STATUS_BAR_HEIGH-1,COLOR_DEFAULT_BLUE);
  64. GuiFillRect(0,STATUS_BAR_HEIGH,159,STATUS_ITEM_HEIGH-1,COLOR_WARN_RED);
  65. ItemShow=1;
  66. }
  67. if(LastthisYunYingShang!=thisYunYingShang && sutUIstatus.Status==UIS_STANDBY){
  68. GuiFillRect(0,STATUS_BAR_HEIGH,159,STATUS_ITEM_HEIGH-1,COLOR_WARN_RED);
  69. switch(thisYunYingShang){
  70. case CHINA_TELECOM:
  71. ShowCaption("中国电信",STATUS_BAR_HEIGH);
  72. break;
  73. case CHINA_MOBILE:
  74. ShowCaption("中国移动",STATUS_BAR_HEIGH);
  75. break;
  76. case CHINA_UNICOM:
  77. ShowCaption("中国联通",STATUS_BAR_HEIGH);
  78. break;
  79. case CHINA_NONE:
  80. ShowCaption("公网集群对讲系统",STATUS_BAR_HEIGH);
  81. break;
  82. }
  83. LastthisYunYingShang=thisYunYingShang;
  84. }
  85. //2G-4G显示
  86. if(s_netshowvalue!=netshowvalue){
  87. s_netshowvalue=netshowvalue;
  88. Show_Net(s_netshowvalue);
  89. }
  90. //卡在位
  91. if(sutPocStatus.CardStatus&&SIMSelect!=LastSimSelect){
  92. if(SIMSelect==0)GuiShowBmp(20,3,"SIM1.bmp");
  93. else GuiShowBmp(20,3,"SIM2.bmp");
  94. LastSimSelect=SIMSelect;
  95. }
  96. //信号显示
  97. if(siCSQ!=g_iCSQ || lastPPPStatus != netPPP){
  98. lastPPPStatus=netPPP;
  99. siCSQ=g_iCSQ;
  100. ShowSingle(g_iCSQ);
  101. }
  102. if(batFirstShow < 100)
  103. {//开机大概前1秒显示50%电量,之后根据实际显示
  104. g_iVbat=360;
  105. batFirstShow++;
  106. }
  107. //电量显示
  108. //if(lastcharge==1)return;
  109. if(siVbat!=g_iVbat || g_iVbat < WARN_PWR_LEVEL||lastcharge!=Chargeing){
  110. siVbat=g_iVbat;
  111. lastcharge=Chargeing;
  112. if(lastcharge==0) GuiShowBmp(106,1,"CHARGEBAT.bmp");//GuiShowBmp(106,1,"CHARGEBAT.bmp");
  113. else ShowBatttery(g_iVbat);
  114. }
  115. //消息显示
  116. //ShowMessageFlag(0);
  117. //GPS显示
  118. // usGps=((unsigned short)sutGpsInfo.isGpsWork<<8) | ((unsigned short)sutGpsInfo.isGpsValid) | ((unsigned short)sutGpsInfo.isGpsAuthOk<<2);
  119. //
  120. // if(susGps!=usGps ){
  121. // susGps =usGps;
  122. // ShowGPSICon();
  123. // }
  124. //
  125. //时间显示
  126. ShowTime(Update);
  127. if(g_uslockflag==1){
  128. GuiShowBmp(92,0,"lock.bmp");
  129. }
  130. }
  131. static void ShowCallUserName(u16 x,u16 y);
  132. static void ShowGroupAndUserName(u16 x,u16 y,int update);
  133. static void UIShowGroupSel(int update);
  134. static void UIShowUserSel(int update);
  135. static void ReFlashItem(void);
  136. static void UIShowMenuMain(int update);
  137. SUT_MENU sutMenuMain;
  138. int siCt1=-1;
  139. void UIShowMainInterface(char StatusUpdate)
  140. {
  141. int Flag;//主界面状态:0--未登录 1--无人说话 2--本机说话 3--对方说话
  142. static int siLastFlag=-1;//上一个Flag状态值
  143. static int siCt=0;
  144. char info[20];
  145. static unsigned char lastLoginResult=0xff;
  146. static signed char danhu=-1;
  147. char Ylseek=4;//Y轴偏移 8
  148. if(StatusUpdate){
  149. GuiClearAll();
  150. switch(thisYunYingShang){
  151. case CHINA_TELECOM:
  152. ShowCaption("中国电信",STATUS_BAR_HEIGH);
  153. break;
  154. case CHINA_MOBILE:
  155. ShowCaption("中国移动",STATUS_BAR_HEIGH);
  156. break;
  157. case CHINA_UNICOM:
  158. ShowCaption("中国联通",STATUS_BAR_HEIGH);
  159. break;
  160. case CHINA_NONE:
  161. ShowCaption("公网集群对讲系统",STATUS_BAR_HEIGH);
  162. break;
  163. }
  164. danhu=sutPocStatus.danHunStatus;
  165. if(danhu==0) GuiClearArea(100,110,30,14);//GuiClearRect(120,110,160,14);//136
  166. else GuiShowStr(100,110,"挂断",0x01,0);
  167. siLastFlag=-1;
  168. siCt=0;
  169. return;
  170. }
  171. if(danhu!=sutPocStatus.danHunStatus)
  172. {
  173. danhu=sutPocStatus.danHunStatus;
  174. if(danhu==0) GuiClearArea(100,110,30,14);//GuiClearRect(120,110,160,14);//136
  175. else GuiShowStr(100,110,"挂断",0x01,0);
  176. }
  177. if(Ui_LockFlag==1){
  178. ShowMessageBox("请先解锁!");
  179. uTimerHardDly(50);
  180. }
  181. //======以下持续调用,以便动态更新信息==========
  182. //----顶部显示状态栏-----------
  183. //-----登陆状态标志更新--------
  184. if(0==sutPocStatus.Logined){//未登录时,显示LOGO
  185. Flag=0;
  186. }else if(sutPocStatus.Speaker==0 && sutPocStatus.Mic==0){//对方未说话,本机未说话
  187. Flag=1;
  188. siCt1=0;
  189. }else if(sutPocStatus.Mic>0 ){//对方未说话,本机说话
  190. Flag=2;
  191. }else if(sutPocStatus.Speaker>0){//对方说话了
  192. Flag=3;
  193. }
  194. //-------中间图片显示-------
  195. switch(Flag){
  196. case 0://未登录
  197. if(Flag!=siLastFlag||Ui_LockFlag){
  198. GuiClearRect(0,STATUS_ITEM_HEIGH,LCD_WIDTH,44+64);
  199. GuiShowBmp(0,44,"logo.bmp");
  200. }
  201. break;
  202. case 1://已登录,但无人说话
  203. if(Flag!=siLastFlag||Ui_LockFlag){
  204. GuiClearRect(0,STATUS_ITEM_HEIGH,LCD_WIDTH-1,STATUS_ITEM_HEIGH+7);
  205. GuiClearRect(0,STATUS_ITEM_HEIGH+20+20+8,127,STATUS_ITEM_HEIGH+20+20+20+12);
  206. GuiShowBmp(0,STATUS_ITEM_HEIGH+20+20+8+8,"Phone.bmp");
  207. GuiShowStr(16,STATUS_ITEM_HEIGH+20+20+8+8,"空闲",0x10,0);
  208. sutPocStatus.statusChaned = 1;
  209. }
  210. break;
  211. case 2://已登录,本机说话
  212. if(Flag!=siLastFlag||Ui_LockFlag){
  213. GuiClearRect(0,STATUS_ITEM_HEIGH+20+20+8,LCD_WIDTH-1,STATUS_ITEM_HEIGH+20+20+8+20);
  214. }
  215. GuiShowBmp(0,STATUS_ITEM_HEIGH+20+20+8+8,"Csend.bmp");
  216. GuiShowStr(16,STATUS_ITEM_HEIGH+20+20+8+8,"本机在讲话",0x10,0);
  217. break;
  218. case 3://已登录,对方说话
  219. if(Flag!=siLastFlag||Ui_LockFlag)
  220. {
  221. GuiShowBmp(0,STATUS_ITEM_HEIGH+20+20+8+8,"Creceive.bmp");
  222. GuiClearRect(16,STATUS_ITEM_HEIGH+20+20+8+8,127,STATUS_ITEM_HEIGH+20+20+20+8+8);
  223. }
  224. //显示对方名字
  225. ShowCallUserName(16,STATUS_ITEM_HEIGH+20+20+8+8);
  226. break;
  227. }
  228. //------群组、用户显示--------
  229. if(Flag>0){//已登陆
  230. if((Flag!=siLastFlag&&(siLastFlag==0||siLastFlag==-1))||Ui_LockFlag)
  231. {
  232. ShowGroupAndUserName(0,STATUS_ITEM_HEIGH+8,1);//当前群组和用户名显示 18
  233. }else {
  234. ShowGroupAndUserName(0,STATUS_ITEM_HEIGH+8,0);//当前群组和用户名显示 18
  235. }
  236. }else{//未登陆
  237. memset(info, ' ',sizeof(info));
  238. memcpy(info, "正在登陆.", 9);
  239. if(0==siCt)
  240. {
  241. GuiShowStr(0,STATUS_ITEM_HEIGH,info,1,0);
  242. }
  243. else if(100==siCt)
  244. {
  245. info[9]='.';
  246. GuiShowStr(0,STATUS_ITEM_HEIGH,info,1,0);
  247. }
  248. else if(200==siCt)
  249. {
  250. info[9]='.';info[10]='.';
  251. GuiShowStr(0,STATUS_ITEM_HEIGH,info,1,0);
  252. }
  253. if(lastLoginResult != sutPocStatus.loginResult || siLastFlag==-1)
  254. {
  255. if(sutPocStatus.loginResult==1) snprintf(info, sizeof(info), "账号信息错误");
  256. else if(sutPocStatus.loginResult==2) snprintf(info, sizeof(info), "无网络连接 ");
  257. else if(sutPocStatus.loginResult==4) snprintf(info, sizeof(info), "请插卡 ");
  258. else if(sutPocStatus.loginResult==5&&lastLoginResult!=1) snprintf(info, sizeof(info), "无法连接");
  259. else if(sutPocStatus.loginResult==6) snprintf(info, sizeof(info), "没有服务");
  260. else {
  261. lastLoginResult=sutPocStatus.loginResult;
  262. goto NEXT_STEP;
  263. }
  264. lastLoginResult=sutPocStatus.loginResult;
  265. GuiShowStr(0,STATUS_ITEM_HEIGH+16,info,1,0);
  266. }
  267. }
  268. Ui_LockFlag=0;
  269. NEXT_STEP:
  270. //-------
  271. if(++siCt>=300)siCt=0;
  272. if(Flag!=siLastFlag){//状态变化 才更新 分页
  273. siLastFlag=Flag;
  274. siCt=0;
  275. }
  276. }
  277. /******************************************************
  278. UIShowMenuSysSetup
  279. 系统设置菜单
  280. *******************************************************/
  281. //SUT_MENU sutMenuSysSetup;
  282. void UIShowMenuSysSetup(int update)
  283. {
  284. static const char *apcMenuSysSetup[]={
  285. "1.LCD时长设置",
  286. "2.亮度调节",
  287. // "3.网络设置",
  288. // "4.提示音设置",
  289. "3.SIM选择",
  290. // "6.麦克风增益",
  291. "4.串口功能切换",
  292. "5.功耗模式设置",
  293. "6.服务器设置",
  294. "7.对讲版本升级",//此项放最后
  295. ""
  296. ////"6.场景模式",
  297. //"6.编码器设置",
  298. };
  299. static char *staticMenum[11];
  300. char i;
  301. char numb=0;
  302. while(*apcMenuSysSetup[numb++]);
  303. numb--;
  304. if(update){
  305. GuiClearAll();
  306. ShowCaption("系统设置",STATUS_BAR_HEIGH); //1
  307. if(hgs_poc_type != POC_OWN){
  308. for(i=0;i<4;i++) staticMenum[i]=(char *)apcMenuSysSetup[i];
  309. staticMenum[i]=(char *)apcMenuSysSetup[numb];
  310. MenuInit(&sutMenuSysSetup,staticMenum);
  311. }else MenuInit(&sutMenuSysSetup,apcMenuSysSetup);
  312. GuiShowStr(0,SUBSCRIPT_LOCATION,"<退出 确定 下翻>",0x01,0);
  313. GuiDrawHLine(0,127,110,1);
  314. return;
  315. }
  316. }
  317. /******************************************************
  318. UI_Loop
  319. UI循环调用,需要在MainTask的主循环中持续调用,及时处理状态发生变化时的UI显示
  320. 此处按下OK键显示里面内容
  321. *******************************************************/
  322. void UI_Loop(void)
  323. {
  324. char StatusUpdate=0;
  325. if(sutUIstatus.Status!=sutUIstatus.NextStatus||sutUIstatus.ItemRefresh){//状态发生变更
  326. sutUIstatus.LastStatus=sutUIstatus.Status;
  327. sutUIstatus.Status=sutUIstatus.NextStatus;
  328. StatusUpdate=1;
  329. }
  330. ShowStatusBar(1,StatusUpdate);//顶部状态栏
  331. switch(sutUIstatus.Status){
  332. case UIS_STANDBY:
  333. // Nonloop=1;
  334. Init_stack(&UI_Stack);//UI 返回栈
  335. UIShowMainInterface(StatusUpdate);
  336. break;
  337. case UIS_MENU_MAIN:
  338. UIShowMenuMain(StatusUpdate);
  339. break;
  340. case UIS_MENU_USER_SEL:
  341. UIShowUserSel(StatusUpdate);
  342. break;
  343. case UIS_MENU_GROUP_SEL:
  344. UIShowGroupSel(StatusUpdate);
  345. break;
  346. case UIS_MAIL_BOX:
  347. UIShowMailBox(StatusUpdate);
  348. break;
  349. case UIS_MENU_SYS_SET:
  350. UIShowMenuSysSetup(StatusUpdate);
  351. break;
  352. case UIS_MENU_INFO:
  353. UIShowInformation(StatusUpdate);
  354. break;
  355. case UIS_MESSAGE_OPTION:
  356. MessageOptionShow(StatusUpdate);
  357. break;
  358. case UIS_MESSAGE_READ:
  359. MessageReadShow(StatusUpdate);
  360. break;
  361. case UIS_CALL_TO_PHONE:
  362. CallToPhoneNum(StatusUpdate);
  363. break;
  364. case UIS_MESSAGE_DELE:
  365. MessageDeletShow(StatusUpdate);
  366. break;
  367. case UIS_MESSAGE_FORMAT:
  368. MessageFormatShow(StatusUpdate);
  369. break;
  370. case UIS_SET_APN:
  371. SetAPNShow(StatusUpdate);
  372. break;
  373. case UIS_APN_DETAIL:
  374. SetApnDetailShow(StatusUpdate);
  375. break;
  376. case UIS_SET_GPS:
  377. SetGPSShow(StatusUpdate);
  378. break;
  379. case UIS_SET_LCD:
  380. SetLCDShow(StatusUpdate);
  381. break;
  382. case UIS_SET_LCDBRIGHT:
  383. SetLcdBrightShow(StatusUpdate);
  384. break;
  385. ////////////////////////////
  386. case UIS_SET_NET:
  387. SetNetShow(StatusUpdate);
  388. break;
  389. ///////////////////////////
  390. case UIS_SET_SERVER_PASS:
  391. UIShowPOCSerPass(StatusUpdate);
  392. break;
  393. case UIS_SET_SERVER:
  394. UIShowPOCSer(StatusUpdate);
  395. break;
  396. case UIS_SET_CODETYPE:
  397. SetCodeTypeShow(StatusUpdate);
  398. break;
  399. case UIS_SET_KEYSound:
  400. SetKeySoundShow(StatusUpdate);
  401. break;
  402. case UIS_SET_SOUNDMODE:
  403. SetSoundModeShow(StatusUpdate);
  404. break;
  405. case UIS_SET_PWRMODE:
  406. SetPowerModeShow(StatusUpdate);
  407. break;
  408. case UIS_SET_POC_FOTA:
  409. SetUpIntercomVerShow(StatusUpdate);
  410. break;
  411. case UIS_SET_USBTTL:
  412. SetUSBorTTLShow(StatusUpdate);
  413. break;
  414. case UIS_SET_SIMCARD:
  415. SetCardShow(StatusUpdate);
  416. break;
  417. case UIS_SET_MICLV:
  418. SetMicLvSelectShow(StatusUpdate);
  419. break;
  420. case UIS_POWEROFF_WAIT:
  421. PoweroffWaitShow(StatusUpdate);
  422. break;
  423. }
  424. }
  425. SUT_MENU sutMenuMain;
  426. static void UserSelResponse();
  427. static void GroupSelResponse();
  428. void UI_Key()
  429. {
  430. int key;
  431. char buf[30];
  432. if(!isKeyPress()) return;
  433. if(g_ucTMMode!=0) return;
  434. switch(sutUIstatus.Status){
  435. case UIS_STANDBY://----待机界面---
  436. switch(g_ulKeyValue){
  437. case KEY_PANEL_MENU:
  438. if(g_uslockflag==1) return;
  439. UISetNextStatus(UIS_MENU_MAIN);
  440. break;
  441. case KEY_PANEL_DOWN:
  442. if(g_uslockflag==1)return;
  443. if(sutPocStatus.danHunStatus==1) {
  444. if(hgs_poc_type==POC_OWN)ModemSendAt("AT+POC=500000\r\n");
  445. else {
  446. snprintf(buf, sizeof(buf),"AT+POC=entergroup,%d\r\n",sutPocStatus.LocalGroup.ID);
  447. ModemSendAt(buf);
  448. }
  449. }
  450. break;
  451. }
  452. break;
  453. case UIS_MENU_MAIN://----主菜单----
  454. //sutMenuSysSetup
  455. key=RollMenuResponse(&sutMenuSysSetup);
  456. if(KEY_PANEL_MENU==g_ulKeyValue){
  457. switch(sutMenuSysSetup.handle){
  458. case 0://群组选择
  459. UISetNextStatus(UIS_MENU_GROUP_SEL);
  460. break;
  461. case 1://成员选择
  462. UISetNextStatus(UIS_MENU_USER_SEL);
  463. break;
  464. case 2:
  465. UISetNextStatus(UIS_SET_NET);
  466. break;
  467. case 3:
  468. UISetNextStatus(UIS_SET_KEYSound);
  469. break;
  470. case 4: //系统设置
  471. UISetNextStatus(UIS_MENU_SYS_SET);
  472. break;
  473. case 5://终端信息
  474. UISetNextStatus(UIS_MENU_INFO);
  475. break;
  476. }
  477. PushUiStack(&UI_Stack,sutMenuSysSetup.handle);//
  478. }
  479. else if(KEY_PANEL_OK==g_ulKeyValue){
  480. UISetNextStatus(UIS_STANDBY);
  481. }
  482. break;
  483. case UIS_MENU_GROUP_SEL://-----群组选择-----
  484. GroupSelResponse();
  485. break;
  486. case UIS_MENU_USER_SEL://-----成员选择-----
  487. UserSelResponse();
  488. break;
  489. case UIS_MAIL_BOX://-----短信查阅-----
  490. MessageResponse();
  491. break;
  492. case UIS_MENU_SYS_SET://-----系统设置-----
  493. SetSYSResponse(); //名字没取好,实际上是系统
  494. break;
  495. case UIS_MENU_INFO://-----终端信息-----
  496. if(KEY_PANEL_OK==g_ulKeyValue){
  497. UISetNextStatus(sutUIstatus.LastStatus);//UIS_STANDBY
  498. }
  499. //else if(KEY_PANEL_MENU==g_ulKeyValue)UISetNextStatus(UIS_MENU_MAIN);
  500. break;
  501. case UIS_MESSAGE_OPTION:
  502. MessageOptionResponse();
  503. break;
  504. case UIS_MESSAGE_READ:
  505. MessageReadResponse();
  506. break;
  507. case UIS_MESSAGE_FORMAT:
  508. MessageFormatResponse();
  509. break;
  510. case UIS_MESSAGE_DELE:
  511. MessageDeletResponse();
  512. break;
  513. case UIS_SET_APN: //-----系统设置-------
  514. SetAPNResponse();
  515. break;
  516. case UIS_APN_DETAIL:
  517. SetApnDetailResponse();
  518. break;
  519. case UIS_SET_GPS:
  520. SetGPSResponse();
  521. break;
  522. case UIS_SET_LCD:
  523. SetLCDResponse();
  524. break;
  525. case UIS_SET_LCDBRIGHT:
  526. SetLcdBrightResponse();
  527. break;
  528. ////////////////////////////////////
  529. case UIS_SET_NET:
  530. SetNetResponse();
  531. break;
  532. //////////////////////////////////
  533. case UIS_SET_SERVER_PASS:
  534. POCSetSerPassResponse();
  535. break;
  536. case UIS_SET_SERVER:
  537. POCSetSerResponse();
  538. break;
  539. case UIS_SET_CODETYPE:
  540. SetCodeTypeResponse();
  541. break;
  542. case UIS_SET_KEYSound:
  543. SetKeysoundResponse();
  544. break;
  545. case UIS_SET_SOUNDMODE:
  546. SetSoundModeResponse();
  547. break;
  548. case UIS_SET_PWRMODE:
  549. SetPowerModeResponse();
  550. break;
  551. case UIS_SET_POC_FOTA:
  552. SetUpIntercomVerResponse();
  553. //SetPocFotaResponse();
  554. break;
  555. case UIS_SET_USBTTL:
  556. SetUSBorTTLResponse();
  557. break;
  558. case UIS_SET_SIMCARD:
  559. SetCardResponse();
  560. break;
  561. case UIS_SET_MICLV:
  562. SetMicLvSelectResponse();
  563. break;
  564. case UIS_POWEROFF_WAIT:
  565. PoweroffWaitResponse();
  566. break;
  567. default:
  568. break;
  569. }
  570. }
  571. /***********************************
  572. 显示信号状态
  573. **********************************/
  574. void ShowSingle(int CSQ)
  575. {
  576. if(netPPP == OPEN) GuiShowBmp(0,0+2,"SingleOK.bmp");
  577. else GuiShowBmp(0,0+2,"Single.bmp");
  578. //11 3格
  579. if(CSQ<1 || CSQ==99){
  580. GuiClearRect(7,3,18,11);
  581. }else if(CSQ<8){
  582. GuiDrawVLine(9,10,7,2,COLOR_WHITE_BACK);
  583. GuiClearRect(9,3,18,11);
  584. }else if(CSQ<16){
  585. GuiDrawVLine(9,10,7,2,COLOR_WHITE_BACK);
  586. GuiDrawVLine(7,10,10,2,COLOR_WHITE_BACK);
  587. GuiClearRect(13,3,18,11);
  588. }else if(CSQ<22){
  589. GuiDrawVLine(9,10,7,2,COLOR_WHITE_BACK);
  590. GuiDrawVLine(7,10,10,2,COLOR_WHITE_BACK);
  591. GuiDrawVLine(5,10,13,2,COLOR_WHITE_BACK);
  592. GuiClearRect(16,3,18,11);
  593. }else{
  594. GuiDrawVLine(9,10,7,2,COLOR_WHITE_BACK);
  595. GuiDrawVLine(7,10,10,2,COLOR_WHITE_BACK);
  596. GuiDrawVLine(5,10,13,2,COLOR_WHITE_BACK);
  597. GuiDrawVLine(3,10,16,2,COLOR_WHITE_BACK);//COLOR_DEFAULT_BLUE
  598. }
  599. //2G-4G 显示
  600. //GuiShowBmp(28,5,"2g.bmp");
  601. }
  602. static void ShowGPSICon(void)
  603. {
  604. GuiClearRect(45,0,75,11);//30
  605. if(0== sutGpsInfo.isGpsWork) GuiClearRect(45,0,75,11);//未工作或未检测到
  606. else
  607. {
  608. //GPS已工作
  609. if(0 == sutGpsInfo.isGpsValid)
  610. {//未定位
  611. if(sutGpsInfo.isGpsAuthOk==0)//未鉴权
  612. {
  613. GuiShowBmp(45,0,"GPS1.bmp");
  614. }else//已鉴权
  615. {
  616. GuiShowBmp(45,0,"GPSA.bmp");//已鉴权
  617. }
  618. }else
  619. {//已定位
  620. if(sutGpsInfo.isGpsAuthOk==0)//未鉴权
  621. {
  622. GuiShowBmp(45,0,"GPS1.bmp");
  623. }else//已鉴权
  624. {
  625. GuiShowBmp(45,0,"GPSA.bmp");//已鉴权
  626. }
  627. GuiShowBmp(45+10,0,"GPS2.bmp");//定位辐射放最后//2
  628. }
  629. }
  630. }
  631. static void ShowBatttery(int bat)
  632. {
  633. static unsigned int flashCnt=0;
  634. static unsigned char flag=0;
  635. int x=106;
  636. if(bat<WARN_PWR_LEVEL){//请充电
  637. if(uTimerExpired(&flashCnt)==0) return;
  638. uTimerStart(&flashCnt, 80);
  639. if(flag==0)
  640. {
  641. GuiShowBmp(x,1,"VBAT1.bmp");
  642. flag=1;
  643. }else{
  644. flag=0;
  645. GuiClearRect(x,0,x+21,1+12);
  646. }
  647. //GuiDrawVLine(5,12,64+x,2,COLOR_WARN_RED);
  648. }
  649. else if(bat<355){//340<x<=355 1格
  650. GuiShowBmp(x,1,"VBAT1.bmp");//3
  651. GuiDrawVLine(3,8,x+16,3,COLOR_WHITE_BACK);
  652. }
  653. else if(bat<375){//355<x<=375 2格
  654. GuiShowBmp(x,1,"VBAT1.bmp");
  655. GuiDrawVLine(3,8,x+12,3,COLOR_WHITE_BACK);
  656. GuiDrawVLine(3,8,x+16,3,COLOR_WHITE_BACK);//5.12
  657. }
  658. else if(bat<400){//375<x<=400 3格
  659. GuiShowBmp(x,1,"VBAT1.bmp");
  660. GuiDrawVLine(3,8,x+8,3,COLOR_WHITE_BACK);
  661. GuiDrawVLine(3,8,x+12,3,COLOR_WHITE_BACK);
  662. GuiDrawVLine(3,8,x+16,3,COLOR_WHITE_BACK);//5.12
  663. }
  664. else{//>=400 4格
  665. GuiShowBmp(x,1,"VBAT1.bmp");
  666. GuiDrawVLine(3,8,x+4,3,COLOR_WHITE_BACK);
  667. GuiDrawVLine(3,8,x+8,3,COLOR_WHITE_BACK);
  668. GuiDrawVLine(3,8,x+12,3,COLOR_WHITE_BACK);
  669. GuiDrawVLine(3,8,x+16,3,COLOR_WHITE_BACK);//5.12
  670. }
  671. }
  672. static void ShowTime(char update)
  673. {
  674. static unsigned char lastS=0xff;
  675. USER_RTC_DEF tempTime;
  676. char buf[30];
  677. if(sutPocStatus.FirstLogined==0) return;
  678. RTC_UserGetTime(&tempTime);
  679. if(lastS != tempTime.second || update){
  680. lastS=tempTime.second;
  681. if(lastS % 2) snprintf(buf, sizeof(buf),"%02d:%02d",tempTime.hour,tempTime.min);
  682. else snprintf(buf, sizeof(buf),"%02d %02d",tempTime.hour,tempTime.min);
  683. GuiShowStr(48,0,buf,0x01,0);
  684. }
  685. }
  686. static void Show_Net(unsigned int s_netshowvalue)
  687. {
  688. if(sutPocStatus.loginResult==4)return; //未插卡不显示2G
  689. if(s_netshowvalue==2||s_netshowvalue==0){
  690. GuiShowStr(30,0,"2G",0x01,0);
  691. }else if(s_netshowvalue==7){
  692. GuiShowStr(30,0,"4G",0x01,0);
  693. }else {
  694. GuiClearRect(30,0,46,10);
  695. }
  696. }
  697. void ShowCallUserName(u16 x,u16 y)
  698. {
  699. static char scName[POC_USER_NAME_LEN];
  700. char name[POC_USER_NAME_LEN];
  701. uint8_t thisName;
  702. static uint8_t siCt=0;
  703. if(siCt==0||siCt==20||siCt==40 || siCt==60||siCt==80||siCt==100)
  704. {
  705. if(strncmp(scName, sutPocStatus.Callname,sizeof(scName)) != 0 ||
  706. strncmp(scName, sutPocStatus.Callname,sizeof(sutPocStatus.Callname))!=0 ||
  707. sutPocStatus.statusChaned)
  708. {//当名字变更后,刷新
  709. //GuiClearRect(x+30,y,159,y+18);
  710. GuiClearArea(x+32,y,124,18);
  711. memcpy(scName,sutPocStatus.Callname,sizeof(sutPocStatus.Callname));
  712. sutPocStatus.statusChaned=0;
  713. // SlwTrace(INF,"------------------\r\n",1);
  714. // printf("-------------suct=%d\r\n",siCt);
  715. }
  716. StrIntercept(name,scName,sizeof(name));
  717. //GuiShowStrM20(x+30,y,sutPocStatus.Callname,0x11,BlueColorId,COLOR_WHITE);
  718. GuiShowStr(x,y,sutPocStatus.Callname,0x10,0);
  719. }
  720. if(++siCt>100) siCt=0;
  721. }
  722. /******************************************************
  723. 在同一个位置交替显示本机用户名和本机当前群组名
  724. 参数:x,y 显示位置左上角的坐标
  725. update ==0 时根据内部静态群组名比较决定是否刷屏显示
  726. update !=0 时强制刷屏显示
  727. ******************************************************/
  728. static void ShowGroupAndUserName(u16 x,u16 y,int update)
  729. {
  730. static char scNameUser[POC_GROUP_NAME_LEN];
  731. static char scNameGroup[POC_GROUP_NAME_LEN];
  732. char name[POC_GROUP_NAME_LEN];
  733. u16 len;
  734. unsigned char danHuanBuffer[9]={0xB5,0xA5,0xBA,0xF4,0xC4,0xA3,0xCA,0xBD,0};
  735. char GroupShowUpdate=0;
  736. if(sutPocStatus.danHunStatus==0){
  737. if(0!=strcmp(sutPocStatus.LocalGroup.name,scNameGroup) || update!=0){
  738. memcpy(scNameGroup,sutPocStatus.LocalGroup.name,sizeof(scNameGroup));
  739. GroupShowUpdate=1;
  740. }
  741. }else{
  742. if(0!=strcmp((char *)danHuanBuffer,scNameGroup) || update!=0){
  743. memcpy(scNameGroup, danHuanBuffer,sizeof(danHuanBuffer));
  744. GroupShowUpdate=1;
  745. }
  746. }
  747. if(0!=strcmp(sutPocStatus.LocalUser.name,scNameUser) || update!=0){
  748. memcpy(scNameUser,sutPocStatus.LocalUser.name,sizeof(scNameUser));
  749. GroupShowUpdate=1;
  750. }
  751. if(GroupShowUpdate){
  752. GuiClearRect(x,y,LCD_WIDTH-1,y+20);//18
  753. GuiClearRect(x,y+20,LCD_WIDTH-1,y+20+20);//18
  754. // if(sutPocStatus.danHunStatus==0){
  755. // GuiShowStr(x,y+3,"群组:",0x01,0);
  756. //
  757. // }else GuiShowStr(x,y+3,"单呼:",0x01,0);
  758. //
  759. // GuiShowStr(x,y+20+3,"成员:",0x01,0);
  760. // GuiShowStr(x,y+20+20+3,"话权:",0x01,0);
  761. GuiShowBmp(x,y,"Group2.bmp");
  762. GuiShowBmp(x,y+16+8,"people2.bmp");
  763. StrIntercept(name,scNameGroup,sizeof(name));
  764. GuiShowStr(x+16,y,name,0x10,0);
  765. StrIntercept(name,scNameUser,sizeof(name));
  766. GuiShowStr(x+16,y+24,name,0x10,0);
  767. sutPocStatus.statusChaned=1;
  768. GroupShowUpdate=0;
  769. }
  770. }
  771. void ReFlashItem2(void)
  772. {
  773. static unsigned short susCt=0;
  774. static const char *accIconFileName[]={
  775. "Group1.bmp",
  776. "Group2.bmp",
  777. ""
  778. };
  779. int i;
  780. unsigned short timeout;
  781. static char NullGroup=0;
  782. static char *GroupsName[POC_ALL_GROUPS_NUM+1]; //5
  783. static char GroupFeatures[POC_ALL_GROUPS_NUM+1];//5
  784. unsigned char buf[10];
  785. //----------------------------
  786. for(i=0;i<=POC_ALL_GROUPS_NUM;i++){
  787. GroupsName[i]=&NullGroup;
  788. GroupFeatures[i]=0;
  789. }
  790. // printf("name111====%d\r\n",sutPocStatus.ListFillIndex);
  791. for(i=0;i<sutPocStatus.ListFillIndex;i++)
  792. {
  793. GroupFeatures[i]=1;
  794. if(sutPocStatus.AllGroups[i].ID==sutPocStatus.LocalGroup.ID)GroupFeatures[i]=0;
  795. GroupsName[i]=sutPocStatus.AllGroups[i].name;
  796. //printf("name====%s\r\n",GroupsName[i]);
  797. }
  798. if(sutPocStatus.ListCurOnlineNum==0)
  799. {
  800. GroupsName[0]="空";
  801. GroupFeatures[i]=0;
  802. }
  803. GuiShowStr(2,STATUS_BAR_HEIGH,"群组选择",0x01,0);
  804. snprintf(buf,sizeof(buf),"%03d/%03d",sutPocStatus.ListCurOnlineNum,sutPocStatus.handleIndex*5+1);
  805. GuiShowStr(68,STATUS_BAR_HEIGH,buf,0x01,0);
  806. //初始化ListBox控件
  807. ListBoxInit(&sutListBox,GroupsName,0,accIconFileName,GroupFeatures);
  808. }
  809. /******************************************************
  810. UIShowGroupSel
  811. 群组选择
  812. *******************************************************/
  813. static void UIShowGroupSel(int update)
  814. {
  815. static char machine;
  816. static unsigned int timer;
  817. static unsigned short susCt=0;
  818. unsigned short timeout;
  819. char temp;
  820. if(update){
  821. machine=0;
  822. susCt=0;
  823. }
  824. switch(machine){
  825. case 0:
  826. if(sutPocStatus.Logined == 0){//not login
  827. ShowMessageBox(" 请先登录... ");
  828. uTimerStart(&timer, 50);
  829. machine=1;
  830. }else{
  831. UiassistStart(0);
  832. machine=2;
  833. }
  834. break;
  835. case 1:
  836. if(uTimerExpired(&timer)){
  837. UISetNextStatus(UIS_STANDBY);
  838. }
  839. break;
  840. case 2:
  841. temp=getAssistResult();
  842. if(temp){//获取完成
  843. printf("temp===%d\r\n",temp);
  844. GuiClearAll();
  845. ReFlashItem2();
  846. GuiDrawHLine(0,127,110,1);
  847. machine=3;
  848. GuiShowStr(0,SUBSCRIPT_LOCATION,"<退出 确定 下翻>",0x01,0);
  849. }
  850. break;
  851. }
  852. if(machine != 3) return;
  853. //按键提示
  854. if(susCt==0){
  855. // GuiShowStr(0,SUBSCRIPT_LOCATION,"[上]选择 [下]选择",0x01,0);
  856. GuiShowStr(0,SUBSCRIPT_LOCATION,"<退出 确定 下翻>",0x01,0);
  857. }else if(susCt==200){
  858. //GuiShowStr(0,SUBSCRIPT_LOCATION,"退出[M]确定",0x01,0);
  859. }
  860. if(++susCt>=400)susCt=0;
  861. UserAssistAdd();
  862. }
  863. static void ReFlashItem(void)
  864. {
  865. //char buf[100];
  866. static const char *accIconFileName[]={
  867. "people1.bmp",
  868. "people2.bmp",
  869. ""
  870. };
  871. int i;
  872. static char NullUser=0;
  873. static char *UsersName[POC_ALL_USERS_NUM+1]; //5
  874. static char UserFeatures[POC_ALL_USERS_NUM+1];//5
  875. unsigned char buf[10];
  876. //----------------------------
  877. for(i=0;i<=POC_ALL_USERS_NUM;i++){
  878. UsersName[i]=&NullUser;
  879. UserFeatures[i]=0;
  880. }
  881. for(i=0;i<sutPocStatus.ListFillIndex;i++)
  882. {
  883. UserFeatures[i]=1;
  884. //UserFeatures[i]=sutPocStatus.AllUsers[i].status-1;
  885. if(sutPocStatus.AllUsers[i].ID==sutPocStatus.LocalGroup.ID)UserFeatures[i]=0;
  886. UsersName[i]=sutPocStatus.AllUsers[i].name;
  887. }
  888. if(sutPocStatus.ListCurOnlineNum==0)
  889. {
  890. UsersName[0]="空";
  891. UserFeatures[i]=0;
  892. }
  893. GuiShowStr(2,STATUS_BAR_HEIGH,"成员选择",0x01,0);
  894. snprintf(buf,sizeof(buf),"%03d/%03d",sutPocStatus.ListCurOnlineNum,sutPocStatus.handleIndex*5+1);
  895. GuiShowStr(68,STATUS_BAR_HEIGH,buf,0x01,0);
  896. //初始化ListBox控件
  897. ListBoxInit(&sutListBox,UsersName,0,accIconFileName,UserFeatures);
  898. }
  899. /******************************************************
  900. UIShowUserSel
  901. 用户选择
  902. *******************************************************/
  903. static void UIShowUserSel(int update)
  904. {
  905. static char machine;
  906. static unsigned int timer;
  907. static unsigned short susCt=0;
  908. unsigned short timeout;
  909. if(update){
  910. machine=0;
  911. susCt=0;
  912. }
  913. switch(machine){
  914. case 0:
  915. if(sutPocStatus.Logined == 0){//not login
  916. ShowMessageBox(" 请先登录... ");
  917. uTimerStart(&timer, 50);
  918. machine=1;
  919. }else{
  920. UiassistStart(0);
  921. machine=2;
  922. }
  923. break;
  924. case 1:
  925. if(uTimerExpired(&timer)){
  926. UISetNextStatus(UIS_STANDBY);
  927. }
  928. break;
  929. case 2:
  930. if(getAssistResult()){//获取完成
  931. GuiClearAll();
  932. ReFlashItem();
  933. GuiDrawHLine(0,159,110,1);
  934. GuiShowStr(0,SUBSCRIPT_LOCATION,"<退出 单呼 下翻>",0x01,0);
  935. machine=3;
  936. }
  937. break;
  938. }
  939. if(machine != 3) return;
  940. //按键提示
  941. if(susCt==0){
  942. GuiShowStr(0,SUBSCRIPT_LOCATION,"<退出 单呼 下翻>",0x01,0);
  943. //GuiShowStr(0,SUBSCRIPT_LOCATION,"[上]选择 [下]选择",0x01,0);
  944. }else if(susCt==200){
  945. //GuiShowStr(0,SUBSCRIPT_LOCATION,"[EXIT]退出[M]单呼",0x01,0);
  946. }
  947. if(++susCt>=400)susCt=0;
  948. UserAssistAdd();
  949. }
  950. /******************************************************
  951. UIShowMenuMain
  952. 显示主菜单
  953. *******************************************************/
  954. SUT_MENU sutMenuMain;
  955. void UIShowMenuMain(int update)
  956. {
  957. static const char *apcMenuMain[]={
  958. "群组选择",
  959. "成员选择",
  960. "网络设置",//"文本消息",
  961. "按键音设置",//"定位设置",
  962. "系统设置",
  963. "终端信息",
  964. ""
  965. };
  966. if(update){
  967. #ifdef ROLLMENU
  968. RollMenuInit(&sutMenuSysSetup,apcMenuMain);
  969. #else
  970. PalaceInit(&sutPalace,apcMenuMain,"Palace","主菜单");
  971. #endif
  972. }
  973. }
  974. static char SelMachine=0; //上一次仍在处理标志
  975. static void UserAssistAdd(void){
  976. switch(SelMachine){
  977. case 1:
  978. if(getAssistResult()){
  979. if(sutUIstatus.Status==UIS_MENU_GROUP_SEL)ReFlashItem2();//指针会被重置到0位置
  980. else ReFlashItem();
  981. SelMachine=0;
  982. }
  983. break;
  984. case 2:
  985. if(getAssistResult()){
  986. if(sutUIstatus.Status==UIS_MENU_GROUP_SEL)ReFlashItem2();//指针会被重置到0位置
  987. else ReFlashItem();
  988. SelMachine=0;
  989. }
  990. break;
  991. }
  992. }
  993. static void UserSelResponse(){
  994. char buf[50];
  995. unsigned long key;
  996. switch(SelMachine){
  997. case 0:
  998. if(sutListBox.handle==0 && KEY_PANEL_UP==g_ulKeyValue){
  999. UiassistStart(1);
  1000. SelMachine=1;
  1001. }else if((sutListBox.handle+1) == sutListBox.itemnum && (KEY_PANEL_DOWN==g_ulKeyValue)){
  1002. UiassistStart(2);
  1003. SelMachine=2;
  1004. }
  1005. key=ListBoxResponse(&sutListBox);
  1006. if(KEY_PANEL_OK==g_ulKeyValue){
  1007. uiAssist.status=0;
  1008. if(UI_Stack.FastUiChange)UISetNextStatus(UIS_STANDBY);
  1009. else UISetNextStatus(UIS_MENU_MAIN);
  1010. }else if(KEY_PANEL_MENU==key){
  1011. //单呼成员 AT+POC=AT+POC=0A0000xxxxxxxx
  1012. ///////////////////////////////////////
  1013. if(0 == sutPocStatus.ListCurOnlineNum){
  1014. break;
  1015. }
  1016. ///////////////////////////////////////
  1017. UiassistEnd(1);
  1018. if(hgs_poc_type==POC_BND)ModemSendAt("AT+POC=autoleavetime,30\r\n");//单呼30秒无人通话自动解散
  1019. if(hgs_poc_type==POC_BND)snprintf(buf, sizeof(buf),"AT+POC=singlecall,%d\r\n",sutPocStatus.AllUsers[sutListBox.handle].ID);
  1020. else snprintf(buf, sizeof(buf),"AT+POC=0A0000%08x\r\n",sutPocStatus.AllUsers[sutListBox.handle].ID);
  1021. ModemSendAt(buf);
  1022. SlwTrace(INF, buf,1);
  1023. snprintf(buf, sizeof(buf),"呼叫:%s",sutPocStatus.AllUsers[sutListBox.handle].name);
  1024. SlwTrace(INF, buf,1);
  1025. //ShowMessageBox(buf);
  1026. //OsDelayTime(200);
  1027. UISetNextStatus(UIS_STANDBY);
  1028. SelMachine=0;
  1029. }
  1030. break;
  1031. }
  1032. }
  1033. static void GroupSelResponse(){
  1034. unsigned int key;
  1035. char buf[50];
  1036. int i;
  1037. switch(SelMachine){
  1038. case 0:
  1039. if(sutListBox.handle==0 && KEY_PANEL_UP==g_ulKeyValue){
  1040. UiassistStart(1);
  1041. SelMachine=1;
  1042. }else if((sutListBox.handle+1) == sutListBox.itemnum && (KEY_PANEL_DOWN==g_ulKeyValue)){
  1043. UiassistStart(2);
  1044. SelMachine=2;
  1045. }
  1046. key=ListBoxResponse(&sutListBox);
  1047. if(KEY_PANEL_OK==g_ulKeyValue){
  1048. uiAssist.status=0;
  1049. UI_Stack.OK_back=1;
  1050. if(UI_Stack.FastUiChange)UISetNextStatus(UIS_STANDBY);
  1051. else UISetNextStatus(UIS_MENU_MAIN);
  1052. }else if(KEY_PANEL_MENU==key){
  1053. if(0 == sutPocStatus.ListCurOnlineNum){
  1054. break;
  1055. }
  1056. ///////////////////////////////////////
  1057. UiassistEnd(1);
  1058. if(hgs_poc_type==POC_BND)snprintf(buf, sizeof(buf),"AT+POC=entergroup,%d\r\n",sutPocStatus.AllGroups[sutListBox.handle].ID);
  1059. else snprintf(buf, sizeof(buf),"AT+POC=090000%08x\r\n",sutPocStatus.AllGroups[sutListBox.handle].ID);
  1060. ModemSendAt(buf);
  1061. SlwTrace(INF, buf,1);
  1062. snprintf(buf, sizeof(buf),"进入:%s",sutPocStatus.AllGroups[sutListBox.handle].name);
  1063. g_ucEnterGroupFlag=1;//进入播报
  1064. SlwTrace(INF, buf,1);
  1065. UISetNextStatus(UIS_STANDBY);
  1066. SelMachine=0;
  1067. }
  1068. break;
  1069. }
  1070. }
  1071. void speciallShow(char type)
  1072. {//他们的FileSys.c中的中文编码设置不到正常的,其它C的正常,所以要显示只能通过这个方式实现了
  1073. if(type==0) ShowMessageBox("正在设置");
  1074. else ShowMessageBox("设置完成");
  1075. }