Forráskód Böngészése

T555_V03026
1、老师不支持任务录音,重听以及排名查看
2、关机触发后有菜单让用户选择是否关机
3、修复掉线再登录有可能显示有残留问题
4、POC更新到V03016

wangjianlin 3 éve
szülő
commit
4a20a6fdea
13 módosított fájl, 106 hozzáadás és 21 törlés
  1. BIN
      Released/T555_V03026.rar
  2. 7 1
      Released/releasenote.txt
  3. 35 5
      app/app.c
  4. 1 0
      app/app.h
  5. 1 2
      app/appAuth.c
  6. 2 0
      app/includes.h
  7. 34 7
      app/learn/learnTask.c
  8. 1 1
      app/ohpoc.h
  9. 8 4
      app/uiBlock.c
  10. 8 0
      app/uiEntry.c
  11. 2 0
      app/uiEntry.h
  12. BIN
      lib/libohpoc.a
  13. 7 1
      记录.txt

BIN
Released/T555_V03026.rar


+ 7 - 1
Released/releasenote.txt

@@ -105,4 +105,10 @@ V03025
 7、学习菜单内容支持上下翻动
 8、修复学习任务(5个时)上移至顶出现"无数据问题"
 9、修复学习任务完成与未完成图标显示不正确问题
-10、添加掉线亮屏动作
+10、添加掉线亮屏动作
+
+V03026
+1、老师不支持任务录音,重听以及排名查看
+2、关机触发后有菜单让用户选择是否关机
+3、修复掉线再登录有可能显示有残留问题
+4、POC更新到V03016

+ 35 - 5
app/app.c

@@ -81,20 +81,50 @@ static void uiProcess(unsigned int exeInterval){
 	uiLoop(exeInterval);
 	uiResponse(exeInterval);
 }
