Selaa lähdekoodia

T555_V03031
1、固件恢复到CB模块:N58-R07-STD-OE_V40-002
2、去掉锁电源IO控制,使用模块关机指令关机
3、适配新固件其它操作

wangjianlin 3 vuotta sitten
vanhempi
commit
7995541887
10 muutettua tiedostoa jossa 37 lisäystä ja 29 poistoa
  1. BIN
      Released/T555_V03031.rar
  2. 6 1
      Released/releasenote.txt
  3. 13 7
      app/app.c
  4. 1 0
      app/app.h
  5. 2 2
      app/board.c
  6. 1 1
      app/board.h
  7. 6 8
      app/learn/learnTask.c
  8. 1 1
      app/ohpoc.h
  9. 5 0
      app/poc.c
  10. 2 9
      app/uiBlock.c

BIN
Released/T555_V03031.rar


+ 6 - 1
Released/releasenote.txt

@@ -137,4 +137,9 @@ V03029
 V03030
 1、POC更新到V03026
 2、固件更新到CB模块:N58-R07-STD-OE_V40_POC-002
-3、调整TTS参数适配CB固件
+3、调整TTS参数适配CB固件
+
+V03031
+1、固件恢复到CB模块:N58-R07-STD-OE_V40-002
+2、去掉锁电源IO控制,使用模块关机指令关机
+3、适配新固件其它操作

+ 13 - 7
app/app.c

@@ -125,16 +125,20 @@ static void pwrKeyDetect(unsigned int exeInterval){
 		if(sutApp.activePwrShut==0) appSleepCtl(ASLEEP_PWRKEY, 0);
 	}
 }
-
+void shutSysNow(void){
+	msgAtSend("AT+POC=050000\r\n");
+	nwy_sleep(200);
+	msgAtSend("AT+CPOF\r\n");
+	nwy_sleep(200);
+}
 static void antModePwrDet(void){
 	static int kcnt=0;
 	if(sutApp.pwrKeyStatus==0){
 		if(++kcnt==3){
 			guiShowMessageBox("正在关机");
-			msgAtSend("AT+TRB=2\r\n");
-			nwy_sleep(1000);
 			CTL_LCD_BL(0);
 			CTL_POWER_HOLD(0);
+			shutSysNow();
 		}
 	}else kcnt=0;
 }
