Browse Source

T555_V03021
* POC更新为V03010
* 优化FOTA界面
* 评分显示修改为:设备评分,速度评分和音量评分

wangjianlin 3 years ago
parent
commit
47be89fbdc
7 changed files with 48 additions and 17 deletions
  1. BIN
      Released/T555_V03021.rar
  2. 6 1
      Released/releasenote.txt
  3. 17 6
      app/learn/learnTask.c
  4. 1 1
      app/ohpoc.h
  5. 1 1
      app/poc.c
  6. 23 8
      app/uiBlock.c
  7. BIN
      lib/libohpoc.a

BIN
Released/T555_V03021.rar


+ 6 - 1
Released/releasenote.txt

@@ -75,4 +75,9 @@ V03019
 
 
 V03020
 V03020
 1、POC更新为V03008(支持fota升级)
 1、POC更新为V03008(支持fota升级)
-注意:FOTA升级成功后会重启,下次开机需要按比较长时间(三十秒左右,更新大可能久些)才能启动
+注意:FOTA升级成功后会重启,下次开机需要按比较长时间(三十秒左右,更新大可能久些)才能启动
+
+V03021
+1、POC更新为V03010
+2、优化FOTA界面
+3、评分界面修改为三个评分:设备评分,速度评分和音量评分

+ 17 - 6
app/learn/learnTask.c

@@ -1294,15 +1294,26 @@ void uiShowLearnTaskDetailResponse(void){
 	}
 	}
 }
 }
 static void learnShowResult(void){
 static void learnShowResult(void){
-	double score;
+	double devscore;
+	double speedscore;
+	double volumescore;
 	char info[30];
 	char info[30];
 	unsigned char speed=learnGetRecordRecSpeed();
 	unsigned char speed=learnGetRecordRecSpeed();
+	unsigned int y=UI_CONTENT_SHOW_Y+5;
 	if(speed<=0) speed=1;
 	if(speed<=0) speed=1;
-	score=usr.scoreSpeedParam*speed+usr.scoreVolumeParam*learnGetRecordMaxVolume();
-	snprintf(info, sizeof(info), "Score:%f", score);
-	MSG_INFO(1, "sparam:%f,speed:%d,vparam:%f,volume:%d,scroe:%f",usr.scoreSpeedParam,speed,usr.scoreVolumeParam,learnGetRecordMaxVolume(),score);
-	guiShowMessageBox(info);
-	//guiShowTwoMessage(info1, info2);
+	speedscore=usr.scoreSpeedParam*speed;
+	volumescore=usr.scoreVolumeParam*learnGetRecordMaxVolume();
+	devscore=speedscore+volumescore;
+	guiClearRect(0,UI_CONTENT_SHOW_Y,GLCD_WIDTH-1,GLCD_HEIGHT-16-1,guiGetBackColor());
+	snprintf(info, sizeof(info), "设备评分:%f", devscore);
+	guiShowStr(5, y, info, FONT_MODE_16X16, REVERSED_NO, COLOR_BLACK, guiGetBackColor());
+	y+= 18;
+	snprintf(info, sizeof(info), "速度评分:%f", speedscore);
+	guiShowStr(5, y, info, FONT_MODE_16X16, REVERSED_NO, COLOR_BLACK, guiGetBackColor());
+	y+= 18;
+	snprintf(info, sizeof(info), "音量评分:%f", volumescore);
+	guiShowStr(5, y, info, FONT_MODE_16X16, REVERSED_NO, COLOR_BLACK, guiGetBackColor());
+	y+= 18;
 }
 }
 static void learnRecordDoneProcess(void){
 static void learnRecordDoneProcess(void){
 	
 	

+ 1 - 1
app/ohpoc.h

@@ -7,7 +7,7 @@
 #define OHPOC_APP_NAME "T555"
 #define OHPOC_APP_NAME "T555"
 //#define OHPOC_APP_NAME "RTL-TEST"
 //#define OHPOC_APP_NAME "RTL-TEST"
 
 
-#define OHPOC_VERSION "03020"  //外部OCPU 应用维护
+#define OHPOC_VERSION "03021"  //外部OCPU 应用维护
 #define OHPOC_MODLE	"N58" //作为OPEN时,此值用于FOTA升级标识使用
 #define OHPOC_MODLE	"N58" //作为OPEN时,此值用于FOTA升级标识使用
 #define OHPOC_CUST OHPOC_APP_NAME //作为OPEN时,此值用于FOTA升级标识使用
 #define OHPOC_CUST OHPOC_APP_NAME //作为OPEN时,此值用于FOTA升级标识使用
 
 

+ 1 - 1
app/poc.c

@@ -588,7 +588,7 @@ static void proFotaMsg(char *msg){
 			fotaStepSet(4);
 			fotaStepSet(4);
 		}else if(msg[0]=='1') fotaMsgShow("正在下载");
 		}else if(msg[0]=='1') fotaMsgShow("正在下载");
 		else if(msg[0]=='2'){
 		else if(msg[0]=='2'){
-			fotaMsgShow("下载成功,重启更新");
+			fotaMsgShow("下载成功");
 			fotaStepSet(3);
 			fotaStepSet(3);
 		}
 		}
 	}
 	}

