修改二维码创建条件

This commit is contained in:
xiehongyan 2023-12-30 18:33:06 +08:00
parent be0cddbabf
commit e1d467900d
3 changed files with 31 additions and 10 deletions

View File

@ -694,12 +694,22 @@ static void qr_page_task_cb(lv_task_t* task){
{ {
UIMenuStoreInfo *puiPara = sf_ui_para_get(); UIMenuStoreInfo *puiPara = sf_ui_para_get();
printf("[qr_page_task_cb]is esim card...%s\n", puiPara->ModuleImei); printf("[qr_page_task_cb]is esim card...%s\n", puiPara->ModuleImei);
if(strlen(puiPara->SimIccidV) == 0 && strlen(puiPara->SimIccidA) == 0)
{
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, "true"); snprintf(qr_date, QR_DATA_LENGTH, qr_code_str, puiPara->ModuleImei, puiPara->SimIccidV, puiPara->SimIccidA, "true");
} }
else if (ret == 0) else if (ret == 0)
{ {
UIMenuStoreInfo *puiPara = sf_ui_para_get(); UIMenuStoreInfo *puiPara = sf_ui_para_get();
printf("[qr_page_task_cb]is sim card...%s\n", puiPara->ModuleImei); printf("[qr_page_task_cb]is sim card...%s\n", puiPara->ModuleImei);
if(strlen(puiPara->SimIccidV) == 0 && strlen(puiPara->SimIccidA) == 0)
{
lv_label_set_text(labelInit, "Please insert SIM card and restart the camera");
return;
}
snprintf(qr_date, QR_DATA_LENGTH, qr_code_str, puiPara->ModuleImei, puiPara->SimIccidV, puiPara->SimIccidA, "false"); snprintf(qr_date, QR_DATA_LENGTH, qr_code_str, puiPara->ModuleImei, puiPara->SimIccidV, puiPara->SimIccidA, "false");
} }
else if (ret == -1) else if (ret == -1)

View File

@ -2139,8 +2139,10 @@ void UIFlowPhotoEventCallback(lv_obj_t* obj, lv_event_t event)
#define PASSWORD_OPENED 1 #define PASSWORD_OPENED 1
#define PASSWORD_NOT_OPENED 0 #define PASSWORD_NOT_OPENED 0
static int passwordOpened = PASSWORD_NOT_OPENED; static int passwordOpened = PASSWORD_NOT_OPENED;
printf("[***************x]check password");
if(PASSWORD_SWITCH_ON == puiPara->PwdSwitch && PASSWORD_NOT_OPENED == passwordOpened) if(PASSWORD_SWITCH_ON == puiPara->PwdSwitch && PASSWORD_NOT_OPENED == passwordOpened)
{ {
printf("[***************x]password open");
passwordOpened = PASSWORD_OPENED; passwordOpened = PASSWORD_OPENED;
OpenPasswordScreen(); OpenPasswordScreen();
ShutDownTime = PASSWORD_GO_TO_WORK_MODE_TIME_S; ShutDownTime = PASSWORD_GO_TO_WORK_MODE_TIME_S;

View File

@ -17,7 +17,7 @@
#include "UIFlowLVGL/UIFlowWrnMsg/UIFlowWrnMsgAPI.h" #include "UIFlowLVGL/UIFlowWrnMsg/UIFlowWrnMsgAPI.h"
#include "UIFlowLVGL/UIFlowMenuCommonConfirm/UIFlowMenuCommonConfirmAPI.h" #include "UIFlowLVGL/UIFlowMenuCommonConfirm/UIFlowMenuCommonConfirmAPI.h"
#include "kwrap/nvt_type.h" #include "kwrap/nvt_type.h"
#include "SF_SysStrgMng.h"
#if (USE_DCF == ENABLE) #if (USE_DCF == ENABLE)
#include "DCF.h" #include "DCF.h"
#endif #endif
@ -27,7 +27,7 @@
//#define PLAY_KEY_PRESS_MASK (FLGKEY_KEY_MASK_DEFAULT) //#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_RELEASE_MASK FLGKEY_KEY_MASK_NULL//(FLGKEY_UP | FLGKEY_DOWN | FLGKEY_LEFT | FLGKEY_RIGHT)
//#define PLAY_KEY_CONTINUE_MASK FLGKEY_KEY_CONT_MASK_DEFAULT //#define PLAY_KEY_CONTINUE_MASK FLGKEY_KEY_CONT_MASK_DEFAULT
extern SF_ST_MMC_DEV *mmc_dev;
//static lv_obj_t* pMenu = NULL; //static lv_obj_t* pMenu = NULL;
enum SELECTION_SHOW enum SELECTION_SHOW
{ {
@ -307,12 +307,17 @@ void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key)
} }
else //GO TO STORAGE OPTIONS else //GO TO STORAGE OPTIONS
{ {
mmc_dev = SF_GetMMCDev();
if (mmc_dev->dev_type == 0)//sd 0, emmc 1
//mmc_dev = SF_GetMMCDev(); {
//ProfileSelected = mmc_dev.dev_type ProfileFocused = 1;
//printf(" ================================== storage option init%d\n", ProfileSelected); }
//ProfileFocused = ProfileSelected; else
{
ProfileFocused = 0;
}
printf(" ================================== storage option init%d\n", ProfileSelected);
ProfileFocused = ProfileSelected;
gOptionPage = OPTION_PAGE_FORMAT; gOptionPage = OPTION_PAGE_FORMAT;
show_Selection_page(obj); show_Selection_page(obj);
} }
@ -322,11 +327,15 @@ void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key)
{ {
printf(" ================================== switch sd card.\n"); printf(" ================================== switch sd card.\n");
ProfileSelected = 1; ProfileSelected = 1;
FileDB_Refresh(0);
} else { }
else
{
printf(" ================================== switch emmc.\n"); printf(" ================================== switch emmc.\n");
ProfileSelected = 0; ProfileSelected = 0;
FileDB_Refresh(1);
} }
ProfileFocused = 0;
hidde_Selection_page(); hidde_Selection_page();
} }
break; break;