@@ -163,7 +167,6 @@ void uiShowShutOptionResponse(void){
 /*触发关机操作*/
 static void pwrShutPro(unsigned int exeInterval){
 	static char shutFlag=0;
-	
 	pwrKeyDetect(exeInterval);
 	if(getAppObjStatus(ASLEEP_PWR) == 0) return;
 	CTL_LCD_BL(1);
@@ -183,8 +186,7 @@ static void pwrShutPro(unsigned int exeInterval){
 	MSG_INFO(1, "Release pwr");
 	guiFillRect(0,0,GLCD_WIDTH-1,GLCD_HEIGHT-1,guiGetBackColor());//防止下次开机能看到残留
 	CTL_POWER_HOLD(0);
-	nwy_sleep(100);
-	msgAtSend("AT+TRB=2\r\n");//软件复位模块
+	shutSysNow();
 }
 void AntModeRun(void){
 #ifdef ENABLE_ANT_MODE
@@ -221,10 +223,14 @@ void appRun(void){
 	//修改音频输出增益配置
 	modifyAudioOutGainConfig();
 	//设置一下TTS
+	msgAtSend("AT+HTTSSPEED=1284,-20000\r\n");//设置TTS音量
+	msgAtSend("AT+HTTSSPEED=1282,-5000\r\n");//设置TTS语速
+	#if 0
 	msgAtSend("AT+HTTSSPEED=0,-30000\r\n");//设置TTS音量
-	msgAtSend("AT+HTTSSPEED=1,3000\r\n");//设置TTS语速
+	msgAtSend("AT+HTTSSPEED=1,-5000\r\n");//设置TTS语速
 	msgAtSend("AT+HTTSSPEED=4,2\r\n");
 	msgAtSend("AT+HTTSSPEED=18, 2\r\n");
+	#endif
 	msgAtSend("AT+NICEUSE=0\r\n");//不需要快速体验(收话过程抢麦不会跳动话权显示)
 	//查询一下POC版本号
 	msgAtSend("AT+POC_VER\r\n");

+ 1 - 0
app/app.h

@@ -104,4 +104,5 @@ void appSleepCtl(ASLEEP_ENUM ctlType, char status);
 char getAppObjStatus(ASLEEP_ENUM ctlType);
 void volAdjAction(char direction);
 void splVolumeSet(unsigned char level);
+void shutSysNow(void);
 #endif

+ 2 - 2
app/board.c

@@ -164,7 +164,7 @@ static void gpioTask(void *param){
 	gpioOutPutInit(G_KEY_OUT3, 1, nwy_low);
 	gpioOutPutInit(G_LED1, 1, nwy_high);
 	gpioOutPutInit(G_LED2, 1, nwy_low);
-	gpioOutPutInit(G_POWER_HOLD, 1, nwy_high);//开机后即锁住电��?不需要释放,要关机时,发指令软件关机即可
+//	gpioOutPutInit(G_POWER_HOLD, 1, nwy_high);//开机后即锁住电��?不需要释放,要关机时,发指令软件关机即可
 	gpioOutPutInit(G_LCD_BL, 1, nwy_low);
 	gpioOutPutInit(G_SPK_EN, 1, nwy_low);
 	gpioOutPutInit(G_LAN_EN, 1, nwy_low);
@@ -177,7 +177,7 @@ static void gpioTask(void *param){
 	
 	//初始化矩阵按键状?
 	keyStatusCtlAll(0);
-	
+
 	for(;;){
 		nwy_wait_thead_event(nwy_get_current_thread(), &event,0);
 		param1=event.param1;

+ 1 - 1
app/board.h

@@ -74,7 +74,7 @@ typedef enum{
 #define CTL_LED1_RED(bit)   nwy_gpio_set_value(G_LED1,bit)
 #define CTL_LED2_GREEN(bit) nwy_gpio_set_value(G_LED2,bit)
 #define CTL_SD_PWR(bit) 	nwy_gpio_set_value(G_SD_PWR,bit)
-#define CTL_POWER_HOLD(bit) nwy_gpio_set_value(G_POWER_HOLD,bit)
+#define CTL_POWER_HOLD(bit) //nwy_gpio_set_value(G_POWER_HOLD,bit)
 #define CTL_LCD_BL(bit) 	nwy_gpio_set_value(G_LCD_BL,bit)
 #define CTL_SPK_EN(bit) 	nwy_gpio_set_value(G_SPK_EN,bit)
 #define CTL_LAN_EN(bit) 	nwy_gpio_set_value(G_LAN_EN,bit)

+ 6 - 8
app/learn/learnTask.c

@@ -2509,23 +2509,21 @@ void uiShowLearnGroup(char type){
 	S_NOW:
 		uiShowLearnGName(getLearnGName());
 }
-static bool sdMountStatus=false;
+
 void sdUnmount(void){
+	if(nwy_read_sdcart_status()==0) return;
 	sdCardCtl(false);
-	sdMountStatus=false;
 }
 void sdMount(void){
-	if(sdMountStatus==false){
-		sdCardCtl(true);
-		sdMountStatus=true;
-	}
+	if(nwy_read_sdcart_status()!=0) return;
+	sdCardCtl(true);
 }
 bool sdCardTest(void){
 	const char *table="sdTest.txt";
 	char file[50];
 	int fd=NULL;
 	bool ret=false;
-	sdCardCtl(true);
+	sdMount();
 	snprintf(file, sizeof(file), "%s/%s",SD_TOKEN,table);
 	fd = nwy_sdk_fopen(file, NWY_CREAT | NWY_RDWR|NWY_TRUNC);//Çå0ʽ
 	if(fd<0){
@@ -2546,6 +2544,6 @@ bool sdCardTest(void){
 	if(0==memcmp(file, table, strlen(file))) ret=true;
 	SD_END:
 	if(fd != NULL) nwy_sdk_fclose(fd);
-	sdCardCtl(false);
+	sdUnmount();
 	return ret;
 }

+ 1 - 1
app/ohpoc.h

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

+ 5 - 0
app/poc.c

@@ -60,6 +60,7 @@ static void proMicSpk(int mic, int spk);
 void cmdsProcess(char *msg, int len){//ÒÑÈ¥µô»Ø³µ»»ÐÐ
 	int i;
 	char *p,taddr[30],buf[100];
+	static char needSetTTS=1;
 	if(sutApp.pocInitStatus==0) sutApp.pocInitStatus=1;
 	if(sutApp.gtMode==0){
 		appSleepCtl(ASLEEP_POC, 1);
@@ -78,6 +79,10 @@ void cmdsProcess(char *msg, int len){//
 			//spkPro(atoi(buf));
 		}else if(msgCmp(msg, "+HTTS: END")){
 			sutPocStatus.TTS=0;
+			if(needSetTTS!=0){
+				needSetTTS=0;
+				msgAtSend("AT+HTTSSPEED=1282,3000\r\n");
+			}
 		}else if(msgCmp(msg, "+HTTS: START")){
 			paControl(true);
 			sutPocStatus.TTS=1;

+ 2 - 9
app/uiBlock.c

@@ -1258,13 +1258,7 @@ void uiShowSimSelResponse(void){
 			snprintf(buf, sizeof(buf), "AT+SSIM=%d\r\n",sutListBox.handle+1);
 			msgAtSend(buf);
 			guiShowMessageBox("ÇëÖØÆôÉ豸");
-			msgAtSend("AT+TRB=1\r\n");
-			nwy_sleep(100);
-			for(;;){
-				MSG_INFO(1, "card changed, wait user reboot");
-				CTL_POWER_HOLD(0);
-				nwy_sleep(1000);
-			}
+			shutSysNow();
 		}
 		uISetNextStatus(UIS_MENU_SYS_SEL);
 	}
@@ -1555,9 +1549,8 @@ void uiShowVersionSelResponse(void){
 				fotaStep=5;
 				nwy_sleep(1000);
 			}
-			msgAtSend("AT+TRB=2\r\n");
 			MSG_INFO(1, "Reset system!!!");
-			while(1){nwy_sleep(1000);}
+			shutSysNow();
 		}
 	}
 }