Merge branch 'Branch_S550_Fast_Emmc' of 192.168.6.216:linux-em-group/s530-ntk into Branch_S550_Emmc
This commit is contained in:
		
						commit
						501eea8aee
					
				|  | @ -2,7 +2,9 @@ | |||
| #include "PrjInc.h" | ||||
| 
 | ||||
| #include "Mode/UIModePhoto.h" | ||||
| 
 | ||||
| #if HUNTING_CAMERA_MCU == ENABLE | ||||
| #include "sf_common.h" | ||||
| #endif | ||||
| #if(WIFI_FUNC==ENABLE) | ||||
| #include "UIModeWifi.h" | ||||
| #endif | ||||
|  | @ -58,6 +60,10 @@ void ModePhoto_Open(void) | |||
|         } | ||||
| 	} | ||||
| #endif | ||||
| 
 | ||||
|     #if HUNTING_CAMERA_MCU == ENABLE | ||||
|     sf_mem_free(); | ||||
|     #endif | ||||
| #endif | ||||
| } | ||||
| void ModePhoto_Close(void) | ||||
|  |  | |||
|  | @ -103,6 +103,7 @@ typedef enum { | |||
| #if defined(_UI_STYLE_LVGL_) | ||||
| 	NVTEVT_UPDATE_LVGL          = 0x80000001, ///< Update lvgl task handel
 | ||||
| #endif | ||||
| 	NVTEVT_MSG_SCREEN_KEY       = 0x80000002, | ||||
| 
 | ||||
| 	/* INSERT NEW EVENT HRER */ | ||||
| 
 | ||||
|  |  | |||
|  | @ -696,12 +696,6 @@ void UserMainProc(void) | |||
|     					g_keyboard_pressed = false; | ||||
| 						leftKeyPressingTime_ms = 0; | ||||
|     				} | ||||
|                     //call input task immediately for read key state
 | ||||
|                     if(indev_keypad){ | ||||
|                     	_lv_user_task_handler_lock(); | ||||
|                         indev_keypad->driver.read_task->task_cb(indev_keypad->driver.read_task); | ||||
|                         _lv_user_task_handler_unlock(); | ||||
|                     } | ||||
| 
 | ||||
|                     /* workaround to extend key release event for lvgl */ | ||||
|                     if((paramArray[0] > NVTEVT_KEY_RELEASE_START) && (paramArray[0] < NVTEVT_KEY_RELEASE_END)){ | ||||
|  | @ -723,6 +717,12 @@ void UserMainProc(void) | |||
|                     		DBG_WRN("evt = %lx\r\n", evt); | ||||
|                     	} | ||||
|                     } | ||||
|                     //call input task immediately for read key state
 | ||||
|                     if(indev_keypad){ | ||||
|                     	_lv_user_task_handler_lock(); | ||||
|                         indev_keypad->driver.read_task->task_cb(indev_keypad->driver.read_task); | ||||
|                         _lv_user_task_handler_unlock(); | ||||
|                     } | ||||
|                     if(paramArray[0] == NVTEVT_KEY_CONTINUE){ | ||||
|                     	uint32_t nvt_user_key = lv_user_keymap_find(evt); | ||||
| 						#define MENU_UNLUCK 0 | ||||
|  |  | |||
|  | @ -409,10 +409,7 @@ INT32 System_OnBoot(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) | |||
|     } | ||||
|     #endif | ||||
|     #if HUNTING_CAMERA_MCU == ENABLE | ||||
|     printf("[%s]:%d sf s\n", __FUNCTION__, __LINE__); | ||||
|     system("sync"); | ||||
|     system("echo 3 >/proc/sys/vm/drop_caches"); | ||||
|     printf("[%s]:%d sf e\n", __FUNCTION__, __LINE__); | ||||
|     sf_mem_free(); | ||||
|     #endif | ||||
| 	return NVTEVT_CONSUME; | ||||
| } | ||||
|  |  | |||
|  | @ -332,11 +332,13 @@ UINT8 sf_cardv_check_power_on_mode(void) | |||
|     char *pStrOtsOk = "Mode="; | ||||
|     char *pStrUpFw = "UpFw="; | ||||
|     char *pStrUpMcu = "mcu="; | ||||
|     char *pStrSF = "sf="; | ||||
| 
 | ||||
