|
@@ -98,24 +98,22 @@ static void Show_Net(unsigned char s_netshowvalue){
|
|
|
static void gpsIconShow(char flash){
|
|
|
typedef struct{
|
|
|
unsigned char located:1;
|
|
|
- unsigned char auth:1;
|
|
|
unsigned char gpsF:1;
|
|
|
}TMP_GPS_DEF;
|
|
|
static TMP_GPS_DEF tmpGps;
|
|
|
unsigned short x=GPS_ICON_X,y=0;
|
|
|
|
|
|
- if(tmpGps.located==gpsInfo.gpsLocated && tmpGps.auth==gpsInfo.bbAuth && tmpGps.gpsF==gpsInfo.gpsF && flash==0) return;
|
|
|
+ if(tmpGps.located==sutGpsInfo.isGpsValid && tmpGps.gpsF==sutGpsInfo.isGpsWork && flash==0) return;
|
|
|
guiClearRect(x,y,x+GPS_ICON_WX,y+11,COLOR_STATUS_BAR);
|
|
|
- if(gpsInfo.gpsF==0){//GPS未打开时
|
|
|
- if(gpsInfo.bbAuth==1) guiShowBmp(x,y,"GPS3.bmp");//已鉴权
|
|
|
+
|
|
|
+ if(sutGpsInfo.isGpsWork==0){//GPS未打开时
|
|
|
+ guiClearRect(x,y,x+GPS_ICON_WX,y+11,COLOR_STATUS_BAR);
|
|
|
}else{//GPS已打开
|
|
|
- if(gpsInfo.bbAuth==1) guiShowBmp(x,y,"GPS1.bmp");//已鉴权
|
|
|
- else if(gpsInfo.bbAuth==1) guiShowBmp(x,y,"GPSA.bmp");//未鉴权
|
|
|
- if(gpsInfo.gpsLocated==1) guiShowBmp(x+10,y,"GPS2.bmp");//已定位
|
|
|
+ guiShowBmp(x,y,"GPSA.bmp");
|
|
|
+ if(sutGpsInfo.isGpsValid==1) guiShowBmp(x+10,y,"GPS2.bmp");//已定位
|
|
|
}
|
|
|
- tmpGps.located=gpsInfo.gpsLocated;
|
|
|
- tmpGps.auth=gpsInfo.bbAuth;
|
|
|
- tmpGps.gpsF=gpsInfo.gpsF;
|
|
|
+ tmpGps.located=sutGpsInfo.isGpsValid;
|
|
|
+ tmpGps.gpsF=sutGpsInfo.isGpsWork;
|
|
|
}
|
|
|
static void ShowCardType(char card){
|
|
|
unsigned short x= CARD_ICON_X;
|
|
@@ -188,12 +186,7 @@ static void ShowTime(char flash,unsigned int exeInterval){
|
|
|
snprintf(buf, sizeof(buf), "%02d %02d",myclock.hour, myclock. min);
|
|
|
flag=1;
|
|
|
}
|
|
|
- guiShowStr(TIME_ICON_X, 1,buf, FONT_MODE_12X12, REVERSED_NO,guiGetBackColor(),COLOR_STATUS_BAR);
|
|
|
-
|
|
|
-// snprintf(buf, sizeof(buf), "%d-%02d-%02d",myclock.year,myclock.month,myclock.day);
|
|
|
-// guiShowStr(1, UI_BOTTOM_SHOW_Y,buf, FONT_MODE_16X16, REVERSED_NO,COLOR_STATUS_BAR, guiGetBackColor());
|
|
|
- //now_time.
|
|
|
-
|
|
|
+ guiShowStr(TIME_ICON_X, 1,buf, FONT_MODE_12X12, REVERSED_NO,guiGetBackColor(),COLOR_STATUS_BAR);
|
|
|
}
|
|
|
if(++nextExe>=(1000/exeInterval)) nextExe=0;
|
|
|
}
|
|
@@ -252,9 +245,6 @@ void uiShowStatusBar(char flash,unsigned int exeInterval){
|
|
|
Show_Net(s_netshowvalue);
|
|
|
}
|
|
|
//显示GPS是否正常及鉴权情况
|
|
|
- //gpsInfo.gpsLocated=1;
|
|
|
- //gpsInfo.bbAuth=1;
|
|
|
- //gpsInfo.gpsF=1;
|
|
|
gpsIconShow(tempFlash);
|
|
|
//电量显示
|
|
|
if(batFirstShow < (1000/exeInterval)) {//开机前1秒显示一半电量
|
|
@@ -267,25 +257,14 @@ void uiShowStatusBar(char flash,unsigned int exeInterval){
|
|
|
}
|
|
|
//文本消息显示
|
|
|
//sutSms.haveUnRead=1;
|
|
|
- ShowMessageFlag(0);
|
|
|
+ //ShowMessageFlag(0);
|
|
|
//GPS显示
|
|
|
//时间显示
|
|
|
ShowTime(tempFlash,exeInterval);
|
|
|
//显示耳机状态
|
|
|
- ShowEarStatus(tempFlash);
|
|
|
+ //ShowEarStatus(tempFlash);
|
|
|
//显示键盘锁状态
|
|
|
- ShowKeyLocStatus(tempFlash);
|
|
|
-
|
|
|
-// if((now_time.year>1970)&&(tempDate.year!=now_time.year
|
|
|
-// ||tempDate.month!=now_time.month
|
|
|
-// ||tempDate.day!=now_time.day||flash))
|
|
|
-// {
|
|
|
-// tempDate.year=now_time.year;
|
|
|
-// tempDate.month=now_time.month;
|
|
|
-// tempDate.day=now_time.day;
|
|
|
-// snprintf(info, sizeof(info), "%d-%02d-%02d",now_time.year,now_time.month,now_time.day);
|
|
|
-// guiShowStr(1, UI_BOTTOM_SHOW_Y-3,info, FONT_MODE_16X16, REVERSED_NO,COLOR_STATUS_BAR, guiGetBackColor()); //4
|
|
|
-// }
|
|
|
+ //ShowKeyLocStatus(tempFlash);
|
|
|
|
|
|
}
|
|
|
/****************************状态栏显示部分结束***********************************/
|
|
@@ -998,29 +977,23 @@ static locationXYFlash(char flash);
|
|
|
|
|
|
void uiShowMenuLocationSel(char flash){
|
|
|
static unsigned int timer;
|
|
|
- static char machine=0;
|
|
|
if(flash){
|
|
|
- machine=0;
|
|
|
+ //machine=0;
|
|
|
guiClearAll(guiGetBackColor());
|
|
|
guiShowCaption(0,"定位设置",UI_STATUS_ITEM_Y+1,guiGetBackColor(),guiGetForeColor(),FONT_MODE_12X12);
|
|
|
uiMenuShowBottomLine();
|
|
|
- if(newPara.gpsEnable==0){
|
|
|
- machine=1;
|
|
|
- uiMenuShowBottomIndacitor(NULL, "返回");
|
|
|
- guiShowMessageBox("版本不支持");
|
|
|
- uTimerStart(&timer, 1000);
|
|
|
- return;
|
|
|
- }
|
|
|
+// if(newPara.gpsEnable==0){
|
|
|
+// machine=1;
|
|
|
+// uiMenuShowBottomIndacitor(NULL, "返回");
|
|
|
+// guiShowMessageBox("版本不支持");
|
|
|
+// uTimerStart(&timer, 1000);
|
|
|
+// return;
|
|
|
+// }
|
|
|
uiMenuShowBottomIndacitor("保存", "返回");
|
|
|
locationTimeFlash(0);
|
|
|
}
|
|
|
- if(newPara.gpsEnable!=0) locationXYFlash(flash);
|
|
|
- if(machine==1){
|
|
|
- if(uTimerExpired(&timer)){
|
|
|
- machine=0;
|
|
|
- uISetNextStatus(UIS_MENU_MAIN);
|
|
|
- }
|
|
|
- }
|
|
|
+ //if(newPara.gpsEnable!=0)
|
|
|
+ locationXYFlash(flash);
|
|
|
}
|
|
|
void loationSetResponse(void){
|
|
|
unsigned short key;
|
|
@@ -1035,11 +1008,12 @@ void loationSetResponse(void){
|
|
|
newPara.gpsTimeIndex=tempGpsIndex;
|
|
|
sysIniSave();
|
|
|
gpsCheckInfo();//检测一下
|
|
|
+ GpsTimeUpdate();
|
|
|
}
|
|
|
- uISetNextStatus(UIS_MENU_MAIN);
|
|
|
-
|
|
|
+ uISetNextStatus(UIS_MENU_MAIN);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
static locationTimeFlash(char type){
|
|
|
unsigned short gpsTimeValue;
|
|
|
char buf[50];
|
|
@@ -1055,10 +1029,10 @@ static locationTimeFlash(char type){
|
|
|
}else return;
|
|
|
|
|
|
gpsTimeValue=getGPSTimeValue(tempGpsIndex);
|
|
|
- if(gpsTimeValue==0) snprintf(buf, sizeof(buf), "定位上传设置:关闭");
|
|
|
- else snprintf(buf, sizeof(buf), "定位上传设置:%d秒",gpsTimeValue);
|
|
|
+ if(gpsTimeValue==0) snprintf(buf, sizeof(buf), "定位采样设置:关闭");
|
|
|
+ else snprintf(buf, sizeof(buf), "定位采样设置:%d秒",gpsTimeValue);
|
|
|
guiClearRect(0,y,GLCD_WIDTH-1, y+12,guiGetBackColor());
|
|
|
- guiShowStr(30,y, buf,FONT_MODE_12X12, REVERSED_NO, COLOR_BLACK, guiGetBackColor());
|
|
|
+ guiShowStr(1,y, buf,FONT_MODE_12X12, REVERSED_NO, COLOR_BLACK, guiGetBackColor());
|
|
|
}
|
|
|
static locationXYFlash(char flash){
|
|
|
char buf[50];
|
|
@@ -1067,11 +1041,13 @@ static locationXYFlash(char flash){
|
|
|
if(gpsInfo.update==0 && flash==0) return;
|
|
|
gpsInfo.update=0;
|
|
|
guiClearRect(0, y,GLCD_WIDTH-1, y+12+5+12,guiGetBackColor());
|
|
|
- snprintf(buf, sizeof(buf), "纬度 S:%d.%05d",gpsInfo.Lat/1000000,gpsInfo.Lat%1000000);
|
|
|
- guiShowStr(30,y, buf,FONT_MODE_12X12, REVERSED_NO, COLOR_BLACK, guiGetBackColor());
|
|
|
+
|
|
|
+
|
|
|
+ snprintf(buf, sizeof(buf), "纬度 %c:%d.%05d",sutGpsInfo.NSFlag,sutGpsInfo.latitue/1000000,sutGpsInfo.latitue%1000000);
|
|
|
+ guiShowStr(1,y, buf,FONT_MODE_12X12, REVERSED_NO, COLOR_BLACK, guiGetBackColor());
|
|
|
y+=12+5;
|
|
|
- snprintf(buf, sizeof(buf), "经度 W:%d.%05d",gpsInfo.Long/1000000,gpsInfo.Long%1000000);
|
|
|
- guiShowStr(30,y, buf,FONT_MODE_12X12, REVERSED_NO, COLOR_BLACK, guiGetBackColor());
|
|
|
+ snprintf(buf, sizeof(buf), "经度 %c:%d.%06d",sutGpsInfo.EWFlag,sutGpsInfo.longitue/1000000,sutGpsInfo.longitue%1000000);
|
|
|
+ guiShowStr(1,y, buf,FONT_MODE_12X12, REVERSED_NO, COLOR_BLACK, guiGetBackColor());
|
|
|
}
|
|
|
/*****************************定位设置部分结束*********************************/
|
|
|
|
|
@@ -1097,9 +1073,6 @@ static void sysInfoFlash(void){
|
|
|
guiShowMessageBox("获取失败");
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
else if(sysInfoType==1){
|
|
|
|