切换运营商完成后等待三秒
This commit is contained in:
		
							parent
							
								
									07bc5f52bf
								
							
						
					
					
						commit
						0a6cae2911
					
				| 
						 | 
				
			
			@ -310,6 +310,7 @@ static int ProfileFocused = 0;
 | 
			
		|||
static unsigned char ProfileNameList[PROFILE_MAX][PROFILE_NAME_SIZE] = {0};
 | 
			
		||||
int ReadFile = 0;
 | 
			
		||||
int isFirst = 0;
 | 
			
		||||
int isComplete = 0;
 | 
			
		||||
 | 
			
		||||
static int Countdown = 0;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -531,6 +532,7 @@ static void network_scan_task_cb(lv_task_t* task)
 | 
			
		|||
 | 
			
		||||
static void network_select_task_end(void)
 | 
			
		||||
{
 | 
			
		||||
  isComplete = 0;
 | 
			
		||||
  if(network_select_task)
 | 
			
		||||
  {
 | 
			
		||||
    lv_task_del(network_select_task);
 | 
			
		||||
| 
						 | 
				
			
			@ -542,7 +544,7 @@ static void network_select_task_cb(lv_task_t* task)
 | 
			
		|||
{
 | 
			
		||||
  lv_obj_t* obj = (lv_obj_t*)task->user_data;
 | 
			
		||||
 | 
			
		||||
  if(Countdown)
 | 
			
		||||
  if(Countdown && isComplete)
 | 
			
		||||
  {
 | 
			
		||||
    printf("[%s]Countdown:%d\n", __FUNCTION__, Countdown);
 | 
			
		||||
    Countdown--;
 | 
			
		||||
| 
						 | 
				
			
			@ -573,24 +575,19 @@ static void network_select_task_cb(lv_task_t* task)
 | 
			
		|||
    stMessageBuf.cmdId = CMD_DEV;
 | 
			
		||||
    sf_com_message_send_to_app(&stMessageBuf);
 | 
			
		||||
    Countdown = 3;
 | 
			
		||||
    isComplete = 1;
 | 
			
		||||
    break;
 | 
			
		||||
  case 0x34:/*NETWORK_NOT_NEED_SET*/
 | 
			
		||||
    lv_label_set_text(plabel, "\n\nProfile is enabled");
 | 
			
		||||
    Countdown = 3;
 | 
			
		||||
    while (Countdown > 0)
 | 
			
		||||
    {
 | 
			
		||||
      Countdown--;
 | 
			
		||||
      usleep(1000*1000);
 | 
			
		||||
    }
 | 
			
		||||
    network_select_task_end();
 | 
			
		||||
    lv_plugin_scr_close(obj, gen_nvtmsg_data(NVTRET_ENTER_MENU, 0));
 | 
			
		||||
    hidde_Network_Selection_page();
 | 
			
		||||
    isComplete = 1;
 | 
			
		||||
    break;
 | 
			
		||||
  case 0xff:
 | 
			
		||||
    break;
 | 
			
		||||
	default:
 | 
			
		||||
    lv_label_set_text(plabel, "\n\nCurrently network is busy, Please try it later");
 | 
			
		||||
    Countdown = 3;
 | 
			
		||||
    isComplete = 1;
 | 
			
		||||
		break;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user