|     char *temp = NULL; | ||||
| 	UINT8 startup = 0; | ||||
| 	UINT8 UpFw = 0; | ||||
| 	UINT8 Upmcu = 0; | ||||
| 	UINT8 sftmp = 0; | ||||
| 
 | ||||
|     system("cat /proc/cmdline > /tmp/Mode.txt"); | ||||
|     fp = fopen("/tmp/Mode.txt","r"); | ||||
|  | @ -371,7 +373,13 @@ UINT8 sf_cardv_check_power_on_mode(void) | |||
|             sscanf(temp, "%hhd", &Upmcu); | ||||
|             sf_set_mcu_update_flag(Upmcu); | ||||
| 		} | ||||
|         SLOGI("StartMode=%d,UpFw=%d Upmcu=%d\r\n", startup, UpFw, Upmcu); | ||||
|         temp = strstr(pStrSrc, pStrSF); | ||||
| 		if ( temp != NULL) { | ||||
|             temp += strlen("sf="); | ||||
|             sscanf(temp, "%hhd", &sftmp); | ||||
|             sf_cardv_battery_level_set(sftmp); | ||||
| 		} | ||||
|         SLOGI("StartMode=%d,UpFw=%d Upmcu=%d sftmp=%d\r\n", startup, UpFw, Upmcu, sftmp); | ||||
| 		free(pStrSrc); | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
|  | @ -949,12 +949,7 @@ static void UIFlowMenuCommonItem_ScrOpen(lv_obj_t* obj) | |||
| 	gMenuLuck = MENU_UNLUCK; | ||||
|     #if HUNTING_CAMERA_MCU == ENABLE | ||||
|     sf_set_menu_open(TRUE); | ||||
| 
 | ||||
|     printf("[%s]:%d sf s\n", __FUNCTION__, __LINE__); | ||||
|     system("sync"); | ||||
|     system("echo 3 >/proc/sys/vm/drop_caches"); | ||||
|     printf("[%s]:%d sf e\n", __FUNCTION__, __LINE__); | ||||
| 
 | ||||
|     sf_mem_free(); | ||||
|     #endif | ||||
| 
 | ||||
| } | ||||
|  |  | |||
|  | @ -73,6 +73,7 @@ static BOOL g_PhotoBgInitFileSys = FALSE; | |||
| static BOOL g_SysStrg_Chg = FALSE; | ||||
| //#NT#2023/11/21#Eric - end
 | ||||
| 
 | ||||
| static void UIFlowPhoto_Key(lv_obj_t* obj, uint32_t key); | ||||
| static void sf_show_send_text(lv_obj_t* obj, const unsigned short status); | ||||
| static lv_obj_t *g_preview_info_msgbox = NULL; | ||||
| static lv_obj_t *g_preview_info_label = NULL; | ||||
|  | @ -1797,6 +1798,7 @@ void UIFlowPhoto_UpdateInfo(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* msg) | |||
|             { | ||||
|                 sf_wifi_server_stop_shoot_respond(0); | ||||
|             } | ||||
|             sf_mem_free(); | ||||
|         } | ||||
|         #if HUNTING_CAMERA_MCU == ENABLE | ||||
|         sf_set_cap_statu(FALSE); | ||||
|  |  | |||
|  | @ -2434,7 +2434,6 @@ static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key) | |||
| 
 | ||||