+ 23 - 8
app/uiBlock.c

@@ -1425,6 +1425,13 @@ void fotaMsgShow(char *msg){
 	guiClearRect(0, 60, GLCD_WIDTH-1, 60+16,guiGetBackColor());
 	guiClearRect(0, 60, GLCD_WIDTH-1, 60+16,guiGetBackColor());
 	guiShowStr((GLCD_WIDTH-len)/2,60, msg,FONT_MODE_16X16, REVERSED_NO, COLOR_BLACK, guiGetBackColor());
 	guiShowStr((GLCD_WIDTH-len)/2,60, msg,FONT_MODE_16X16, REVERSED_NO, COLOR_BLACK, guiGetBackColor());
 }
 }
+void fotaMsgShow2(char *msg1, char *msg2){
+	guiClearRect(0, 45, GLCD_WIDTH-1, 45+16+2+16,guiGetBackColor());
+	int len=guiGetStrXLen((char *)msg1,FONT_MODE_16X16);
+	guiShowStr((GLCD_WIDTH-len)/2,45, msg1,FONT_MODE_16X16, REVERSED_NO, COLOR_BLACK, guiGetBackColor());
+	len=guiGetStrXLen((char *)msg2,FONT_MODE_16X16);
+	guiShowStr((GLCD_WIDTH-len)/2,45+16+2, msg2,FONT_MODE_16X16, REVERSED_NO, COLOR_BLACK, guiGetBackColor());
+}
 void uiShowVersionSel(char StatusUpdate){
 void uiShowVersionSel(char StatusUpdate){
 	if(StatusUpdate){
 	if(StatusUpdate){
 		sutApp.fotaVersion[0]=0;
 		sutApp.fotaVersion[0]=0;
@@ -1452,13 +1459,10 @@ void uiShowVersionSel(char StatusUpdate){
 				fotaStep=4;
 				fotaStep=4;
 			}
 			}
 			break;
 			break;
-		case 3://升级成功,等待重启
-			msgAtSend("AT+POC=050000\r\n");//停止POC后复位
-			MSG_INFO(1, "Stop poc");
-			nwy_sleep(2000);
-			msgAtSend("AT+TRB=2\r\n");
-			MSG_INFO(1, "Reset system!!!");
-			while(1){nwy_sleep(1000);}
+		case 3://下载成功
+			nwy_sleep(1000);
+			fotaStep=6;
+			fotaMsgShow2("确定将关机,需长按开","机键直至开机(约60秒)");
 			break;
 			break;
 		case 4://延时显示2秒后退出
 		case 4://延时显示2秒后退出
 			uTimerStart(&fotaTick, 2000);
 			uTimerStart(&fotaTick, 2000);
@@ -1467,12 +1471,14 @@ void uiShowVersionSel(char StatusUpdate){
 		case 5://退出升级流程
 		case 5://退出升级流程
 			if(uTimerExpired(&fotaTick)) uISetNextStatus(UIS_MENU_SYS_SEL);
 			if(uTimerExpired(&fotaTick)) uISetNextStatus(UIS_MENU_SYS_SEL);
 			break;
 			break;
+		case 6:
+			break;
 	}
 	}
 }
 }
 
 
 void uiShowVersionSelResponse(void){
 void uiShowVersionSelResponse(void){
 	unsigned char key=getKeyValue();
 	unsigned char key=getKeyValue();
-	
+	if(fotaStep!=1 && fotaStep!=6) return;
 	if(MKEY_VALUE_ESC==key) uISetNextStatus(UIS_MENU_SYS_SEL);
 	if(MKEY_VALUE_ESC==key) uISetNextStatus(UIS_MENU_SYS_SEL);
 	else if(MKEY_VALUE_MENU==key){
 	else if(MKEY_VALUE_MENU==key){
 		if(fotaStep==1){
 		if(fotaStep==1){
@@ -1480,6 +1486,15 @@ void uiShowVersionSelResponse(void){
 			fotaStep=2;
 			fotaStep=2;
 			msgAtSend("AT+FOTA=1\r\n");
 			msgAtSend("AT+FOTA=1\r\n");
 			uTimerStart(&fotaTick, 10000);
 			uTimerStart(&fotaTick, 10000);
+		}else if(fotaStep==6){
+			if(nwy_version_update(true)<0){
+				MSG_ERR(1, "nwy_version_update failed");
+				fotaMsgShow("升级异常");
+				fotaStep=5;
+			}
+			msgAtSend("AT+TRB=2\r\n");
+			MSG_INFO(1, "Reset system!!!");
+			while(1){nwy_sleep(1000);}
 		}
 		}
 	}
 	}
 }
 }

BIN
lib/libohpoc.a