-/*触发关机操作*/
-static void pwrShutPro(unsigned int exeInterval){
-	static char shutFlag=0;
+static void pwrKeyDetect(unsigned int exeInterval){
 	static int kcnt=0;
 	if(sutApp.pwrKeyStatus==0){//按下了
 		kcnt++;
 		appSleepCtl(ASLEEP_PWRKEY, 1);
 		if(kcnt==(2500/exeInterval)){
-			appSleepCtl(ASLEEP_PWR, 1);
+			if(sutApp.activePwrShut==0){
+				sutApp.activePwrShut=1;
+				uISetNextStatus(UIS_MENU_SHUT_UI);
+			}
 		}
 	}else{//放开了
 		kcnt=0;
-		appSleepCtl(ASLEEP_PWRKEY, 0);
+		if(sutApp.activePwrShut==0) appSleepCtl(ASLEEP_PWRKEY, 0);
 	}
+}
+
+void uiShowShutOption(char update){
+	if(update){
+		guiClearAll(guiGetBackColor());
+		guiShowCaption(0,"关机",UI_STATUS_ITEM_Y+1,guiGetBackColor(),guiGetForeColor(),FONT_MODE_12X12);
+		guiShowMessageBox("确定关机?");
+		uiMenuShowBottomLine();
+		uiMenuShowBottomIndacitor("确定", "取消");
+		return;
+	}
+}
+void uiShowShutOptionResponse(void){
+	switch(getKeyValue()){
+		case MKEY_VALUE_MENU:
+			appSleepCtl(ASLEEP_PWR, 1);
+			uISetNextStatus(UIS_STANDBY);
+			break;
+		case MKEY_VALUE_ESC:
+			sutApp.activePwrShut=0;
+			uISetNextStatus(UIS_STANDBY);
+			break;
+	}
+}
+/*触发关机操作*/
+static void pwrShutPro(unsigned int exeInterval){
+	static char shutFlag=0;
+	
+	pwrKeyDetect(exeInterval);
 	if(getAppObjStatus(ASLEEP_PWR) == 0) return;
 	CTL_LCD_BL(1);
 	msgAtSend("AT+POC=050000\r\n");

+ 1 - 0
app/app.h

@@ -58,6 +58,7 @@ typedef struct{
 	unsigned char earStatus:1;
 	unsigned char authReady:1;
 	unsigned char pwrKeyStatus:1;//开关机键状态
+	unsigned char activePwrShut:1;//是否触发了关机界面
 	unsigned int appSleepStatus;//APP是否可以休眠
 	ACCOUNT_DEF account;
 	int g_iCSQ;

+ 1 - 2
app/appAuth.c

@@ -140,8 +140,7 @@ bool handshake=false;
 void localAuthNow(void){
 	static char showFlag=0;
 	static unsigned int cnt=0;
-#if 0
-	//test
+#ifdef DEVELOP_MODE
 	sutApp.authReady=1;
 	return;
 #endif

+ 2 - 0
app/includes.h

@@ -64,4 +64,6 @@
 //#define MAKE_IT_COMMON_VERSION
 
 //#define ENABLE_ANT_MODE
+
+//#define DEVELOP_MODE  //研发模式:不授权,手刷不恢复默认生产PSN。 正式时不能开此宏
 #endif

+ 34 - 7
app/learn/learnTask.c

@@ -196,6 +196,10 @@ char *getLearnGName(void){return usr.gname;}
 char *getLearnToken(void){return usr.token;}
 double getLearnSpeedParam(void){return usr.scoreSpeedParam;}
 bool isUserInfoReady(void){return usr.ready;}
+bool isUserStudent(void){//type为0是老师,否则为学生
+	if(usr.type==0) return false;
+	else return true;
+}
 void learnUserInfoClear(void){usr.ready=false;}
 /*
 {"uid":"5028","groupName":"测试组3","gid":"21731","nickname":"用户30","type":"1","token":"120a1a7436"}
@@ -1084,9 +1088,9 @@ void learnRecSetVol(unsigned char newVol){
 }
 static void learnShowResult(void);
 static void learnShowStartScreen(void){
-	const char *repeatListen="[PTT]录音";
-	if(usr.type==1) uiMenuShowBottomIndacitor("[OK]重听", repeatListen);
-	else uiMenuShowBottomIndacitor(NULL, repeatListen);
+	//const char *repeatListen="[PTT]录音";
+	if(isUserStudent()==true) uiMenuShowBottomIndacitor("[OK]重听", "[PTT]录音");
+	else uiMenuShowBottomIndacitor(NULL, "返回");
 }
 /*播放录音中止/完成后,返回原定界面及操作*/
 void learnRetrunStatus(void){
@@ -1209,7 +1213,16 @@ void uiShowLearnTaskDetailResponse(void){
 	unsigned char *pcm;
 	unsigned int plen;
 	unsigned short key=getKeyValue();
-	
+	if(isUserStudent()==false){
+		//如果是老师身份,只能按上下键和返回键了
+		switch(key){
+			case MKEY_VALUE_ESC:
+			case MKEY_VALUE_UP:
+			case MKEY_VALUE_DOWN:
+				break;
+			default: return;
+		}
+	}
 	if(MKEY_VALUE_ESC==key){
 		switch(learnRecordStatus){
 			case LEARN_REC_IDLE://未录音,退出
@@ -1233,7 +1246,7 @@ void uiShowLearnTaskDetailResponse(void){
 	}else if(MKEY_VALUE_PTT==key){
 		switch(learnRecordStatus){
 			case LEARN_REC_IDLE://选择了录音做作业
-				if(usr.type != 1){
+				if(isUserStudent()==false){
 					MSG_WARN(1, "Only student have rec feature!");
 					break;
 				}
@@ -1336,6 +1349,8 @@ static void learnRecordDoneProcess(void){
 
 //学习排名菜单
 void uiShowLearnRank(char update){
+	static char machine=0;
+	static unsigned int timer;
 	static const char *rankMode[]={
 		"月排名",
 		"周排名",
@@ -1348,16 +1363,28 @@ void uiShowLearnRank(char update){
 	};
 	char Freatrue[2]={0,1};
 	if(update){
-		sdMount();
+		machine==0;
+		if(isUserStudent()==true) sdMount();
 		guiClearAll(guiGetBackColor());
 		guiShowCaption(0,"学习排名",UI_STATUS_ITEM_Y+1,guiGetBackColor(),guiGetForeColor(),FONT_MODE_12X12);
 		uiMenuShowBottomLine();
-		ListBoxInit(&sutListBox, rankMode, 0, learnIcon, Freatrue);
 		uiMenuShowBottomIndacitor("查看", "返回");
+		if(isUserStudent()==true) ListBoxInit(&sutListBox, rankMode, 0, learnIcon, Freatrue);
+		else{
+			machine=1;
+			guiShowMessageBox("老师不支持排名");
+			uTimerStart(&timer, 1000);
+		}
+	}
+	if(machine==1){
+		if(uTimerExpired(&timer)){
+			 uISetNextStatus(UIS_MENU_MAIN);
+		}
 	}
 }
 void LearnRankSelResponse(void){
 	unsigned short key=ListBoxResponse(&sutListBox);
+	if(isUserStudent()==false) return;
 	if(MKEY_VALUE_ESC==key){
 		sdUnmount();
 		uISetNextStatus(UIS_MENU_MAIN);

+ 1 - 1
app/ohpoc.h

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

+ 8 - 4
app/uiBlock.c

@@ -239,7 +239,11 @@ void uiShowMainInterface(char status,unsigned int exeInterval){
 	if(tmpStatus){
 		guiClearAll(guiGetBackColor());
 		guiShowCaption(0,"加速度语音系统", UI_STATUS_ITEM_Y+1,guiGetBackColor(),guiGetForeColor(),FONT_MODE_12X12);
+	#ifdef DEVELOP_MODE
+		guiShowStr(1, UI_BOTTOM_SHOW_Y,"研发版本", FONT_MODE_12X12, REVERSED_NO,guiGetBackColor(),COLOR_STATUS_BAR);
+	#else
 		guiShowStr(1, UI_BOTTOM_SHOW_Y,"菜单", FONT_MODE_12X12, REVERSED_NO,COLOR_STATUS_BAR, guiGetBackColor());
+	#endif
 		danhu=sutPocStatus.danHuStatus;
 		uiShowGuaDuan(danhu);
 		lastFlag=-1;
@@ -374,8 +378,8 @@ static void uiShowGUName(int update){
 	}
 }
 void uiShowLearnGName(const char *name){
+	guiClearRect(2, UI_LEARN_SHOW_Y, GLCD_WIDTH-1, UI_LEARN_SHOW_Y+16, guiGetBackColor());
 	guiShowBmp(2, UI_LEARN_SHOW_Y, "Group2.bmp");
-	guiClearRect(2+16, UI_LEARN_SHOW_Y, GLCD_WIDTH-1, UI_LEARN_SHOW_Y+16, guiGetBackColor());
 	guiShowStr(2+16, UI_LEARN_SHOW_Y, "学习组:", FONT_MODE_16X16, REVERSED_NO,guiGetForeColor(),guiGetBackColor());
 	guiShowStr(2+16+56, UI_LEARN_SHOW_Y,name, FONT_MODE_16X16, REVERSED_NO,guiGetForeColor(),guiGetBackColor());
 }
@@ -385,23 +389,24 @@ static void uiShowGuaDuan(unsigned char danhu){
 }
 static void uiShowGroup(const char* info){
 	unsigned int color=guiGetForeColor();
+	guiClearRect(2, UI_GROUP_SHOW_Y, GLCD_WIDTH-1, UI_GROUP_SHOW_Y+16, guiGetBackColor());
 	if(sutPocStatus.danHuStatus==0) guiShowBmp(2, UI_GROUP_SHOW_Y, "Group2.bmp");
 	else{
 		guiShowBmp(2, UI_GROUP_SHOW_Y, "Onecall.bmp");
 		color=COLOR_RED;
 	}
-	guiClearRect(2+16, UI_GROUP_SHOW_Y, GLCD_WIDTH-1, UI_GROUP_SHOW_Y+16, guiGetBackColor());
 	guiShowStr(2+16, UI_GROUP_SHOW_Y, "对讲组:", FONT_MODE_16X16, REVERSED_NO,color,guiGetBackColor());
 	guiShowStr(2+16+56, UI_GROUP_SHOW_Y,info, FONT_MODE_16X16, REVERSED_NO,color,guiGetBackColor());
 }
 static void uiShowUser(const char* info){
+	guiClearRect(2, UI_USER_SHOW_Y, GLCD_WIDTH-1, UI_USER_SHOW_Y+16, guiGetBackColor());
 	guiShowBmp(2, UI_USER_SHOW_Y, "people2.bmp");
-	guiClearRect(2+16, UI_USER_SHOW_Y, GLCD_WIDTH-1, UI_USER_SHOW_Y+16, guiGetBackColor());
 	guiShowStr(2+16, UI_USER_SHOW_Y,"昵称:", FONT_MODE_16X16, REVERSED_NO,guiGetForeColor(),guiGetBackColor());
 	guiShowStr(2+16+40, UI_USER_SHOW_Y,info, FONT_MODE_16X16, REVERSED_NO,guiGetForeColor(),guiGetBackColor());
 }
 static void uiShowHuaQuan(const char* info,char type){
 	unsigned int color=guiGetForeColor();
+	guiClearRect(2, UI_VOICE_SHOW_Y, GLCD_WIDTH-1, UI_VOICE_SHOW_Y+16, guiGetBackColor());
 	if(type==0) guiShowBmp(2, UI_VOICE_SHOW_Y, "Phone.bmp");
 	else if(type==1){
 		color=COLOR_RED;
@@ -410,7 +415,6 @@ static void uiShowHuaQuan(const char* info,char type){
 		guiShowBmp(2, UI_VOICE_SHOW_Y, "Creceive.bmp");
 		color=COLOR_DEEP_GREEN;
 	}
-	guiClearRect(2+16, UI_VOICE_SHOW_Y, GLCD_WIDTH-1, UI_VOICE_SHOW_Y+16, guiGetBackColor());
 	guiShowStr(2+16, UI_VOICE_SHOW_Y,info, FONT_MODE_16X16, REVERSED_NO,color,guiGetBackColor());
 }
 static void uiShowCallUserName(void){

+ 8 - 0
app/uiEntry.c

@@ -173,6 +173,10 @@ void uiLoop(unsigned int exeInterval){
 		case UIS_MENU_LOCATION_NOTICE_DETAIL:
 			uiShowLearnNoticeDetailShow(StatusUpdate);
 			break;
+			
+		case UIS_MENU_SHUT_UI:
+			uiShowShutOption(StatusUpdate);
+			break;
 	}
 }
 /********************************UIÏìÓ¦¹¦ÄÜ********************************/
@@ -331,6 +335,10 @@ void uiResponse(unsigned int exeInterval){
 		case UIS_MENU_LOCATION_NOTICE_DETAIL:
 			LearnNoticeDetailResponse();
 			break;
+		
+		case UIS_MENU_SHUT_UI:
+			uiShowShutOptionResponse();
+			break;
 	}
 }
 

+ 2 - 0
app/uiEntry.h

@@ -45,6 +45,8 @@ typedef enum{
 	UIS_MENU_LOCATION_CLASS,//¿Î³Ì±í
 	UIS_MENU_LOCATION_NOTICE,//ÏûϢ֪ͨ
 	UIS_MENU_LOCATION_NOTICE_DETAIL,//֪ͨÏêÇé
+	
+	UIS_MENU_SHUT_UI,
 #ifdef MENU_TEST	
 	UIS_MENU_SYS_TEST
 #endif

BIN
lib/libohpoc.a


+ 7 - 1
记录.txt

@@ -38,4 +38,10 @@ V03015
 3、MIC增益修由8修改为6,同时加大SPK设置
 4、修改EQ
 5、修复白屏概率问题
-6、时间添加冒号闪烁
+6、时间添加冒号闪烁
+
+1、老师不支持任务录音,重听以及排名
+2、关机触发后显示菜单让选择是否关机
+3、修复掉线再登录有可能显示有残留问题
+4、POC更新到V03015
+5、基线更新到N58-R07-STD-OE_V40-002