| static void UIFlowPlay_NVTMSG(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* msg) | ||||
| { | ||||
| 
 | ||||
|     switch(msg->event) | ||||
|     { | ||||
|     case NVTEVT_CB_MOVIE_FINISH: | ||||
|  | @ -2506,6 +2505,18 @@ static void UIFlowPlay_NVTMSG(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* ms | |||
| 
 | ||||
|         break; | ||||
|     } | ||||
| 	case NVTEVT_MSG_SCREEN_KEY: | ||||
| 	if (1 == msg->paramNum) | ||||
| 	{ | ||||
|         uint32_t key = msg->paramArray[0]; | ||||
|         if (SELECTION_SHOW_TURE == gSeletionShow) { | ||||
|             Option_play_Selection_Key(obj, key); | ||||
|         } else { | ||||
|             /* handle key event */ | ||||
|             UIFlowPlay_Key(obj, key); | ||||
|         } | ||||
| 	} | ||||
| 	break; | ||||
|     default: | ||||
|         break; | ||||
| 
 | ||||
|  |  | |||
|  | @ -326,7 +326,11 @@ void message_box_wrnmsg_OnKey(lv_obj_t* msgbox, uint32_t key) | |||
| { | ||||
| 	// static uint32_t key22 = LV_KEY_END;
 | ||||
| 	// key22 = key;
 | ||||
| 	// lv_event_send(lv_obj_get_parent(UIFlowWrnMsg), LV_USER_EVENT_KEY_RELEASE, &key22);
 | ||||
| 	if(lv_plugin_scr_count() >= 2){ | ||||
| 		lv_event_send(lv_plugin_scr_by_index(lv_plugin_scr_count() - 2), LV_USER_EVENT_NVTMSG, gen_nvtmsg_data(NVTEVT_MSG_SCREEN_KEY, 1, key)); | ||||
| 	}else{ | ||||
| 		lv_event_send(lv_plugin_scr_act(), LV_USER_EVENT_NVTMSG, gen_nvtmsg_data(NVTEVT_MSG_SCREEN_KEY, 1, key)); | ||||
| 	} | ||||
| 	return; | ||||
| 	switch(key) | ||||
| 	{ | ||||
|  |  | |||
|  | @ -204,4 +204,6 @@ UINT8 sf_get_net_generation(void); | |||
| void sf_set_net_generation(UINT8 value); | ||||
| UINT32 sf_cardv_load_menu_info_start(void); | ||||
| BOOL sf_vos_perf_list_dump(unsigned char argc, char **argv); | ||||
| void sf_mem_free(void); | ||||
| void sf_cardv_battery_level_set(UINT32 val); | ||||
| #endif | ||||
|  |  | |||
|  | @ -2521,7 +2521,18 @@ UINT32 sf_cardv_battery_level_get(void) | |||
| 	return (UINT32)sf_LatestBattLevel; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /*************************************************
 | ||||
|    Function:    sf_battery_level_set | ||||
|    Description: set battery level | ||||
|    Input:  N/A | ||||
|    Output: N/A | ||||
|    Return: N/A | ||||
|    Others: N/A | ||||
| *************************************************/ | ||||
| void sf_cardv_battery_level_set(UINT32 val) | ||||
| { | ||||
| 	sf_LatestBattLevel = val; | ||||
| } | ||||
| /*************************************************
 | ||||
|   Function:    sf_battery_value_get | ||||
|   Description: get battery value x% | ||||
|  | @ -3498,4 +3509,12 @@ BOOL sf_vos_perf_list_dump(unsigned char argc, char **argv) | |||
|     sleep(1); | ||||
|     system("dmesg"); | ||||
| 	return TRUE; | ||||
| } | ||||
| } | ||||
| 
 | ||||
| void sf_mem_free(void) | ||||
| { | ||||
|     printf("[%s]:%d sf s\n", __FUNCTION__, __LINE__); | ||||
|     system("sync"); | ||||
|     system("echo 3 >/proc/sys/vm/drop_caches"); | ||||
|     printf("[%s]:%d sf e\n", __FUNCTION__, __LINE__); | ||||
| } | ||||
|  |  | |||
|  | @ -25,6 +25,7 @@ | |||
| #include "sys_fastboot.h" | ||||
| #if HUNTING_CAMERA_MCU == ENABLE | ||||
| #include "sf_mcu.h" | ||||
| #include "sf_battery.h" | ||||
| #endif | ||||
| #define CFG_BOOTARG_EXTRA_MAX_LEN 0x100 /* for init.d script parsing by (dmesg | grep xxx) */ | ||||
| 
 | ||||
|  | @ -854,7 +855,7 @@ static int make_bootargs(LINUXTMP_PARTITION *p_linuxtmp, unsigned int bootts_beg | |||
|     //     }
 | ||||
|     // }
 | ||||
| 
 | ||||
|     snprintf(PowerOnModeStr, sizeof(PowerOnModeStr), "Mode=%d UpFw=%d mcu=%d",sf_get_power_on_mode(), sf_in_update() , sf_in_mcu_update()); | ||||
|     snprintf(PowerOnModeStr, sizeof(PowerOnModeStr), "Mode=%d UpFw=%d mcu=%d sf=%d",sf_get_power_on_mode(), sf_in_update() , sf_in_mcu_update(), sf_battery_level_get()); | ||||
|     linuxboot_set_extra_bootarg(PowerOnModeStr); | ||||
| #endif | ||||
| 	p_linuxtmp->bootargs_addr = p_linuxtmp->tmp_curr; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 xiehongyan
						xiehongyan