From f3f13e5879cb5431ac5b46c9822b3148d99d6dcb Mon Sep 17 00:00:00 2001 From: "sober.song" Date: Tue, 2 Jan 2024 18:37:54 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=8C=87=E5=AE=9Ammc=E8=AE=BE=E5=A4=87dcf=5Fhandle=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../init.d/S10_SysInit2 | 2 -- .../cardv/SrcCode/System/SF_SysStrgMng.c | 5 ++++ .../cardv/SrcCode/System/SF_SysStrgMng.h | 2 +- .../source/cardv/SrcCode/System/SysStrg_CB.c | 2 +- .../SrcCode/UIApp/Photo/UIAppPhoto_Exe.c | 30 ++++++++++++++++++- .../UIFlowLVGL/UIFlowPhoto/UIFlowPhotoFuncs.c | 24 +++++++++++++++ 6 files changed, 60 insertions(+), 5 deletions(-) diff --git a/BSP/root-fs/rootfs/etc_Model/etc_565_HUNTING_EVB_LINUX_4G_S550/init.d/S10_SysInit2 b/BSP/root-fs/rootfs/etc_Model/etc_565_HUNTING_EVB_LINUX_4G_S550/init.d/S10_SysInit2 index 6ca4560e6..7d8e9c468 100755 --- a/BSP/root-fs/rootfs/etc_Model/etc_565_HUNTING_EVB_LINUX_4G_S550/init.d/S10_SysInit2 +++ b/BSP/root-fs/rootfs/etc_Model/etc_565_HUNTING_EVB_LINUX_4G_S550/init.d/S10_SysInit2 @@ -201,8 +201,6 @@ ${PREFIX}/lib/modules/$KERVER/hdal/kdrv_videoout/fbdev/nvt_fb.ko #insmod ${PREFIX}/lib/modules/$KERVER/hdal/comm/usb2dev/nvt_usb2dev.ko #fi -mount /dev/mmcblk1p1 /mnt/sd2 - if [ -f /usr/bin/isp_demon ]; then /usr/bin/isp_demon else diff --git a/code/application/source/cardv/SrcCode/System/SF_SysStrgMng.c b/code/application/source/cardv/SrcCode/System/SF_SysStrgMng.c index 05d76076e..048d523d0 100755 --- a/code/application/source/cardv/SrcCode/System/SF_SysStrgMng.c +++ b/code/application/source/cardv/SrcCode/System/SF_SysStrgMng.c @@ -81,6 +81,11 @@ void SF_StrgUnInit(void) pMMCDev = NULL; } +int SF_GetMMCDevHandle(MMC_DEV_TYPE dev_type) +{ + return sf_mmc_dev[dev_type]->dcf_handle; +} + void SF_StrgSetDcfHandle(UINT32 strg_id, UINT32 handle) { sf_mmc_dev[strg_id]->dcf_handle = handle; diff --git a/code/application/source/cardv/SrcCode/System/SF_SysStrgMng.h b/code/application/source/cardv/SrcCode/System/SF_SysStrgMng.h index 3f41d8abe..c480c677f 100755 --- a/code/application/source/cardv/SrcCode/System/SF_SysStrgMng.h +++ b/code/application/source/cardv/SrcCode/System/SF_SysStrgMng.h @@ -87,7 +87,7 @@ SF_ST_MMC_DEV *SF_StrgCheckWorkableDev(void); void SF_SetMMCDev(SF_ST_MMC_DEV *pDev); SF_ST_MMC_DEV *SF_GetMMCDev(void); int sf_mmc_dev_check_start(void); - +int SF_GetMMCDevHandle(MMC_DEV_TYPE dev_type); diff --git a/code/application/source/cardv/SrcCode/System/SysStrg_CB.c b/code/application/source/cardv/SrcCode/System/SysStrg_CB.c index afa884a29..8095a2660 100755 --- a/code/application/source/cardv/SrcCode/System/SysStrg_CB.c +++ b/code/application/source/cardv/SrcCode/System/SysStrg_CB.c @@ -54,7 +54,7 @@ void Strg_CB(UINT32 event, UINT32 param1, UINT32 param2) SF_MESSAGE_BUF_S stMessageBuf = {0}; #endif - DBG_IND("Strg_CB: strg_id = %d, status = %d\n", param1, param2); + printf("Strg_CB: strg_id = %d, status = %d\n", param1, param2); switch (event) { // part-1 case SYSTEM_CB_CONFIG: diff --git a/code/application/source/cardv/SrcCode/UIApp/Photo/UIAppPhoto_Exe.c b/code/application/source/cardv/SrcCode/UIApp/Photo/UIAppPhoto_Exe.c index d7d354bc8..66f02929b 100755 --- a/code/application/source/cardv/SrcCode/UIApp/Photo/UIAppPhoto_Exe.c +++ b/code/application/source/cardv/SrcCode/UIApp/Photo/UIAppPhoto_Exe.c @@ -766,12 +766,40 @@ UINT32 PhotoExe_GetFreePicNum(void) UINT32 PhotoExe_GetTotalPicNum(void) { - UINT64 uiSpace; + UINT64 uiSpace = 0; UINT32 totalImgNum; UINT32 reserveSize = 0x80000; // 500KB UINT32 CaptureSize; UINT32 size; +#if USE_MMC_DEV_CHECK + + SF_ST_MMC_DEV *mmc_dev = SF_GetMMCDev(); + if(mmc_dev == NULL) + { + DBG_ERR("No MMC_Dev Can use!\n"); + return 0; + } + if(mmc_dev->dcf_handle < 0) + { + DBG_ERR("dcf_handle err!\n"); + return 0; + } + +#endif + +#if USE_MMC_DEV_CHECK + + if(mmc_dev->dev_type == MMC_DEV_SD) + { + uiSpace = FileSys_GetDiskInfoEx('A', FST_INFO_DISK_SIZE); + } + else if(mmc_dev->dev_type == MMC_DEV_EMMC) + { + uiSpace = FileSys_GetDiskInfoEx('B', FST_INFO_DISK_SIZE); + } +#else uiSpace = FileSys_GetDiskInfo(FST_INFO_DISK_SIZE); +#endif //DBG_IND("[cap]Free Space = %d KB\r\n", uiSpace / 1024); diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPhoto/UIFlowPhotoFuncs.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPhoto/UIFlowPhotoFuncs.c index f030b989a..9c0f3714d 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPhoto/UIFlowPhotoFuncs.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPhoto/UIFlowPhotoFuncs.c @@ -14,6 +14,8 @@ #define __DBGFLT__ "*" //*=All, [mark]=CustomClass #include +#include "SF_SysStrgMng.h" + PHOTO_TASK_DATA gPhotoData = { 0 }; static UINT32 g_uiFreePicNum = 0; @@ -28,7 +30,29 @@ CHAR *Get_FreePicNumString(UINT32 uiValue) return 0; } unsigned long fileCount = 0; +#if USE_MMC_DEV_CHECK + + SF_ST_MMC_DEV *mmc_dev = SF_GetMMCDev(); + if(mmc_dev == NULL) + { + DBG_ERR("No MMC_Dev Can use!\n"); + return NULL; + } + if(mmc_dev->dcf_handle < 0) + { + DBG_ERR("dcf_handle err!\n"); + return NULL; + } +#endif + +#if USE_MMC_DEV_CHECK + if(mmc_dev->dev_type != MMC_DEV_NO) + { + fileCount = DCF_GetDBInfoEx(mmc_dev->dcf_handle, DCF_INFO_TOL_FILE_COUNT); + } +#else fileCount = DCF_GetDBInfo(DCF_INFO_TOL_FILE_COUNT); +#endif snprintf(g_cFreePicNumStr, sizeof(g_cFreePicNumStr), "%05ld/%05ld", fileCount, uiValue); return g_cFreePicNumStr; } From c52799986933021388b2d250b5f1b48edcf5d4e5 Mon Sep 17 00:00:00 2001 From: payton Date: Tue, 2 Jan 2024 20:30:15 +0800 Subject: [PATCH 02/13] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E8=BF=90=E8=90=A5?= =?UTF-8?q?=E5=95=86=E4=BF=A1=E6=81=AF=E6=B2=A1=E6=9C=89=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIInfo/UIInfo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIInfo/UIInfo.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIInfo/UIInfo.c index 394467c8b..d82e3bf24 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIInfo/UIInfo.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIInfo/UIInfo.c @@ -2354,6 +2354,7 @@ void sf_power_on_para_check_init(void) puiPara->FristSendDailyAndGps = 1; puiPara->GpsSendFlag = 0; memset(puiPara->SimIccid,'\0',sizeof(puiPara->SimIccid)); + memset(puiPara->ServiceProvider,'\0',sizeof(puiPara->ServiceProvider)); } else if(PowerOnMode == PWR_ON_TIME_SYNC) { From 8240b1658083b048513dd33b76d9cbc517b1dec3 Mon Sep 17 00:00:00 2001 From: payton Date: Tue, 2 Jan 2024 20:35:39 +0800 Subject: [PATCH 03/13] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8Dsd2=20failed=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../init.d/S07_SysInit | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/BSP/root-fs/rootfs/etc_Model/etc_565_HUNTING_EVB_LINUX_4G_S550/init.d/S07_SysInit b/BSP/root-fs/rootfs/etc_Model/etc_565_HUNTING_EVB_LINUX_4G_S550/init.d/S07_SysInit index 1d49975e0..6f507a2ce 100755 --- a/BSP/root-fs/rootfs/etc_Model/etc_565_HUNTING_EVB_LINUX_4G_S550/init.d/S07_SysInit +++ b/BSP/root-fs/rootfs/etc_Model/etc_565_HUNTING_EVB_LINUX_4G_S550/init.d/S07_SysInit @@ -72,10 +72,16 @@ insmod /etc/lib/modules/$KERVER/extra/fs/exfat/exfat.ko #mdev -s -# Scan for without insert card -if [ ! -f /tmp/.nvt_mounts ]; then - /etc/mdev-script/autosd.sh - rm -rf /tmp/.nvt_mounts; +if [ -d "/sys/class/block/mmcblk0p1" ]; then + mknod /dev/mmcblk0p1 b `cat /sys/class/block/mmcblk0p1/dev | sed "s/:/\ /g"` +fi + +if [ -d "/sys/class/block/mmcblk1p1" ]; then + mknod /dev/mmcblk1p1 b `cat /sys/class/block/mmcblk1p1/dev | sed "s/:/\ /g"` fi -echo "fs" > /proc/nvt_info/bootts +# Scan for without insert card +if [ ! -f /tmp/.nvt_mounts ]; then + /etc/mdev-script/autosd.sh + rm -rf /tmp/.nvt_mounts; +fi From 86d43cbb8c16e5ecfaa1623ff4fabbb2317b4c19 Mon Sep 17 00:00:00 2001 From: payton Date: Tue, 2 Jan 2024 20:59:53 +0800 Subject: [PATCH 04/13] =?UTF-8?q?1.=E8=BF=98=E5=8E=9F=E5=BF=AB=E6=8D=B7?= =?UTF-8?q?=E5=85=B3=E6=9C=BA=EF=BC=8C=E4=BD=BF=E7=94=A8=E5=86=99mcu?= =?UTF-8?q?=E5=85=B3=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sf_app/code/source/systemMng/sf_commu_mcu.c | 12 +----------- .../lib/source/sifar/code/source/mcu/sf_mcu_client.c | 9 +-------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/code/application/source/sf_app/code/source/systemMng/sf_commu_mcu.c b/code/application/source/sf_app/code/source/systemMng/sf_commu_mcu.c index b9eca674a..bba817877 100755 --- a/code/application/source/sf_app/code/source/systemMng/sf_commu_mcu.c +++ b/code/application/source/sf_app/code/source/systemMng/sf_commu_mcu.c @@ -964,17 +964,7 @@ unsigned char sf_commu_parse_mcu_data(unsigned char * src, unsigned int len) { sf_set_pir_statu_flag(0); sf_set_module_sleep_flag(0); - if((PWR_ON_SETUP != sf_poweron_type_get()) && (PWR_ON_USB!= sf_poweron_type_get())) - { - printf("[power off] %s(%d)\n", __FUNCTION__, __LINE__); - sf_set_power_off_flag(1); - //sf_app_battery_stop(); - system("watchdog -T 1 -t 5 /dev/watchdog"); - } - else - { - sf_com_message_send_to_cardv(&stMessageBuf); - } + sf_com_message_send_to_cardv(&stMessageBuf); } else if(0 == stMessageBuf.arg3) //ON->OFF { diff --git a/code/lib/source/sifar/code/source/mcu/sf_mcu_client.c b/code/lib/source/sifar/code/source/mcu/sf_mcu_client.c index 6569e2daa..879629655 100644 --- a/code/lib/source/sifar/code/source/mcu/sf_mcu_client.c +++ b/code/lib/source/sifar/code/source/mcu/sf_mcu_client.c @@ -804,14 +804,7 @@ void sf_mcu_dataready_ck(UINT8 startMode) gModuleSleep = 0; //power off 4G module sf_set_power_off_flag(1); printf("[power off] %s(%d)\n", __FUNCTION__, __LINE__); - if((startMode == 1) && (PWR_ON_AUTO == sf_cardv_convert_power_on_mode())) - { - system("watchdog -T 1 -t 5 /dev/watchdog"); - } - else - { - Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, 0); //shutdown start - } + Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, 0); //shutdown start } } From 91b03b29f84fcfe7af7524f84a2b777e7705d1b1 Mon Sep 17 00:00:00 2001 From: payton Date: Tue, 2 Jan 2024 21:03:38 +0800 Subject: [PATCH 05/13] =?UTF-8?q?1.=E5=8E=BB=E6=8E=89tty=E7=AD=89=E5=BE=85?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E7=9A=84=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/sf_app/code/source/ttyusb/sf_hal_ttyusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/application/source/sf_app/code/source/ttyusb/sf_hal_ttyusb.c b/code/application/source/sf_app/code/source/ttyusb/sf_hal_ttyusb.c index d1626dcb0..72f74ab2b 100755 --- a/code/application/source/sf_app/code/source/ttyusb/sf_hal_ttyusb.c +++ b/code/application/source/sf_app/code/source/ttyusb/sf_hal_ttyusb.c @@ -449,7 +449,7 @@ SINT32 sf_hal_ttyusb2_read_buf(SF_TTY_DATA_TYPE_S *recv) } else if (0 == s32ret) { waitTime--; - MLOGW("FIFO select timeout [%d]\n",waitTime); + //MLOGW("FIFO select timeout [%d]\n",waitTime); continue; } } From 433499503f6b1f5865bf84f4b77be104cbd374aa Mon Sep 17 00:00:00 2001 From: "sober.song" Date: Tue, 2 Jan 2024 21:06:03 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E5=88=A0=E9=99=A4emmc=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=8C=82=E8=BD=BD=E5=A4=B1=E8=B4=A5=E5=90=8E=E6=89=8B=E5=8A=A8?= =?UTF-8?q?=E6=8C=82=E8=BD=BD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/source/cardv/SrcCode/System/SysStrg_Exe.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/code/application/source/cardv/SrcCode/System/SysStrg_Exe.c b/code/application/source/cardv/SrcCode/System/SysStrg_Exe.c index 2531ae26d..bc5c59a50 100644 --- a/code/application/source/cardv/SrcCode/System/SysStrg_Exe.c +++ b/code/application/source/cardv/SrcCode/System/SysStrg_Exe.c @@ -1218,20 +1218,12 @@ INT32 System_OnStrgAttach(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) } #if HUNTING_CAMERA_MCU == ENABLE - if((FS_DISK_ERROR == System_GetState(SYS_STATE_FS))){ stMessageBuf.arg1 = CMD_SD_STRG_CB_UNMOUNT_FINISH; stMessageBuf.arg2 = strg_id; stMessageBuf.cmdId = CMD_SD; sf_com_message_send_to_app(&stMessageBuf); #if USE_MMC_DEV_CHECK - - if(strg_id == 1) - { - printf("emmc mounted failed, remount\n"); - system("mount /dev/mmcblk1p1 /mnt/sd2"); - stMessageBuf.arg1 = CMD_SD_STRG_CB_MOUNT_FINISH; - } SF_StrgRegister(&stMessageBuf); #endif printf("System_OnStrgAttach send UNMOUNT! dev_id = %d\n", strg_id); From 3e2e82948507013206799bfe083bb037b03801a4 Mon Sep 17 00:00:00 2001 From: payton Date: Tue, 2 Jan 2024 21:50:06 +0800 Subject: [PATCH 07/13] =?UTF-8?q?1.=E5=8F=82=E6=95=B0=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E6=8F=90=E5=89=8D=E5=88=B0ui=E6=98=BE=E7=A4=BA=E5=89=8D?= =?UTF-8?q?=EF=BC=9B2.=E5=A2=9E=E5=8A=A0dump=E6=89=93=E5=8D=B0=E6=97=B6?= =?UTF-8?q?=E5=BA=8Flog=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/cardv/SrcCode/System/SysMain_Exe.c | 18 ++++---- .../source/cardv/SrcCode/System/SysMain_cmd.c | 1 + .../source/cardv/SrcCode/System/main.c | 1 + .../lib/source/sifar/code/include/sf_common.h | 2 + .../sifar/code/source/common/sf_common.c | 44 +++++++++++++++++++ 5 files changed, 57 insertions(+), 9 deletions(-) diff --git a/code/application/source/cardv/SrcCode/System/SysMain_Exe.c b/code/application/source/cardv/SrcCode/System/SysMain_Exe.c index 0ec1eeb50..604baf7fa 100755 --- a/code/application/source/cardv/SrcCode/System/SysMain_Exe.c +++ b/code/application/source/cardv/SrcCode/System/SysMain_Exe.c @@ -227,15 +227,15 @@ INT32 System_OnBoot(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) Load_MenuInfo(); #endif #else -#if (BOOT_RESET_MENU_INFO == ENABLE) - //EMMC_AS_PSTORE - #if (defined(_CPU2_LINUX_) && defined(_EMBMEM_EMMC_)) - System_OnStrgInit_PS(); //because ps uses filesys in this case, so ps init was moved here. - Load_MenuInfo(); - #else - Load_MenuInfo(); //reset value cause the FL_FSStatus as '0', we do so before NVTEVT_STRG_ATTACH finish - #endif -#endif +// #if (BOOT_RESET_MENU_INFO == ENABLE) +// //EMMC_AS_PSTORE +// #if (defined(_CPU2_LINUX_) && defined(_EMBMEM_EMMC_)) +// System_OnStrgInit_PS(); //because ps uses filesys in this case, so ps init was moved here. +// Load_MenuInfo(); +// #else +// Load_MenuInfo(); //reset value cause the FL_FSStatus as '0', we do so before NVTEVT_STRG_ATTACH finish +// #endif +// #endif #endif //#NT#2016/12/14#Niven Cho -end #if (BOOT_RESET_MENU_INFO == ENABLE) diff --git a/code/application/source/cardv/SrcCode/System/SysMain_cmd.c b/code/application/source/cardv/SrcCode/System/SysMain_cmd.c index 814ef68dd..868b25067 100755 --- a/code/application/source/cardv/SrcCode/System/SysMain_cmd.c +++ b/code/application/source/cardv/SrcCode/System/SysMain_cmd.c @@ -281,6 +281,7 @@ SXCMD_ITEM("uiprint %", sf_cmd_para_printf, "uiprint") SXCMD_ITEM("blusw %", cmd_blu_switch, "blusw 0/1") SXCMD_ITEM("wifisw %", cmd_wifi_switch, "wifisw 0/1") SXCMD_ITEM("lcdbk %", sf_set_backlight_status, "lcdbk 0/1") +SXCMD_ITEM("sfdump %", sf_vos_perf_list_dump, "sfdump") #endif #if FS_MULTI_STRG_FUNC /* test cmd */ diff --git a/code/application/source/cardv/SrcCode/System/main.c b/code/application/source/cardv/SrcCode/System/main.c index 38f2c5cc8..8d94cf74d 100755 --- a/code/application/source/cardv/SrcCode/System/main.c +++ b/code/application/source/cardv/SrcCode/System/main.c @@ -388,6 +388,7 @@ int NvtMain(void) { #if HUNTING_CAMERA_MCU == ENABLE sf_cardv_check_power_on_mode(); + sf_cardv_load_menu_info_start(); #endif System_InstallID(); #if (USB_MODE==ENABLE) diff --git a/code/lib/source/sifar/code/include/sf_common.h b/code/lib/source/sifar/code/include/sf_common.h index 4694c25be..45c796223 100755 --- a/code/lib/source/sifar/code/include/sf_common.h +++ b/code/lib/source/sifar/code/include/sf_common.h @@ -202,4 +202,6 @@ void sf_set_cammode_statu(char is); BOOL sf_set_backlight_status(unsigned char argc, char **argv); 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); #endif diff --git a/code/lib/source/sifar/code/source/common/sf_common.c b/code/lib/source/sifar/code/source/common/sf_common.c index 668eb0c87..d235ece84 100755 --- a/code/lib/source/sifar/code/source/common/sf_common.c +++ b/code/lib/source/sifar/code/source/common/sf_common.c @@ -134,6 +134,12 @@ static SF_THREAD_S WaiParaTskCfg = .IsRun = 0, .TskId = -1, }; + +static SF_THREAD_S LoadParaTskCfg = +{ + .IsRun = 0, + .TskId = -1, +}; int sf_pir_statu_read(void) { static UINT8 state = 0; @@ -3453,4 +3459,42 @@ void sf_set_net_generation(UINT8 value) { printf("[%s:%d]value(%d) invalid,no set.\n", __FUNCTION__, __LINE__, value); } +} + +void* sf_cardv_load_menu_info_thread(void *arg) +{ + vos_perf_list_mark(__func__, __LINE__, 0); + SLOGI("thread run\n"); + LoadParaTskCfg.IsRun = 1; + Load_MenuInfo(); + SLOGI("thread end\n"); + + LoadParaTskCfg.IsRun = 0; + vos_perf_list_mark(__func__, __LINE__, 0); + return NULL; +} +UINT32 sf_cardv_load_menu_info_start(void) +{ + SINT32 ret = 1; + if(LoadParaTskCfg.IsRun) + { + SLOGE("thread has already run !!!\n"); + return 1; + } + ret = pthread_create(&LoadParaTskCfg.TskId, NULL, sf_cardv_load_menu_info_thread, NULL); + if(ret != SF_SUCCESS) + { + MLOGD("thread creat fail!\n"); + return ret; + } + return SF_SUCCESS; + +} + +BOOL sf_vos_perf_list_dump(unsigned char argc, char **argv) +{ + vos_perf_list_dump(); + sleep(1); + system("dmesg"); + return TRUE; } \ No newline at end of file From 02af726fb72ced0744726857da18959e2361f2f1 Mon Sep 17 00:00:00 2001 From: xiehongyan Date: Wed, 3 Jan 2024 10:43:18 +0800 Subject: [PATCH 08/13] =?UTF-8?q?9842,10801=20=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91=E9=97=AE=E9=A2=98,=20?= =?UTF-8?q?=E5=9B=9E=E6=94=BE=E7=95=8C=E9=9D=A2=E8=AE=BE=E7=BD=AE=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=9C=AA=E6=8F=92=E5=8D=A1=E5=8F=98=E7=81=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UIFlowLVGL/UIFlowMenuCommonItem/MenuQR.c | 8 +-- .../UIFlowPhoto/UIFlowPhotoEventCallback.c | 2 +- .../UIFlowPlay/UIFlowPlayEventCallback.c | 51 +++++++++++++------ 3 files changed, 40 insertions(+), 21 deletions(-) diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMenuCommonItem/MenuQR.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMenuCommonItem/MenuQR.c index 871e907e3..d095bcf26 100644 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMenuCommonItem/MenuQR.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMenuCommonItem/MenuQR.c @@ -694,7 +694,7 @@ static void qr_page_task_cb(lv_task_t* task){ { UIMenuStoreInfo *puiPara = sf_ui_para_get(); printf("[qr_page_task_cb]is esim card...%s\n", puiPara->ModuleImei); - if(strlen(puiPara->SimIccidV) == 0 && strlen(puiPara->SimIccidA) == 0) + if (strlen(puiPara->SimIccid) == 0 || strlen(puiPara->ModuleImei) == 0) { lv_label_set_text(labelInit, "Please restart the camera"); return; @@ -705,16 +705,16 @@ static void qr_page_task_cb(lv_task_t* task){ { UIMenuStoreInfo *puiPara = sf_ui_para_get(); printf("[qr_page_task_cb]is sim card...%s\n", puiPara->ModuleImei); - if(strlen(puiPara->SimIccidV) == 0 && strlen(puiPara->SimIccidA) == 0) + if (strlen(puiPara->SimIccid) == 0 || strlen(puiPara->ModuleImei) == 0) { - lv_label_set_text(labelInit, "Please insert SIM card and restart the camera"); + lv_label_set_text(labelInit, "Please restart the camera"); return; } snprintf(qr_date, QR_DATA_LENGTH, qr_code_str, puiPara->ModuleImei, puiPara->SimIccidV, puiPara->SimIccidA, "false"); } else if (ret == -1) { - if(sf_cardv_4G_status_get() == SF_4G_SEARCHING) + if (sf_cardv_4G_status_get() == SF_4G_SEARCHING) { lv_label_set_text(labelInit, "\nQR code loading..."); } diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPhoto/UIFlowPhotoEventCallback.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPhoto/UIFlowPhotoEventCallback.c index 7909f6344..926504ab6 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPhoto/UIFlowPhotoEventCallback.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPhoto/UIFlowPhotoEventCallback.c @@ -697,7 +697,7 @@ static void update_storage_sd_card(void) { static int cnt = 0; if(cnt++<1){ - lv_label_set_text(label_6_scr_uiflowphoto, "Loarding..."); + lv_label_set_text(label_6_scr_uiflowphoto, ""); }else{ g_SysStrg_Chg = false; cnt = 0; diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c index 3a5e2587a..d72764187 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c @@ -27,7 +27,7 @@ //#define PLAY_KEY_PRESS_MASK (FLGKEY_KEY_MASK_DEFAULT) //#define PLAY_KEY_RELEASE_MASK FLGKEY_KEY_MASK_NULL//(FLGKEY_UP | FLGKEY_DOWN | FLGKEY_LEFT | FLGKEY_RIGHT) //#define PLAY_KEY_CONTINUE_MASK FLGKEY_KEY_CONT_MASK_DEFAULT -static SF_ST_MMC_DEV *mmc_dev = NULL; +extern int System_Get_DCF_Handle(void); //static lv_obj_t* pMenu = NULL; enum SELECTION_SHOW { @@ -60,6 +60,9 @@ extern void PBView_DrawNoFile(void); static void stop_play(void); //#NT#2023/11/14#Eric - end +#define HANDLE_SD 1 +#define HANDLE_EMMC 0 + static BOOL g_PlayBgInitFileSys = FALSE; #if 1 @@ -221,6 +224,22 @@ static void update_play_Selection_msg(lv_obj_t* obj) } } } + UINT32 cardStatus = System_GetState(SYS_STATE_CARD); + if (cardStatus == CARD_REMOVED && OPTION_PAGE_SELECT_FUNCTION != gOptionPage) + { + ProfileFocused = 0; + ProfileSelected = 0; + lv_obj_set_state(image_button_option_1_scr_uiflowplay, LV_STATE_FOCUSED); + lv_obj_set_state(label_option1_scr_uiflowplay, LV_STATE_FOCUSED); + + lv_plugin_img_set_src(image_option1_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_LIST_SELECTED); + lv_obj_set_pos(image_option2_scr_uiflowplay, 272, 0); + lv_obj_set_hidden(image_option1_scr_uiflowplay, false); + + lv_obj_set_state(image_button_option_2_scr_uiflowplay, LV_STATE_DISABLED); + lv_obj_set_state(label_option2_scr_uiflowplay, LV_STATE_DISABLED); + lv_obj_set_hidden(image_option2_scr_uiflowplay, true); + } } @@ -307,33 +326,23 @@ void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key) } else //GO TO STORAGE OPTIONS { - mmc_dev = SF_GetMMCDev(); - if (mmc_dev->dev_type == 0)//sd 0, emmc 1 - { - ProfileFocused = 1; - } - else - { - ProfileFocused = 0; - } - printf(" ================================== storage option init%d\n", ProfileSelected); ProfileFocused = ProfileSelected; gOptionPage = OPTION_PAGE_FORMAT; show_Selection_page(obj); } } else { - if (1 == ProfileFocused) + if (1 == ProfileFocused && ProfileSelected == 0) { printf(" ================================== switch sd card.\n"); ProfileSelected = 1; - FileDB_Refresh(0); + Ux_SendEvent(0, NVTEVT_SYSTEM_MODE, 1, PRIMARY_MODE_PLAYBACK); } - else + else if (0 == ProfileFocused && ProfileSelected == 1) { printf(" ================================== switch emmc.\n"); ProfileSelected = 0; - FileDB_Refresh(1); + Ux_SendEvent(0, NVTEVT_SYSTEM_MODE, 1, PRIMARY_MODE_PLAYBACK); } ProfileFocused = 0; hidde_Selection_page(); @@ -1272,7 +1281,17 @@ static void set_indev_keypad_group(lv_obj_t* obj) static void UIFlowPlay_ScrOpen(lv_obj_t* obj) { DBG_IND("UIFlowPlay_ScrOpen\r\n"); - + int SelectedHandle = System_Get_DCF_Handle(); + printf("[UIFlowPlay_ScrOpen][*x] select handle: %d.", SelectedHandle); + if (SelectedHandle == HANDLE_SD) + { + ProfileSelected = 1; + } + else if (SelectedHandle == HANDLE_EMMC) + { + ProfileSelected = 0; + } + set_indev_keypad_group(obj); if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE) { From f3606cd1908ba85635c0d1f9438f17aa5a98eb14 Mon Sep 17 00:00:00 2001 From: xiehongyan Date: Wed, 3 Jan 2024 11:56:53 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=9B=9E=E6=94=BE?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=B7=A6=E9=94=AE=E5=9B=9E=E9=80=80=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c | 8 +++++++- .../UIFlowLVGL/UIFlowWrnMsg/UIFlowWrnMsgEventCallback.c | 3 ++- code/lib/source/sifar/code/source/common/sf_common.c | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c index 0f48c6eee..cf47ed9c1 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c @@ -298,6 +298,7 @@ void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key) } case LV_USER_KEY_LEFT: { + /* if (OPTION_PAGE_SELECT_FUNCTION == gOptionPage) { hidde_Selection_page(); @@ -307,6 +308,7 @@ void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key) gOptionPage = OPTION_PAGE_SELECT_FUNCTION; show_Selection_page(obj); } + */ break; } case LV_USER_KEY_RIGHT: @@ -337,12 +339,16 @@ void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key) printf(" ================================== switch sd card.\n"); ProfileSelected = 1; Ux_SendEvent(0, NVTEVT_SYSTEM_MODE, 1, PRIMARY_MODE_PLAYBACK); + int SelectedHandle = System_Get_DCF_Handle(); + printf("[Option_play_Selection_Key][*x] select handle: %d.\n", SelectedHandle); } else if (0 == ProfileFocused && ProfileSelected == 1) { printf(" ================================== switch emmc.\n"); ProfileSelected = 0; Ux_SendEvent(0, NVTEVT_SYSTEM_MODE, 1, PRIMARY_MODE_PLAYBACK); + int SelectedHandle = System_Get_DCF_Handle(); + printf("[Option_play_Selection_Key][*x] select handle: %d.\n", SelectedHandle); } ProfileFocused = 0; hidde_Selection_page(); @@ -1282,7 +1288,7 @@ static void UIFlowPlay_ScrOpen(lv_obj_t* obj) { DBG_IND("UIFlowPlay_ScrOpen\r\n"); int SelectedHandle = System_Get_DCF_Handle(); - printf("[UIFlowPlay_ScrOpen][*x] select handle: %d.", SelectedHandle); + printf("[UIFlowPlay_ScrOpen][*x] select handle: %d.\n", SelectedHandle); if (SelectedHandle == HANDLE_SD) { ProfileSelected = 1; diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowWrnMsg/UIFlowWrnMsgEventCallback.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowWrnMsg/UIFlowWrnMsgEventCallback.c index 09c1522d5..40d64b6b4 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowWrnMsg/UIFlowWrnMsgEventCallback.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowWrnMsg/UIFlowWrnMsgEventCallback.c @@ -45,7 +45,7 @@ static void task_msgbox_timer_cb(lv_task_t* task) if (0 == autoClose || autoOffTime <= 10) { - + printf("[task_msgbox_timer_cb][*x]auto close\n"); lv_task_del(msgbox_timer); msgbox_timer = NULL; @@ -56,6 +56,7 @@ static void task_msgbox_timer_cb(lv_task_t* task) } if (0 == autoClose) { + printf("[task_msgbox_timer_cb][*x]set statu flag\n"); sf_set_pir_statu_flag(1); // OpenClosingScreen(DISPLAY_FINAL_DO_NOT_SHOW_POWER_OFF); //#define DO_NOT_SHOW_POWER_OFF 0 diff --git a/code/lib/source/sifar/code/source/common/sf_common.c b/code/lib/source/sifar/code/source/common/sf_common.c index 668eb0c87..84de572a5 100755 --- a/code/lib/source/sifar/code/source/common/sf_common.c +++ b/code/lib/source/sifar/code/source/common/sf_common.c @@ -278,6 +278,7 @@ void sf_mode_detect(void) } else if((sf_get_pir_statu_flag()) && (CMD_FORMAT_SD_STA != sf_get_card_statu())) { + printf("[sf_mode_detect][*x] empezar going to pir................................\n"); pwroffcnt++; //printf("[%s:%d]pwroffcnt=%d\n",__FUNCTION__,__LINE__,pwroffcnt); //sf_enter_auto_mode_count_down_show(4 - pwroffcnt); From ffb0d6be0d0e1c78b4296ae4b1072d90e643778e Mon Sep 17 00:00:00 2001 From: xiehongyan Date: Wed, 3 Jan 2024 13:39:14 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=9E=E6=94=BE?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E2=88=9A=E7=9A=84=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c index cf47ed9c1..6c9eefcca 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c @@ -233,7 +233,7 @@ static void update_play_Selection_msg(lv_obj_t* obj) lv_obj_set_state(label_option1_scr_uiflowplay, LV_STATE_FOCUSED); lv_plugin_img_set_src(image_option1_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_LIST_SELECTED); - lv_obj_set_pos(image_option2_scr_uiflowplay, 272, 0); + lv_obj_set_pos(image_option1_scr_uiflowplay, 272, 0); lv_obj_set_hidden(image_option1_scr_uiflowplay, false); lv_obj_set_state(image_button_option_2_scr_uiflowplay, LV_STATE_DISABLED); From f8ef234da98272b7abf4522178ce21c3555eec73 Mon Sep 17 00:00:00 2001 From: payton Date: Wed, 3 Jan 2024 14:37:48 +0800 Subject: [PATCH 11/13] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E5=9B=9E=E6=94=BE?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E6=9C=89=E7=BA=A2=E6=9D=A1=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nvt-na51089/ide/ide_platform.c | 28 ++++++++--- .../disp_if8b_lcd1_psd200_st7789v/panel.c | 48 ++++++++++++++++++- .../disp_if8b_lcd1_psd200_st7789v/panel.c | 48 ++++++++++++++++++- .../nvt-top.dtsi | 2 +- .../cardv/SrcCode/FastFlow/flow_boot_logo.c | 18 +++---- .../disp_if8b_lcd1_psd200_st7789v/panel.c | 48 ++++++++++++++++++- 6 files changed, 169 insertions(+), 23 deletions(-) diff --git a/BSP/u-boot/drivers/video/novatek/drv_videoout/nvt-na51089/ide/ide_platform.c b/BSP/u-boot/drivers/video/novatek/drv_videoout/nvt-na51089/ide/ide_platform.c index c2992ed82..e57df4ca1 100755 --- a/BSP/u-boot/drivers/video/novatek/drv_videoout/nvt-na51089/ide/ide_platform.c +++ b/BSP/u-boot/drivers/video/novatek/drv_videoout/nvt-na51089/ide/ide_platform.c @@ -259,16 +259,30 @@ UINT32 pll_get_pll_freq(PLL_ID id) */ UINT32 pll_get_clock_rate(PLL_CLKSEL clk_sel) { - UINT32 ui_mask, ui_reg_offset; - REGVALUE reg_data; + UINT32 ui_mask, ui_reg_offset; + REGVALUE reg_data; - ui_reg_offset = 0x20; - ui_mask = (0x7<;}; ccnt{pinmux = <0x0>;}; audio{pinmux = <0x0>;}; - lcd{pinmux = <0x10000000>;}; + lcd{pinmux = <0x10000006>;};/* rgb through */ tv{pinmux = <0x0>;}; eth{pinmux = <0x0>;}; misc{pinmux = <0x0>;}; diff --git a/rtos/code/application/source/cardv/SrcCode/FastFlow/flow_boot_logo.c b/rtos/code/application/source/cardv/SrcCode/FastFlow/flow_boot_logo.c index b3d9d564f..18da2147c 100755 --- a/rtos/code/application/source/cardv/SrcCode/FastFlow/flow_boot_logo.c +++ b/rtos/code/application/source/cardv/SrcCode/FastFlow/flow_boot_logo.c @@ -405,20 +405,20 @@ static THREAD_RETTYPE thread_videoout(void *ptr) pxlfmt) != HD_OK){ goto exit; } - HD_URECT rect = (HD_URECT){0, 0, 720, 320}; +// HD_URECT rect = (HD_URECT){0, 0, 720, 320}; - //HD_URECT rect = (HD_URECT){0, 0, videoout_syscaps.output_dim.w, videoout_syscaps.output_dim.h}; - if(flow_boot_logo_videoout_set_param_in_win(path_id, rect) != HD_OK){ - goto exit; - } + HD_URECT rect = (HD_URECT){0, 0, videoout_syscaps.output_dim.w, videoout_syscaps.output_dim.h}; + if(flow_boot_logo_videoout_set_param_in_win(path_id, rect) != HD_OK){ + goto exit; + } - hd_videoout_start(path_id); + hd_videoout_start(path_id); exit: - vos_flag_set(task_param->flag, FLAG_VIDEOOUT_TASK_EXIT); + vos_flag_set(task_param->flag, FLAG_VIDEOOUT_TASK_EXIT); - LINUX_BOOT_MSG("%s exit\n", __func__); - THREAD_RETURN(0); + LINUX_BOOT_MSG("%s exit\n", __func__); + THREAD_RETURN(0); } static THREAD_RETTYPE thread_videodec(void *ptr) diff --git a/rtos/code/hdal/ext_devices/panel/display_panel/disp_if8b_lcd1_psd200_st7789v/panel.c b/rtos/code/hdal/ext_devices/panel/display_panel/disp_if8b_lcd1_psd200_st7789v/panel.c index 0bcdee274..194738662 100755 --- a/rtos/code/hdal/ext_devices/panel/display_panel/disp_if8b_lcd1_psd200_st7789v/panel.c +++ b/rtos/code/hdal/ext_devices/panel/display_panel/disp_if8b_lcd1_psd200_st7789v/panel.c @@ -237,7 +237,9 @@ const T_PANEL_CMD t_cmd_mode_rgb320[] = { const T_LCD_PARAM t_mode[] = { /*********** RGB Serial MODE *************/ { + // T_PANEL_PARAM +#if 0 { /* Old prototype */ PINMUX_LCDMODE_RGB_SERIAL, //!< LCDMode @@ -277,6 +279,48 @@ const T_LCD_PARAM t_mode[] = { 0x0A, //!< uiHSyncSYNCwidth 0x04, //!< uiVSyncSYNCwidth }, +#else + { + /* Old prototype */ + PINMUX_LCDMODE_RGB_THROUGH, //!< LCDMode +// 18000000 / 3 , //24.0f, //!< fDCLK + 5000000, +#if 1 + 1024 / 3,//PANELWIDTH + 69*2, //!< uiHSyncTotalPeriod + 720 / 3,//PANELWIDTH, //!< uiHSyncActivePeriod + 69 / 3, //!< uiHSyncBackPorch + 384,//PANELHEIGHT + 40, //!< uiVSyncTotalPeriod + 344, //!< uiVSyncActivePeriod + 2, //!< uiVSyncBackPorchOdd + 2, //!< uiVSyncBackPorchEven + 720 / 3,//320,//PANELWIDTH, //!< uiBufferWidth + 320,//720,//PANELHEIGHT, //!< uiBufferHeight + 720 / 3,//320,//PANELWIDTH, //!< uiWindowWidth + 320,//720,//PANELHEIGHT, //!< uiWindowHeight +#endif + +#if 0 + PANELWIDTH + 200, //!< uiHSyncTotalPeriod + PANELWIDTH, //!< uiHSyncActivePeriod + 10, //!< uiHSyncBackPorch + PANELHEIGHT + 140, //!< uiVSyncTotalPeriod + PANELHEIGHT, //!< uiVSyncActivePeriod + 4, //!< uiVSyncBackPorchOdd + 4, //!< uiVSyncBackPorchEven + PANELWIDTH, //!< uiBufferWidth + PANELHEIGHT, //!< uiBufferHeight + PANELWIDTH, //!< uiWindowWidth + PANELHEIGHT, //!< uiWindowHeight +#endif + + + FALSE, //!< bYCbCrFormat + + /* New added parameters */ + 0x0A, //!< uiHSyncSYNCwidth + 0x04, //!< uiVSyncSYNCwidth + }, +#endif // tIDE_PARAM { @@ -286,8 +330,8 @@ const T_LCD_PARAM t_mode[] = { {FALSE,FALSE}, //!< dithering[2]; DISPLAY_DEVICE_TOPPOLY, //!< **DONT-CARE** IDE_PDIR_RBG, //!< pdir; - IDE_LCD_G, //!< odd; - IDE_LCD_G, //!< even; + IDE_LCD_B, //!< odd; + IDE_LCD_B, //!< even; TRUE, //!< hsinv; TRUE, //!< vsinv; FALSE, //!< hvldinv; From 70dbaaad798bdd3f6241cfa230192d89049a5622 Mon Sep 17 00:00:00 2001 From: payton Date: Wed, 3 Jan 2024 14:38:10 +0800 Subject: [PATCH 12/13] =?UTF-8?q?1.rtos=E5=A2=9E=E5=8A=A0log=20cmd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/cardv/SrcCode/System/SysMain_cmd.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/rtos/code/application/source/cardv/SrcCode/System/SysMain_cmd.c b/rtos/code/application/source/cardv/SrcCode/System/SysMain_cmd.c index 67c32b4fc..b28800439 100644 --- a/rtos/code/application/source/cardv/SrcCode/System/SysMain_cmd.c +++ b/rtos/code/application/source/cardv/SrcCode/System/SysMain_cmd.c @@ -12,7 +12,9 @@ #endif #include #include "UIApp/AppDisp_PipView.h" - +#if HUNTING_CAMERA_MCU == ENABLE +#include "sys_fastboot.h" +#endif #define THIS_DBGLVL 2 // 0=FATAL, 1=ERR, 2=WRN, 3=UNIT, 4=FUNC, 5=IND, 6=MSG, 7=VALUE, 8=USER /////////////////////////////////////////////////////////////////////////////// #define __MODULE__ SysMainCmd @@ -201,6 +203,15 @@ static BOOL Cmd_PowerOff_Test(unsigned char argc, char **argv) return TRUE; } +#if HUNTING_CAMERA_MCU == ENABLE +static BOOL sf_log_fastboot_msg_en(unsigned char argc, char **argv) +{ + fastboot_msg_en(ENABLE); + DBG_DUMP("log ENABLE\r\n"); + return TRUE; +} +#endif + SXCMD_BEGIN(sys_cmd_tbl, "system command") SXCMD_ITEM("mem %", cmd_sys_mem, "system memory layout") SXCMD_ITEM("pip %", Cmd_user_pip, "pip view style") @@ -214,7 +225,9 @@ SXCMD_ITEM("curl", Cmd_user_CurlTest, "curl command test") #endif SXCMD_ITEM("power_off %", Cmd_PowerOff_Test, "flowpreview power off test") - +#if HUNTING_CAMERA_MCU == ENABLE +SXCMD_ITEM("log %", sf_log_fastboot_msg_en, "log on") +#endif SXCMD_END() From c23b991eccb6c1f2e2a624830e29ab94ceb5917f Mon Sep 17 00:00:00 2001 From: xiehongyan Date: Wed, 3 Jan 2024 15:34:31 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=B5=E6=B1=A0?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=90=8E=E4=B8=8D=E4=BF=9D=E5=AD=98=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c | 7 +++---- .../source/sf_app/code/source/battery/sf_battery.c | 12 ++++++++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c index 6c9eefcca..f00674c89 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPlay/UIFlowPlayEventCallback.c @@ -339,16 +339,14 @@ void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key) printf(" ================================== switch sd card.\n"); ProfileSelected = 1; Ux_SendEvent(0, NVTEVT_SYSTEM_MODE, 1, PRIMARY_MODE_PLAYBACK); - int SelectedHandle = System_Get_DCF_Handle(); - printf("[Option_play_Selection_Key][*x] select handle: %d.\n", SelectedHandle); + } else if (0 == ProfileFocused && ProfileSelected == 1) { printf(" ================================== switch emmc.\n"); ProfileSelected = 0; Ux_SendEvent(0, NVTEVT_SYSTEM_MODE, 1, PRIMARY_MODE_PLAYBACK); - int SelectedHandle = System_Get_DCF_Handle(); - printf("[Option_play_Selection_Key][*x] select handle: %d.\n", SelectedHandle); + } ProfileFocused = 0; hidde_Selection_page(); @@ -1286,6 +1284,7 @@ static void set_indev_keypad_group(lv_obj_t* obj) static void UIFlowPlay_ScrOpen(lv_obj_t* obj) { + DBG_IND("UIFlowPlay_ScrOpen\r\n"); int SelectedHandle = System_Get_DCF_Handle(); printf("[UIFlowPlay_ScrOpen][*x] select handle: %d.\n", SelectedHandle); diff --git a/code/application/source/sf_app/code/source/battery/sf_battery.c b/code/application/source/sf_app/code/source/battery/sf_battery.c index 648f16b7b..d22a8d23c 100755 --- a/code/application/source/sf_app/code/source/battery/sf_battery.c +++ b/code/application/source/sf_app/code/source/battery/sf_battery.c @@ -418,7 +418,11 @@ UINT32 sf_battery_adc_value_get_once(void) } else { first_init--; - puiPara->BatteryType = SF_BATT_ALKALINE; + if (puiPara->BatteryType == SF_BATT_LI_PACK) + { + puiPara->BatteryType = SF_BATT_ALKALINE; + } + } } @@ -969,7 +973,11 @@ void sf_battery_level_polling(void) } } else{ - puiPara->BatteryType = SF_BATT_ALKALINE; + if(puiPara->BatteryType == SF_BATT_LI_PACK) + { + puiPara->BatteryType = SF_BATT_ALKALINE; + } + } //ret = sf_check_low_battery();