Ver código fonte

22年春节备份

hyl595138788 3 anos atrás
pai
commit
0f895c03a5

+ 1 - 0
CMakeLists.txt

@@ -21,6 +21,7 @@ set(app_file ./hpocapp.c
 	${app_dir}/uiEntry.c
 	${app_dir}/uiBlock.c
 	${app_dir}/gpsCtl.c
+	${app_dir}/GpsData.c
 	${app_dir}/message.c
 	${app_dir}/hook.c
 	${app_dir}/appAuth.c

+ 9 - 12
app/app.c

@@ -358,13 +358,8 @@ static unsigned char gtModeCnt=0;
 				lockCnt++;
 				if(lockCnt==3){
 						keyToneStart(0);
-						lockProcess();
+//						lockProcess(); //舍弃加锁功能
 				} 
-//				else if(lockCnt>3){
-//
-//				}
-				//
-				
 				pwrDetRead(0);
 				break;
 			case MKEY_VALUE_F1:
@@ -618,6 +613,8 @@ void appRun(void){
 	while(sutApp.guiStatus==0){LSAPI_OSI_ThreadSleep(50);}//是否检测超时?
 	AntModeRun();
 	localAuthNow();
+
+	
 	while(sutApp.pocInitStatus==0){
 		msgAtSend("AT+POC=version\r\n");//发指令后等待POC启动
 		LSAPI_OSI_ThreadSleep(1000); 
@@ -647,7 +644,6 @@ void appRun(void){
 				break;
 			}
 	}
-	
 	pwrModeSetCmd(newPara.pwrMode);//设置功耗模式
 	voiceModeSet(newPara.voiceSel);//设置音质
 	
@@ -684,9 +680,9 @@ void appRun(void){
 	msgToModem("ATE0\r\n");
 	msgToModem("AT+AUDCH=0,0\r\n");//TEST  因为模块默认 通道为2,0
 	pocSetDomain();
-	//msgAtSend("AT+POC=0000000101\r\n");//
+	//msgAtSend("AT+POC=0000000101\r\n");
 	//osiPmWakeUnlock(App_osiPmSource_t); 
-	
+
 for(;;){
 //		MS5700_Networking(APP_SUB_DIV_TIME); //网络监测
 //		Domain_Process(APP_SUB_DIV_TIME);   //
@@ -695,13 +691,15 @@ for(;;){
 		ledsProCtl();
 		adcRead(APP_SUB_DIV_TIME);
 		uiProcess(APP_SUB_DIV_TIME);
-	//	gpsProCtl(APP_SUB_DIV_TIME);
+		gpsProCtl(APP_SUB_DIV_TIME);
+		GpsInternalChange(APP_SUB_DIV_TIME);
 	#ifndef ANT_TEST
 		pocProCtl(APP_SUB_DIV_TIME);
 	#endif
 		NoteCheck(APP_SUB_DIV_TIME);
+		GpsInternalChange(APP_SUB_DIV_TIME);
 		ShouHuProcess(APP_SUB_DIV_TIME);
-		HookGroupUserInfo();
+		//HookGroupUserInfo();
 		HookVolToutCheck();
 		//IncomingSMS();
 		if(isSleepReady()==0) LSAPI_OSI_ThreadSleep(APP_TASK_SLEEP_TIME);
@@ -784,7 +782,6 @@ void tryWakeupApp(void){
 	}                                                                                                                       
 }
 void ttsPlay(ENCODE_USER_ENUM type, char *tts){
-
 		int len,i;
 		char ttsMessage[20*4];
 		char Playbuf[100]={0};

+ 1 - 0
app/board.c

@@ -195,6 +195,7 @@ void greenLedCtl(bool onoff){
 }
 
 void spkCtl(bool onoff){
+
 	bool write_value = onoff;
 	LSAPI_Device_Write(SpkGpio, (void *)&write_value, 1);
 }

+ 43 - 13
app/gpsCtl.c

@@ -6,35 +6,65 @@ const unsigned short GPS_TimeTable[GPS_TABLE_NUM]={0,5,10,15,30,60,120,300};
 void gpsDataInit(void){
 	memset((unsigned char *)&sutMess, 0, sizeof(SUT_MESS));
 	memset((unsigned char *)&gpsInfo, 0, sizeof(GPS_DEF));
+	GPSInit();
+	GpsTimeUpdate();
 }
 unsigned short getGPSTimeValue(unsigned char index){
 	return GPS_TimeTable[index];
-}	
-static unsigned char gpsCheckCnt=1;//榛樿�寮€鏈烘煡璇�竴娆�
+}
+
+static unsigned char gpsCheckCnt=1;//榛樿�寮€鏈烘煡璇�竴娆?
 void gpsCheckInfo(void){//鏌ヨ�GPS淇℃伅
 	gpsCheckCnt++;
 }
-/*鎺у埗鏌ヨ�GPS鐘舵€
+/*鎺у埗鏌ヨ�GPS鐘舵€?
 dly:鎺ュ彛琚�皟鐢ㄧ殑棰戠巼锛屽崟浣峬s*/
+
+
+
+/*
+AT+POC=11000032322e32333231312c3130332e3132333132312c352c32302c362e302c0425242
+52600
+其中 32322e32333231312c3130332e3132333132312c352c32302c362e302c042524252600 表示
+北纬 22.23211 东经 103.123121 速度 5km/h,方向角 20 度,精度因子为 6.0,共有 4 颗卫星,
+信噪比分别为 37db, 36db, 37db, 38db。
+
+*/
 void gpsProCtl(int dly){
+
 	static unsigned short cnt=0;
-	if(sutApp.gtMode!=0) return;//GT妯″紡鍚庝笉鍐嶆煡璇�
+	unsigned char GpsDatabuf[100];
+	unsigned char restohex[20];
+	unsigned char destohex[40];
+	
+	
 
-	if(getAppObjStatus(ASLEEP_POC)==0) return;//POC浼戠湢鏃讹紝涓嶅彂鎸囦护
-	if(++cnt<(5*1000/dly) && gpsCheckCnt==0) return;
+	if(GPS_TimeTable[newPara.gpsTimeIndex]==0)return;
+	
+	if(sutApp.gtMode!=0) return;
+	if(++cnt<(GPS_TimeTable[newPara.gpsTimeIndex]*1000/dly) && gpsCheckCnt==0) return;
 	cnt=0;
-	//浠ヤ笅5绉掓搷浣滀竴娆�
-	msgAtSend("AT+CGPS\r\n");
+	if(sutGpsInfo.g_GpsEnable)msgToModem("AT+GPSRD=\"ALL\"\r\n");
 	gpsCheckCnt=0;
+	if(sutGpsInfo.isGpsValid){
+		snprintf(restohex,sizeof(restohex),"%d.%06d,%d.%06d",sutGpsInfo.latitue/1000000,sutGpsInfo.latitue%1000000,sutGpsInfo.longitue/1000000,sutGpsInfo.longitue%1000000);
+
+		AscStrTurnHexStr(restohex,destohex);
+		snprintf(GpsDatabuf,sizeof(GpsDatabuf),"AT+POC=110000%s2c352c32302c362e302c042524252600\r\n",destohex);
+		msgAtSend(GpsDatabuf);
+		
+		//MSG_INFO(1,GpsDatabuf);
+	}	
+		
 }
 
 /*
 +CGPS:bf,ba,gf,[Lat],[Long]
 bf:0 閮ㄦ爣鍏抽棴 1 閮ㄦ爣鎵撳紑
-ba:0 閮ㄦ爣鏈�壌鏉� 1 閮ㄦ爣宸查壌鏉�
+ba:0 閮ㄦ爣鏈�壌鏉?1 閮ㄦ爣宸查壌鏉?
 gf:0 GPS鍏抽棴 1 GPS鎵撳紑
-Lat: 宸插畾浣嶆墠鏈夛紝瀹氫綅绾�害 搴�.搴�(宸叉斁澶�1000000)
-Long: 宸插畾浣嶆墠鏈夛紝瀹氫綅缁忓害 搴�.搴�(宸叉斁澶�1000000)
+Lat: 宸插畾浣嶆墠鏈夛紝瀹氫綅绾�害 搴?搴?宸叉斁澶?000000)
+Long: 宸插畾浣嶆墠鏈夛紝瀹氫綅缁忓害 搴?搴?宸叉斁澶?000000)
 msg=bf,ba,gf,[Lat],[Long]
 */
 void proGpsMsg(char *msg){
@@ -44,7 +74,7 @@ void proGpsMsg(char *msg){
 	unsigned char dotNum=0,lach=0;
 	unsigned char bblF=0,bbAuth=0,gpsF=0;
 	unsigned int Lat=0,Long=0;
-	//鑾峰彇閮ㄦ爣寮€鍏崇姸鎬
+	//鑾峰彇閮ㄦ爣寮€鍏崇姸鎬?
 	bblF=atoi(msg);
 	for(i=0;i<strlen(msg);i++){
 		if(msg[i]==',') dotNum++;
@@ -90,7 +120,7 @@ void proGpsMsg(char *msg){
 			gpsCheckInfo();//妫€鏌ヤ笅鏄�惁鎴愬姛
 		}
 	}
-	//鏇存柊鍊
+	//鏇存柊鍊?
 	gpsInfo.bblF=bblF;
 	gpsInfo.bbAuth=bbAuth;
 	gpsInfo.Lat=Lat;

+ 4 - 3
app/gpsCtl.h

@@ -18,10 +18,10 @@ typedef struct{
 
 typedef struct{
 	unsigned char bblF:1;//部标是�打开
-	unsigned char bbAuth:1;//部标鉴æ�ƒçŠ¶æ€
+	unsigned char bbAuth:1;//部标鉴�状�
 	unsigned char gpsF:1;//GPS是�打开
 	unsigned char gpsLocated:1;//GPS是�定�
-	unsigned char update:1;//定��纬度刷新
+	unsigned char update:1;//定��纬度刷�
 	unsigned int Lat;//定�伟度
 	unsigned int Long;//定��度
 }GPS_DEF;
@@ -30,9 +30,10 @@ typedef struct{
 extern SUT_MESS sutMess;
 extern GPS_DEF gpsInfo;
 
+extern const unsigned short GPS_TimeTable[GPS_TABLE_NUM];
+
 void gpsDataInit(void);
 unsigned short getGPSTimeValue(unsigned char index);
 void gpsProCtl(int dly);
-void proGpsMsg(char *msg);
 void gpsCheckInfo(void);
 #endif

+ 1 - 0
app/includes.h

@@ -41,6 +41,7 @@
 #include "uiEntry.h"
 #include "uiBlock.h"
 #include "gpsCtl.h"
+#include "GpsData.h"
 #include "message.h"
 #include "Palace.h"
 #include "uiMenu.h"

+ 1 - 1
app/log/log.c

@@ -4,7 +4,7 @@
 #include <stdarg.h>
 #include "app.h"
 
-static char info[512];
+static char info[1024];//GWSD
 void ologShow(char level, char fa, char * fmt, ...){
 #if 0
 	usbOutPut("\r\n", 2);

+ 1 - 1
app/ohpoc.h

@@ -7,7 +7,7 @@
 #define OHPOC_APP_NAME "X6"
 
 
-#define OHPOC_VERSION "210005"  //外部OCPU 应用维护
+#define OHPOC_VERSION "220002"  //外部OCPU 应用维护
 #define OHPOC_MODLE	"M5701" //作为OPEN时,此值用于FOTA升级标识使用
 #define OHPOC_CUST OHPOC_APP_NAME //作为OPEN时,此值用于FOTA升级标识使用
 #define OHPOC_POC_PLATFORM "GWSD"

+ 6 - 7
app/poc.c

@@ -18,7 +18,6 @@ void pocProCtl(int dly)
 	if(sutApp.gtMode!=0) return;//GT璅∪��𦒘��齿䰻霂?
 	if(++cnt<(5*1000/dly)) return;
 	cnt=0;
-	
 	if(getAppObjStatus(ASLEEP_LCD)==0) return;
 	msgToModem("AT+COPS?\r\n");
 	msgToModem("AT+CTEC?\r\n");//�亥砭敶枏�蝵𤑳��嗅�
@@ -79,6 +78,7 @@ void cmdsProcess(char *msg, int len){//撌脣縧�匧�頧行揢
 	if(sutApp.gtMode==0){
 		appSleepCtl(ASLEEP_POC, 1);
 		tryWakeupApp();
+		
 		MSG_INFO(1,"POC:%s",msg);
 		if(msgCmp(msg, "PocSleep")){//POC隡𤑳�鈭?
 			appSleepCtl(ASLEEP_POC, 0);
@@ -116,6 +116,7 @@ void cmdsProcess(char *msg, int len){//撌脣縧�匧�頧行揢
 		else if(msgCmp(msg, "+POC:28")) pro28Msg(msg);
 		else if(msgCmp(msg, "+POC:7F000000")) proVoiceMode(msg+13);
 		else if(msgCmp(msg, "+CCID: ")) proCCIDMsg(msg+7);
+		else if(msgCmp(msg, "$GNRMC"))process_gps_data(msg+7,len-7);
 
 
 		else if(msgCmp(msg, "+CTEC:")) proNetMode(msg+7);
@@ -193,7 +194,7 @@ void cmdsProcess(char *msg, int len){//撌脣縧�匧�頧行揢
 //憭��POC璅∪�靽⊥�
 void pocCmdHandler(unsigned char *msg, int len){
 	//�㗇��航��伐�憒��銝齿糓+POC:SLEEP嚗釶OC�賢𤧅�雴�
-	static char tmp[300],ch;
+	static char tmp[1024],ch;//300
 	static int k=0;
 	unsigned int j;
 	if(sutApp.authReady==0) return;
@@ -329,7 +330,6 @@ static void pro81Msg(char *msg){
 	msg[18]=0;
 	sutPocStatus.AllUsers[index].ID=strtol(msg+10, &pName, 16);
 
-	
 }
 /*�餃��嗆��縑�?
 msg:ss(00�芰蒈敶?02撌脩蒈敶?,dddddddd(�𣂼�id),mmmmmmmm(�嗆��縑�臬�摰?
@@ -429,10 +429,10 @@ static void pro86Msg(char *msg){
 //		paControl(true);
 		sutPocStatus.logined=1;
 		len=strlen(msg+10);
-		if(len>POC_GROUP_USER_NAME_LEN) len=POC_GROUP_USER_NAME_LEN;
+		if(len>POC_GROUP_USER_NAME_LEN*2) len=POC_GROUP_USER_NAME_LEN*2;
 		memcpy(GroupName, msg+10,len);
 		GroupName[len]=0;
-
+		
 		LwEndingToBiEndingStr(GroupName,len);
 		unicodeToGbk(GroupName, sutPocStatus.LocalGroup.name, &len);
 		sutPocStatus.LocalGroup.name[len]=0;
@@ -461,8 +461,6 @@ static void pro86Msg(char *msg){
 		}
 		sutPocStatus.danHuStatus=0;
 		sutPocStatus.firstLogin=1;
-
-	
 }
 /*�亥砭��撅䂿黎蝏��餅㺭���摨?
 �飊T+POC=3D0000�瑕�
@@ -579,6 +577,7 @@ static void pro0dMsg(char *msg){
 +POC_VER:01027
 msg=01027
 */
+
 static void pocGetVer(char *msg){
 	int i;
 	sutApp.pocInitStatus=1;

+ 2 - 2
app/poc.h

@@ -4,8 +4,8 @@
 #define POC_GROUP_USER_NAME_LEN	36
 
 
-#define POC_ALL_USERS_NUM 	5
-#define POC_ALL_GROUPS_NUM 	5
+#define POC_ALL_USERS_NUM 	200  //
+#define POC_ALL_GROUPS_NUM 	200  //
 
 #define HGS_PLATFM   0
 #define BND_PLATFM   1

+ 4 - 3
app/setting.c

@@ -11,7 +11,9 @@ void cmdSetting(char *msg){
 
 	if(sutApp.gtMode==0) return;
 	if(sutApp.gtTMode!=0){
-		msgAtSends(msg, strlen(msg));
+		if(msgCmp(msg, "AT+POC=poccmd1")){
+			msgAtSends("AT+POC=poccmd1", strlen("AT+POC=poccmd1"));
+		}else msgAtSends(msg, strlen(msg));
 		return;
 	}
 //	//GT模�下指令处�
@@ -107,14 +109,13 @@ void cmdSetting(char *msg){
 			saveInfoNow(&sutApp.UserInfo);			
 		}
 	else if(msgCmp(msg, "GT+RZZD")){
-	
 			snprintf(info, sizeof(info),"GT+RZZD:Id=%s;Pwd=%s;\r\n",sutApp.UserInfo.OtherId,sutApp.UserInfo.OtherPassWord);
 			needFeedSms=1;
 			goto SETTING_END;
 		}
 	//unsigned char 	platform[20];
     //unsigned char 	pFormatMark[20];
-    //
+    
 	else if(msgCmp(msg, "GT+SDOMAIN")){
 			len=GetParaFromStr(msg,"PLAT",buf);
 			if(len<1 || len>15){  

+ 34 - 61
app/uiBlock.c

@@ -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){
 		

+ 9 - 7
app/uiBlock.h

@@ -5,26 +5,28 @@
 #define SIGNAL_ICON_X 0
 #define SIGNAL_ICON_WX (7+10)
 
-#define CARD_ICON_X (SIGNAL_ICON_X+SIGNAL_ICON_WX+2)
+#define CARD_ICON_X (SIGNAL_ICON_X+SIGNAL_ICON_WX+2) //19
 #define CARD_ICON_WX 7
 
-#define NET_ICON_X (CARD_ICON_X+CARD_ICON_WX+1)
+#define NET_ICON_X (CARD_ICON_X+CARD_ICON_WX+1) //27
 #define NET_ICON_WX (16)
 
-#define GPS_ICON_X (NET_ICON_X+NET_ICON_WX)//(NET_ICON_X+NET_ICON_WX+1)
-#define GPS_ICON_WX 0//(18)
+#define GPS_ICON_X (NET_ICON_X+NET_ICON_WX)//(NET_ICON_X+NET_ICON_WX+1)//43
+#define GPS_ICON_WX (18)
 
-#define SMS_ICON_X (GPS_ICON_X+GPS_ICON_WX)//(GPS_ICON_X+GPS_ICON_WX+2)
+
+#define SMS_ICON_X 	(GPS_ICON_X+GPS_ICON_WX)//(GPS_ICON_X+GPS_ICON_WX+2)
 #define SMS_ICON_WX 0//(8)
 
 #define TIME_ICON_X (SMS_ICON_X+SMS_ICON_WX+1)
 #define TIME_ICON_WX (5*8)
 
+
 #define EAR_ICON_X (TIME_ICON_X+TIME_ICON_WX+1)
-#define EAR_ICON_WX (11)
+#define EAR_ICON_WX (0)
 
 #define LOCK_ICON_X (EAR_ICON_X+EAR_ICON_WX+2)
-#define LOCK_ICON_WX 8
+#define LOCK_ICON_WX 0//8
 
 #define BAT_ICON_X (LOCK_ICON_X+LOCK_ICON_WX+1)
 #define BAT_ICON_WX (21)

+ 4 - 3
hpocapp.c

@@ -41,15 +41,16 @@ void ToneThread(void *param){
  LSAPI_OSI_Event_t waitevent;
  
     for(;;){
-     LSAPI_OSI_EventWait(LSAPI_OSI_ThreadCurrent(), &waitevent);
-
-		
+     LSAPI_OSI_EventWait(LSAPI_OSI_ThreadCurrent(), &waitevent);	
 		if(sutPocStatus.beep!=0){	
 			if(sutPocStatus.spk==0||sutPocStatus.beep==2){//100
+			
 				if(!sutPocStatus.PttFail)LSAPI_AUD_CusToneV2(TONEFRE,TONEFRE,100,LSAPI_CUSTONE_GAIN_NEGA_24,0);//24
 				else LSAPI_AUD_CusToneV2(1000,1000,100,LSAPI_CUSTONE_GAIN_NEGA_24,0);//24
 				
 					LSAPI_AUD_SetPlayVolumeLevel(newPara.spkVol*7);//10
+
+				
 					if(sutPocStatus.prePtt){
 						msgAtSend("AT+POC=0B0000\r\n");
 						//sutPocStatus.prePtt=0;

BIN
lib/gwsd/ARMCC_5.05_build41/POC_MCU.lib


BIN
lib/gwsd/ARMCC_5.05_build41/POC_OPEN.lib


BIN
lib/gwsd/ARMCC_5.06_build422/POC_MCU.lib


BIN
lib/gwsd/ARMCC_5.06_build422/POC_OPEN.lib


BIN
lib/gwsd/POC_OPEN.lib


BIN
lib/gwsd/RTOS模块适配标准接口.pdf


BIN
lib/gwsd/arm-none-eabi-gcc_window/POC_MCU.lib


BIN
lib/gwsd/arm-none-eabi-gcc_window/POC_OPEN.lib


BIN
lib/gwsd/arm-none_eabi-gcc_linux/POC_MCU.lib


BIN
lib/gwsd/arm-none_eabi-gcc_linux/POC_OPEN.lib


+ 45 - 0
lib/gwsd/poc_interface.h

@@ -63,5 +63,50 @@ void virtual_uart_write(char *cmd, int len);
  */
 void OEM_PocInit(void);
 
+/*
+ * Function:   report_encode_data_for_record
+ * Description:
+ *       Report encode voice data for record
+ * 
+ * Parameters:
+ *       data: voice data after encode
+ *       size: voice data len
+ *       frame_type: encode type 0x01 general 0x02 enhance
+ *       self: 0 other voice  1 my voice
+ *
+ * Explain:
+ *       module should define this function,this is just declare 
+ *
+ * Example:
+ *       
+ * 
+ * Return:
+ *       none
+ *
+ */
+extern void report_encode_data_for_record(unsigned char *data, unsigned int size, char frame_type, int self);
 
+/*
+ * Function:   decode_record_data
+ * Description:
+ *       decode record data to pcm data
+ * 
+ * Parameters:
+ *       enc_data: voice data after encode
+ *       len:  voice data len
+ *       type: encode type 0x01 general 0x02 enhance
+ *       pcm_data: save pcm data after decode
+ *       size: save pcm data buf len
+ *
+ * Explain:
+ *       module can call this function poc task have defined  
+ *
+ * Example:
+ *       
+ * 
+ * Return:
+ *       -1 fail  >0 pcm data len
+ *
+ */
+int decode_record_data(char *enc_data, int len, int type, char *pcm_data, int size)
 #endif

+ 39 - 1
lib/gwsd/readme.txt

@@ -89,4 +89,42 @@ V1.1.26
 ---1.优化对讲和TTS冲突问题
 
 V1.1.27
----1.针对Cat1网络延时问题延长个别命令超时时间
+---1.针对Cat1网络延时问题延长个别命令超时时间
+
+V1.1.28
+---1.优化最小系统升级
+
+V1.1.29
+---1.优化个别TTS播报(针对外部播放TTS)
+---2.增加设备信息上报命令
+
+V1.1.30
+---1.优化远程放号
+---2.增加自定义心跳周期设置命令(5-55s)
+
+V1.1.31
+---1.修改设置方案商信息后出现的无法登陆问题
+
+V1.1.32
+---1.增加时区设置
+
+V1.1.33
+---1.针对个别模块提供放号通知
+
+V1.1.34
+---1.增加基站定位功能
+
+V1.1.35
+---1.优化基站定位功能
+---2.增加位置信息上报功能
+---3.针对OpenCpu模式增加语音数据上报功能和解码功能
+
+V1.1.36(此版本后需要模块支持3路TCP连接,1路UDP连接)
+---1.增加天气信息获取功能
+---2.优化上报流程
+
+V1.1.37
+---1.优化天气信息获取
+
+V1.1.38
+---1.优化异步socket

BIN
lib/gwsd/version_V1.1.27.rar