|
@@ -492,10 +492,13 @@ void LearnTaskSelResponse(void){
|
|
|
}else if(MKEY_VALUE_ESC==key) learnUpdateStatus(LEARN_RELEASE_DB);
|
|
|
}
|
|
|
}
|
|
|
+//为了给电源键直接返回主界面,此两变量设置全局
|
|
|
+static char *simpleList=NULL;
|
|
|
+static char *simpleListTmp=NULL;
|
|
|
static void LearnTaskProcess(void){
|
|
|
unsigned char ret;
|
|
|
- static char *simpleList=NULL;
|
|
|
- static char *simpleListTmp=NULL;
|
|
|
+// static char *simpleList=NULL;
|
|
|
+// static char *simpleListTmp=NULL;
|
|
|
static cJSON* json=NULL,*item;
|
|
|
cJSON* element,*subEle;
|
|
|
static cJSON* jsonTmp=NULL,*itemTmp;
|
|
@@ -827,7 +830,24 @@ static void LearnTaskProcess(void){
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+/*学习任务选择菜单时按了电源键返回主菜单*/
|
|
|
+void taskSelBackToStandby(bool status){
|
|
|
+ int i;
|
|
|
+ if(LEARN_WAIT_RESPONSE==getLearnStatus() || status==true){
|
|
|
+ MSG_INFO(1, "Release DB For pwr to standby");
|
|
|
+ releaseBuf(&simpleList);
|
|
|
+ releaseBuf(&simpleListTmp);
|
|
|
+ releaseBuf(&sutJson.bufList);
|
|
|
+ releaseJson(&sutJson.jsonList);
|
|
|
+ for(i=0;i<PAGE_SIZE;i++){
|
|
|
+ releaseBuf(&sutJson.bufTask[i]);
|
|
|
+ releaseJson(&sutJson.jsonTask[i]);
|
|
|
+ }
|
|
|
+ sdUnmount();
|
|
|
+ uISetNextStatus(UIS_STANDBY);
|
|
|
+ needUpdate=1;
|
|
|
+ }
|
|
|
+}
|
|
|
////////////////////////http 获取文件数据处理///////////////////////
|
|
|
//#define USE_TEST_TASK //使用自己定义的任务
|
|
|
static void cJSONSaveTaskFile(const char *jsonMsg);
|
|
@@ -1108,6 +1128,34 @@ static void learnRecordDoneProcess(void);
|
|
|
static void learnDetailBackToTaskListMenu(void){
|
|
|
uISetNextStatus(UIS_MENU_TASK_SEL);//返回上层菜单
|
|
|
}
|
|
|
+
|
|
|
+/*学习任务直接返回待机界面操作*/
|
|
|
+void taskBackToStandby(void){
|
|
|
+ bool needtoreleased=false;
|
|
|
+ bool needtofreeed=false;
|
|
|
+ switch(learnRecordStatus){
|
|
|
+ case LEARN_REC_IDLE:
|
|
|
+ case LEARN_REC_DONE:
|
|
|
+ case LEARN_UPLOAD_CONFIRM:
|
|
|
+ needtofreeed=true;
|
|
|
+ needtoreleased=true;
|
|
|
+ break;
|
|
|
+ case LEARN_REC_PLY:
|
|
|
+ learnStopPlaying();
|
|
|
+ needtofreeed=true;
|
|
|
+ needtoreleased=true;
|
|
|
+ break;
|
|
|
+ case LEARN_REC_BUSY:
|
|
|
+ learnRecordFree();
|
|
|
+ learnStopRecord();
|
|
|
+ needtofreeed=true;
|
|
|
+ needtoreleased=true;
|
|
|
+ break;
|
|
|
+ default:break;//其它状态不能动
|
|
|
+ }
|
|
|
+ if(true==needtofreeed) learnRecordBufRelease();
|
|
|
+ if(true==needtoreleased) taskSelBackToStandby(true);
|
|
|
+}
|
|
|
/*任务查看*/
|
|
|
void uiShowLearnTaskDetail(char update){
|
|
|
unsigned char ret;
|
|
@@ -1537,6 +1585,15 @@ void LearnRankDetailSelResponse(void){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+void rankSelBackToStandby(void){
|
|
|
+ sdUnmount();
|
|
|
+ uISetNextStatus(UIS_STANDBY);
|
|
|
+}
|
|
|
+void rankBackToStandby(void){
|
|
|
+ learnRankReleaseDB();
|
|
|
+ rankSelBackToStandby();
|
|
|
+}
|
|
|
+
|
|
|
typedef struct{
|
|
|
int week;
|
|
|
char time[15];
|
|
@@ -1676,6 +1733,12 @@ void LearnClassDetailResponse(void){
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+void classBackToStandby(void){
|
|
|
+ if(classShowReady==false) return;
|
|
|
+ learnClassReleaseDB();
|
|
|
+ sdUnmount();
|
|
|
+ uISetNextStatus(UIS_STANDBY);
|
|
|
+}
|
|
|
|
|
|
typedef struct{
|
|
|
int id;
|
|
@@ -1810,6 +1873,16 @@ void LearnNoticeResponse(void){
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+void noticeBackToStandby(void){
|
|
|
+ if(noticeShowReady==false) return;
|
|
|
+ noticeShowReady=false;
|
|
|
+ learnNoticeReleaseDB();
|
|
|
+ learnClassReleaseDB();
|
|
|
+ sdUnmount();
|
|
|
+ uISetNextStatus(UIS_STANDBY);
|
|
|
+}
|
|
|
+
|
|
|
bool noticeDetailReady=false;
|
|
|
/*消息通知详情*/
|
|
|
void uiShowLearnNoticeDetailShow(char update){
|
|
@@ -1873,6 +1946,17 @@ void LearnNoticeDetailResponse(void){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+void noticeDetailBackToStandby(void){
|
|
|
+ if(noticeDetailReady==false) return;
|
|
|
+ noticeShowReady=false;
|
|
|
+ noticeDetailReady=false;
|
|
|
+ learnNoticeReleaseDB();
|
|
|
+ learnClassReleaseDB();
|
|
|
+ sdUnmount();
|
|
|
+ uISetNextStatus(UIS_STANDBY);
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
#define OBJECT_AVG_NAME "avg"
|
|
|
#define OBJECT_SCORE_NAME "score"
|
|
|
#define OBJECT_RANKING_NAME "ranking"
|