1.修改4g业务;2.更新0606
This commit is contained in:
parent
2b8029a43d
commit
b3691380ec
|
@ -50,7 +50,7 @@ my_mount()
|
|||
mkdir -p "${MNT_PATH}/${MNT_DIR}" || exit 1
|
||||
fat_type=`blkid "$MOUNTDEV" | awk -F'TYPE=' '{print $NF}'`
|
||||
if [ "${fat_type}" == "\"vfat\"" ]; then
|
||||
if ! mount -o dirsync,time_offset=$time_offset_total_m "$MOUNTDEV" "${MNT_PATH}/${MNT_DIR}" 2>&1 | tee -a /tmp/mountstat; then
|
||||
if ! mount -o usefree,dirsync,time_offset=$time_offset_total_m "$MOUNTDEV" "${MNT_PATH}/${MNT_DIR}" 2>&1 | tee -a /tmp/mountstat; then
|
||||
echo "$MOUNTDEV $MNT_PATH/$MNT_DIR ignore defaults 0 0" >> /tmp/.nvt_mounts
|
||||
exit 1
|
||||
fi
|
||||
|
@ -209,7 +209,7 @@ if [ -z $DEVPATH ]; then
|
|||
# Inserted but can't be mounted
|
||||
fat_type=`blkid "$MOUNTDEV" | awk -F'TYPE=' '{print $NF}'`
|
||||
if [ "${fat_type}" == "\"vfat\"" ]; then
|
||||
if ! mount -o dirsync,time_offset=$time_offset_total_m "$MOUNTDEV" "${MNT_PATH}/${MNT_DIR}" 2>&1 | tee -a /tmp/mountstat; then
|
||||
if ! mount -o usefree,dirsync,time_offset=$time_offset_total_m "$MOUNTDEV" "${MNT_PATH}/${MNT_DIR}" 2>&1 | tee -a /tmp/mountstat; then
|
||||
echo "$MOUNTDEV $MNT_PATH/$MNT_DIR ignore defaults 0 0" >> /tmp/.nvt_mounts
|
||||
continue
|
||||
fi
|
||||
|
|
|
@ -917,12 +917,18 @@
|
|||
#define DZOOM_FUNC ENABLE
|
||||
#define HUNTING_MCU_I2C DISABLE
|
||||
#define HUNTING_MCU_UART ENABLE
|
||||
#define HUNTING_IR_LED_940 ENABLE//DISABLE
|
||||
#define SF_BASE_VERSION "7MD4RCwD3T8"
|
||||
#define HUNTING_IR_LED_940 ENABLE
|
||||
#define SF_BASE_VERSION "7MD4RCwD6T2"
|
||||
#define HW_S530 1
|
||||
#define DCF_DIR_NAME "MEDIA" /* 100HUNTI */
|
||||
#define DCF_FILE_NAME "SYFW" /* IMAG0001.JPG */
|
||||
#define DCF_DIR_NAME "MEDIA" /* 100MEDIA */
|
||||
#define DCF_FILE_NAME "SYFW" /* SYFW0001.JPG */
|
||||
#define PHOTO_THUMB_PATH "A:\\THUMB\\"
|
||||
#define MOVIE_THUMB_PATH "A:\\THUMB\\"
|
||||
#define SF_SD_ROOT "/mnt/sd/"
|
||||
#define SF_SEND_LIST_DIR "/mnt/sd/THUMB/"
|
||||
#define SF_THUMB_SEND_LIST SF_SEND_LIST_DIR"send.list"
|
||||
|
||||
#define SF_IQ_TEST ENABLE
|
||||
|
||||
#define PHOTO_ISP_STAMP DISABLE
|
||||
#define SF_BASE_VERSION_FEA "R2.3"
|
||||
|
|
|
@ -851,7 +851,7 @@ INT32 System_OnStrgAttach(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
|||
DCF_ScanObj();
|
||||
// }
|
||||
#endif
|
||||
FileSys_GetDiskInfo(FST_INFO_DISK_SIZE);
|
||||
//FileSys_GetDiskInfo(FST_INFO_DISK_SIZE);
|
||||
System_SetState(SYS_STATE_FS, FS_INIT_OK);
|
||||
|
||||
#if defined(__FREERTOS)
|
||||
|
|
|
@ -61,7 +61,6 @@ static UINT32 raw_enc_path = 0;
|
|||
/**********************************************************************************
|
||||
* independent thumbnail
|
||||
*********************************************************************************/
|
||||
#define MOVIE_THUMB_PATH "A:\\Thumb\\"
|
||||
|
||||
static char thumb_current_path_main[256] = {'\0'};
|
||||
static char thumb_current_path_clone[256] = {'\0'};
|
||||
|
|
|
@ -51,7 +51,6 @@ BOOL _g_bFirstPhoto = TRUE;
|
|||
/**********************************************************************************
|
||||
* independent thumbnail
|
||||
*********************************************************************************/
|
||||
#define PHOTO_THUMB_PATH "A:\\Thumb\\"
|
||||
|
||||
#if(PHOTO_MODE==ENABLE)
|
||||
|
||||
|
@ -2464,6 +2463,9 @@ INT32 PhotoExe_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
|||
|
||||
// g_photo_ImageRatioSize = IMAGERATIO_SIZE[4];
|
||||
FileSys_MakeDir(PHOTO_THUMB_PATH);
|
||||
#if SF_IQ_TEST != ENABLE
|
||||
FileSys_SetAttrib(PHOTO_THUMB_PATH, FST_ATTRIB_HIDDEN | FST_ATTRIB_SYSTEM, TRUE);
|
||||
#endif
|
||||
GOIO_Turn_Onoff_IRCUT(1);
|
||||
|
||||
//sf_ir_led_set(((2 == puiPara->NightMode) ? 2 : 1),puiPara->FlashLed, puiPara->NightMode,0);
|
||||
|
@ -6347,7 +6349,7 @@ INT32 PhotoExe_Preview_SliceEncode_CB3(void* user_data)
|
|||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
char tmp2[64] = {'\0'};
|
||||
memset(tmp, '\0', sizeof(tmp));
|
||||
snprintf(tmp, sizeof(tmp), "%sW%s%s.JPG", SF_SD_THUMB_PATH, folder, number); /* DCF 8.3 naming rule */
|
||||
snprintf(tmp, sizeof(tmp), "%sW%s%s.JPG", SF_SEND_LIST_DIR, folder, number); /* DCF 8.3 naming rule */
|
||||
snprintf(tmp2, sizeof(tmp2), "W%s%s.JPG", folder, number); /* DCF 8.3 naming rule */
|
||||
DBG_DUMP("PHOTO THUMB %s \n %s\n", tmp, tmp2);
|
||||
sf_file_thumb_cfg_fill(tmp, tmp2, queue_ele_in->jpg_thumb_size, SF_FILE_TYPE_PIC_SMALL);
|
||||
|
|
|
@ -183,7 +183,12 @@
|
|||
#elif defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
||||
#define DEFAULT_PIR_SENSITIVITY SF_PIR_SENSITIVITY_7
|
||||
#endif
|
||||
#if SF_IQ_TEST == ENABLE
|
||||
#define DEFAULT_NET_WORK_NEED_SEARCH SF_OFF
|
||||
#else
|
||||
#define DEFAULT_NET_WORK_NEED_SEARCH SF_ON
|
||||
#endif
|
||||
|
||||
#define DEFAULT_GPRS_SWITCH SF_OFF
|
||||
#define DEFAULT_BATTERY_TYPE SF_BATT_ALKALINE
|
||||
#define DEFAULT_WORKTIME_SWITCH SF_OFF
|
||||
|
|
|
@ -506,7 +506,9 @@ void Load_MenuInfo(void)
|
|||
Save_MenuInfo();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
sf_share_mem_customer_down(0);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1707,6 +1709,16 @@ void SysResetFlag(void)
|
|||
puiPara->FtpSwitch = DEFAULT_FTP_SWITCH;
|
||||
puiPara->MultiShotIntevel = DEFAULT_MULTISHOT_INTEVEL;
|
||||
|
||||
if(puiPara->ModuleImei[0] != '\0')
|
||||
{
|
||||
puiPara->DailyReportTime.Hour = ((UINT16)(puiPara->ModuleImei[11]-48)*10+(puiPara->ModuleImei[12]-48))%12;
|
||||
puiPara->DailyReportTime.Min = ((UINT16)(puiPara->ModuleImei[13]-48)*10+(puiPara->ModuleImei[14]-48))%60;
|
||||
}
|
||||
else
|
||||
{
|
||||
puiPara->DailyReportTime.Hour = 0;
|
||||
puiPara->DailyReportTime.Min = 0;
|
||||
}
|
||||
memset(puiPara ->FtpIp,'\0', sizeof(puiPara ->FtpIp));
|
||||
memset(puiPara ->FtpPort, '\0', sizeof(puiPara ->FtpPort));
|
||||
memset(puiPara ->FtpUsr, '\0', sizeof(puiPara ->FtpUsr));
|
||||
|
|
|
@ -359,7 +359,11 @@ void sf_set_sim_insert(UINT32 sim);
|
|||
int sf_get_signal_ready(void);
|
||||
void sf_set_sim_pin_flag(UINT8 simPin, UINT8 simPins, UINT8 simPinPuk);
|
||||
void sf_set_cq_signal(UINT8 csq);
|
||||
UINT8 sf_get_cq_signal(void);
|
||||
void sf_mcu_version_get(UINT8 *mcuVer);
|
||||
void sf_dailyReport_set(void);
|
||||
UINT16 sf_mcu_get_irshtter(void);
|
||||
void sf_set_dr_reset_time_sys_flag(UINT8 value);
|
||||
|
||||
extern unsigned short TrigType;
|
||||
|
||||
|
|
|
@ -256,7 +256,7 @@ SINT32 sf_get_ntp(SINT32 value);
|
|||
|
||||
UINT8 sf_get_pdp_index(void);
|
||||
|
||||
void sf_custom_str_get(UINT8 *pCustomStr);
|
||||
void sf_custom_str_get(UINT8 *pStr);
|
||||
|
||||
void sf_get_send_video_fname(UINT8 *videoDirKey, UINT8 *videoFname);
|
||||
|
||||
|
|
|
@ -19,6 +19,15 @@ UINT8 sf_get_upload_to_module_flag(void);
|
|||
|
||||
void sf_set_upload_to_module_flag(UINT8 Falg);
|
||||
|
||||
void sf_app_set_temper(SINT16 val); /*0:°F 1:°C */
|
||||
|
||||
void sf_app_set_battery(UINT8 val, UINT8 type);
|
||||
|
||||
UINT32 sf_create_dailyreport_file(void);
|
||||
|
||||
UINT8 sf_app_get_battery(void);
|
||||
|
||||
void sf_custom_send_str_get(UINT8 *sendName, UINT8 *pStr);
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
|
|
|
@ -12,9 +12,6 @@ extern "C" {
|
|||
#define SF_VIDEO_LOOP_NUM 4 /*PIC 3 + VIDEO 1*/
|
||||
#define SF_SEND_LIST_ITEM_LENGTH 15
|
||||
|
||||
#define SF_THUMB_SEND_LIST "/mnt/sd/Thumb/send.list"
|
||||
|
||||
#define SF_SD_THUMB_PATH_CFG "/mnt/sd/Thumb/ThumbFileCfg"
|
||||
#define SF_FILE_ERROR_NO_FILE SF_ERR_ID(SF_MOD_FILE, ERROR_NO_FILE)
|
||||
|
||||
typedef enum sf_SUBSCRIBE_TYPE_E
|
||||
|
@ -81,7 +78,7 @@ SF_SRCFILE_ATTR_S* sf_file_thumb_cfg_get(void);
|
|||
SINT32 sf_file_size_get(SF_CHAR *filePath,UINT32 *pFileSize);
|
||||
|
||||
BOOL sf_check_auto_thumb_file(VOID);
|
||||
|
||||
UINT8 sf_get_send_file_list(char *sendfileList, UINT8 *fileTotal);
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
|
|
|
@ -141,8 +141,11 @@ extern "C" {
|
|||
#define SF_SD_ROOT "/mnt/sd/"
|
||||
|
||||
#define SIFAR_CUSTOMER_PARAM_PATH "/misc/sfSysParm.bin"
|
||||
#define SIFAR_STATISTICS_PARAM_PATH "/mnt/sd/DCIM/THUMB/sfStatisticsParm.bin"
|
||||
|
||||
#define SIFAR_STATISTICS_PARAM_PATH "/mnt/sd/THUMB/sfStatisticsParm.bin"
|
||||
//#define SF_SEND_LIST_DIR SF_SD_ROOT"THUMB"
|
||||
#define SF_DAILYREPORT_FILENAME SF_SD_ROOT"THUMB/d.txt"
|
||||
#define SF_ERROR_CODE SF_SD_ROOT"THUMB/warning.txt"
|
||||
#define SF_DAILYREPORT_TXT "DailyReport.txt"
|
||||
|
||||
|
||||
#define GPIO_DIR_OUT 1
|
||||
|
@ -177,12 +180,12 @@ extern "C" {
|
|||
|
||||
#define GPRS_INFO_LINE_MAX 512
|
||||
#define MAX_CALL_TIMES 100
|
||||
#define SF_SD_DISK "A:"
|
||||
#define SF_DCIM_DIR SF_SD_DISK"\\DCIM"
|
||||
#define SF_THUMB_DIR SF_SD_DISK"\\DCIM\\THUMB"
|
||||
#define SF_THUMB_SMALL_DIR SF_SD_DISK"\\DCIM\\THUMB\\small"
|
||||
#define SF_THUMB_BIG_DIR SF_SD_DISK"\\DCIM\\THUMB\\big"
|
||||
#define SF_THUMB_VIDEO_DIR SF_SD_DISK"\\DCIM\\THUMB\\video"
|
||||
#define SF_SD_DISK "/mnt/sd/"
|
||||
#define SF_DCIM_DIR SF_SD_ROOT"DCIM"
|
||||
#define SF_THUMB_DIR SF_SD_DISK"THUMB"
|
||||
#define SF_THUMB_SMALL_DIR SF_SD_DISK"THUMB/small"
|
||||
#define SF_THUMB_BIG_DIR SF_SD_DISK"THUMB/big"
|
||||
#define SF_THUMB_VIDEO_DIR SF_SD_DISK"THUMB/video"
|
||||
#define DCF_DIR_FREE_CHAR "MEDIA"
|
||||
#define DCF_FILE_FREE_CHAR "SYFW"
|
||||
|
||||
|
@ -381,6 +384,7 @@ typedef enum sf_MESSAGE_TYPE_E
|
|||
CMD_PARA = 0x1F02,
|
||||
CMD_GPRS = 0x1F03,
|
||||
CMD_WIFI = 0x1F04,
|
||||
CMD_DEV = 0x1F05,
|
||||
|
||||
}SF_MESSAGE_TYPE_E;
|
||||
|
||||
|
@ -493,6 +497,16 @@ typedef enum _GPRS_SEARCH_STEP_e{
|
|||
GPRS_SEARCH_STEP_GPS_LOCATE_FINISH,
|
||||
} GPRS_SEARCH_STEP_e;
|
||||
|
||||
typedef enum _SF_GPRS_CMD_STEP_e{
|
||||
SF_GPRS_CMD_SIGNAL = 0x0,
|
||||
SF_GPRS_CMD_STEP_SEARCH,
|
||||
} SF_GPRS_CMD_STEP_e;
|
||||
|
||||
typedef enum _SF_DEV_CMD_STEP_e{
|
||||
SF_DEV_CMD_TEMPER = 0x0,
|
||||
SF_DEV_CMD_BAT = 0x1,
|
||||
SF_DEV_CMD_BUTT
|
||||
} SF_DEV_CMD_STEP_e;
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
|
|
|
@ -147,6 +147,7 @@ typedef struct sfPDT_PARAM_STATISTICS_S
|
|||
UINT16 Year;
|
||||
UINT16 Mon;
|
||||
UINT16 Day;
|
||||
UINT16 Hour;
|
||||
|
||||
UINT16 TriggerTimes;
|
||||
UINT8 SubscribeSendCnt;
|
||||
|
@ -234,6 +235,38 @@ typedef struct sfPDT_PARAM_STATISTICS_S
|
|||
SF_OSS_S stOssCfg;
|
||||
SF_PARA_TIME_S httpTime;
|
||||
|
||||
UINT32 picSendCount;
|
||||
UINT32 sendThumbnailCount;
|
||||
UINT32 picSendSucessCount;
|
||||
UINT32 picSendTimeoutCount;
|
||||
UINT32 picSendFailCount;
|
||||
UINT32 sendThumbnailFailCount;
|
||||
UINT32 picSendTimeCount;
|
||||
UINT32 sendThumbnailTimeCount;
|
||||
|
||||
UINT32 videoSendCount;
|
||||
UINT32 videoSendTimeCount;
|
||||
UINT32 videoSendFailCount;
|
||||
UINT32 videoSendSucessCount;
|
||||
|
||||
UINT32 TirgNum;
|
||||
UINT32 NewFlieCount;
|
||||
|
||||
//UINT16 TYear;
|
||||
//UINT8 TMonth;
|
||||
//UINT8 Tday;
|
||||
//UINT8 Thour;
|
||||
UINT16 picSendMax;
|
||||
|
||||
UINT8 subscribeSendCnt;
|
||||
UINT8 subscribeVideoSendCnt;
|
||||
UINT8 GpsSearchFailCnt;/*dailyReport mode, search gps fail cnt*/
|
||||
|
||||
UINT8 msm_flag;
|
||||
UINT8 msm_number;
|
||||
UINT8 msm_str[66];
|
||||
|
||||
UINT8 SendlowPowerWarnCnt;
|
||||
UINT32 CheckSum;
|
||||
}SF_PDT_PARAM_STATISTICS_S;
|
||||
|
||||
|
|
|
@ -46,6 +46,9 @@ SINT8 app_upgrade_ota_restore_IsRun(void);
|
|||
|
||||
SINT32 app_preinit(void);
|
||||
|
||||
UINT8 *sf_versionGet(UINT8 ver[],UINT8 fea[]);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
|
|
|
@ -443,8 +443,8 @@ SINT32 eg91_usb_net_apn_cfg(SF_FN_PARAM_S *pfnParam)
|
|||
UINT8 sts = 1;
|
||||
USBNET_APN_INIT_e enMmcLocation;
|
||||
enMmcLocation = USBNET_APN_INIT_FIRST;
|
||||
UIMenuStoreInfo *pStaticParam = pfnParam->pstaticParam;
|
||||
|
||||
//UIMenuStoreInfo *pStaticParam = pfnParam->pstaticParam;
|
||||
UIMenuStoreInfo *pStaticParam = sf_app_ui_para_get();
|
||||
|
||||
|
||||
sprintf(ttyData, "AT\r");
|
||||
|
@ -582,8 +582,8 @@ SINT32 eg91_sim_init(SF_FN_PARAM_S *pfnParam)
|
|||
SF_CHAR tempICCID[21] = { 0 };
|
||||
SF_CHAR lastICCID[21] = { 0 };
|
||||
SF_CHAR *pStr = NULL;
|
||||
|
||||
UIMenuStoreInfo *pStaticParam = pfnParam->pstaticParam;//sf_app_ui_para_get();
|
||||
UIMenuStoreInfo *pStaticParam = sf_app_ui_para_get();
|
||||
//UIMenuStoreInfo *pStaticParam = pfnParam->pstaticParam;//sf_app_ui_para_get();
|
||||
//SF_PDT_PARAM_STATISTICS_S *pStaticParam = pfnParam->pstaticParam;
|
||||
SIM_INIT_E enMmcLocation;
|
||||
enMmcLocation = SIM_INIT_ATE;
|
||||
|
@ -614,6 +614,7 @@ SINT32 eg91_sim_init(SF_FN_PARAM_S *pfnParam)
|
|||
callTime++;
|
||||
if(callTime > 50)
|
||||
{
|
||||
sf_set_sim_insert(0);
|
||||
SLOGE("SimCard not inserted.\n");
|
||||
memset(&pStaticParam->SimIccid,'\0',SF_ICCID_MAX_LEN);
|
||||
return SF_4G_ERROR_NO_SIMCARD;
|
||||
|
@ -626,6 +627,7 @@ SINT32 eg91_sim_init(SF_FN_PARAM_S *pfnParam)
|
|||
}
|
||||
else if(strstr(ttyData, "+QSIMSTAT: 0,1"))
|
||||
{
|
||||
sf_set_sim_insert(1);
|
||||
count = 0;
|
||||
callTime = 0;
|
||||
// enMmcLocation = SIM_INIT_QNTP;
|
||||
|
@ -637,6 +639,7 @@ SINT32 eg91_sim_init(SF_FN_PARAM_S *pfnParam)
|
|||
}
|
||||
else if(strstr(ttyData, "+CPIN: NOT INSERTED"))
|
||||
{
|
||||
sf_set_sim_insert(0);
|
||||
MLOGE("SimCard not inserted.\n");
|
||||
memset(&pStaticParam->SimIccid,'\0',SF_ICCID_MAX_LEN);
|
||||
return SF_4G_ERROR_NO_SIMCARD;
|
||||
|
@ -763,6 +766,8 @@ SINT32 eg91_sim_init(SF_FN_PARAM_S *pfnParam)
|
|||
MLOGD("%s\n", GsnNow);
|
||||
|
||||
sprintf(pStaticParam->ModuleImei, "%s", GsnNow);
|
||||
pStaticParam->DailyReportTime.Hour = ((UINT16)(pStaticParam->ModuleImei[11]-48)*10+(pStaticParam->ModuleImei[12]-48))%12;
|
||||
pStaticParam->DailyReportTime.Min = ((UINT16)(pStaticParam->ModuleImei[13]-48)*10+(pStaticParam->ModuleImei[14]-48))%60;
|
||||
//LOGI_R("%s", sim_info_t2->ModuleImei);
|
||||
MLOGD("imei:%s\n", pStaticParam->ModuleImei);
|
||||
|
||||
|
@ -1329,8 +1334,8 @@ SINT32 eg91_register_net_auto(SF_FN_PARAM_S *pfnParam)
|
|||
#if SF_QLOG_ENABLE
|
||||
SF_PDT_PARAM_CFG_S *pstparam = pfnParam->pstParam;
|
||||
#endif
|
||||
UIMenuStoreInfo *pStaticParam = pfnParam->pstaticParam;
|
||||
|
||||
//UIMenuStoreInfo *pStaticParam = pfnParam->pstaticParam;
|
||||
UIMenuStoreInfo *pStaticParam = sf_app_ui_para_get();
|
||||
|
||||
while(sts)
|
||||
{
|
||||
|
@ -1357,6 +1362,7 @@ SINT32 eg91_register_net_auto(SF_FN_PARAM_S *pfnParam)
|
|||
callTime++;
|
||||
if(callTime > 50)
|
||||
{
|
||||
sf_set_sim_insert(0);
|
||||
MLOGE("SimCard not inserted.\n");
|
||||
return SF_4G_ERROR_NO_SIMCARD;
|
||||
|
||||
|
@ -1369,7 +1375,7 @@ SINT32 eg91_register_net_auto(SF_FN_PARAM_S *pfnParam)
|
|||
}
|
||||
else if(strstr(ttyData, "+QSIMSTAT: 0,1"))
|
||||
{
|
||||
|
||||
sf_set_sim_insert(1);
|
||||
#if SF_QLOG_ENABLE
|
||||
|
||||
if(pstparam->DebugMode)
|
||||
|
@ -1443,6 +1449,7 @@ SINT32 eg91_register_net_auto(SF_FN_PARAM_S *pfnParam)
|
|||
else if(strstr(ttyData, "+CPIN: NOT INSERTED"))
|
||||
{
|
||||
MLOGE("SimCard not inserted.\n");
|
||||
sf_set_sim_insert(0);
|
||||
return SF_4G_ERROR_NO_SIMCARD;
|
||||
}
|
||||
else
|
||||
|
@ -1643,9 +1650,7 @@ SINT32 eg91_register_net_auto(SF_FN_PARAM_S *pfnParam)
|
|||
if(strstr(ttyData, "No Service"))
|
||||
{
|
||||
pStaticParam->NetGeneration = 2;
|
||||
}
|
||||
else if (NULL != strtok(ttyData,"\""))
|
||||
{
|
||||
}else if (NULL != strtok(ttyData,"\"")){
|
||||
SF_CHAR netStr[20] = { 0 };
|
||||
strcpy(netStr, strtok(NULL,"\""));
|
||||
MLOGD("netStr:%s\n", netStr);
|
||||
|
@ -1671,9 +1676,7 @@ SINT32 eg91_register_net_auto(SF_FN_PARAM_S *pfnParam)
|
|||
sprintf(ttyData, "AT+QCSQ\r");
|
||||
sf_hal_ttyusb2_write(ttyData, strlen(ttyData));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
}else{
|
||||
enMmcLocation = SIM_REG_NET_CSQ;
|
||||
sprintf(ttyData, "AT+CSQ\r");
|
||||
sf_hal_ttyusb2_write(ttyData, strlen(ttyData));
|
||||
|
@ -1698,16 +1701,16 @@ SINT32 eg91_register_net_auto(SF_FN_PARAM_S *pfnParam)
|
|||
MLOGI("pStr:%s\n", pStr);
|
||||
csq = 0 - atoi(pStr);
|
||||
MLOGD("csq:%d\n", csq);
|
||||
pStaticParam->SimSignal = (UINT8)csq;
|
||||
if(pStaticParam->SimSignal == 0)
|
||||
sf_set_cq_signal(csq);
|
||||
if(csq == 0)
|
||||
{
|
||||
pStaticParam->SimSignal = 105;
|
||||
sf_set_cq_signal(105);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
pStaticParam->SimSignal = 0;
|
||||
sf_set_cq_signal(0);
|
||||
ret = SF_4G_ERROR_NO_SIGNAL;
|
||||
}
|
||||
MLOGD("apn:%s\n", pStaticParam->Sim4gApn);
|
||||
|
@ -1740,13 +1743,13 @@ SINT32 eg91_register_net_auto(SF_FN_PARAM_S *pfnParam)
|
|||
else
|
||||
{
|
||||
callTime = 0;
|
||||
pStaticParam->SimSignal = 0;
|
||||
sf_set_cq_signal(0);
|
||||
return SF_4G_ERROR_NO_SIGNAL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pStaticParam->SimSignal = csq;
|
||||
sf_set_cq_signal(csq);
|
||||
ret = SF_SUCCESS;
|
||||
MLOGD("apn:%s\n", pStaticParam->Sim4gApn);
|
||||
return SF_SUCCESS;
|
||||
|
@ -1799,8 +1802,8 @@ SINT32 eg91_register_net_manual(SF_FN_PARAM_S *pfnParam)
|
|||
SF_CHAR *pTemp = NULL;
|
||||
SIM_REG_NET_e enMmcLocation;
|
||||
enMmcLocation = SIM_REG_NET_FIRST;
|
||||
UIMenuStoreInfo *pStaticParam = pfnParam->pstaticParam;
|
||||
|
||||
//UIMenuStoreInfo *pStaticParam = pfnParam->pstaticParam;
|
||||
UIMenuStoreInfo *pStaticParam = sf_app_ui_para_get();
|
||||
|
||||
while(sts)
|
||||
{
|
||||
|
@ -1942,9 +1945,7 @@ SINT32 eg91_register_net_manual(SF_FN_PARAM_S *pfnParam)
|
|||
if(strstr(ttyData, "No Service"))
|
||||
{
|
||||
pStaticParam->NetGeneration = 2;
|
||||
}
|
||||
else if (NULL != strtok(ttyData,"\""))
|
||||
{
|
||||
}else if (NULL != strtok(ttyData,"\"")){
|
||||
SF_CHAR netStr[20] = { 0 };
|
||||
strcpy(netStr, strtok(NULL,"\""));
|
||||
MLOGD("netStr:%s\n", netStr);
|
||||
|
@ -2014,10 +2015,10 @@ SINT32 eg91_register_net_manual(SF_FN_PARAM_S *pfnParam)
|
|||
printf("pStr:%s\n", pStr);
|
||||
csq = 0 - atoi(pStr);
|
||||
MLOGD("SINT32:%d\n", csq);
|
||||
pStaticParam->SimSignal = (UINT8)csq;
|
||||
sf_set_cq_signal(csq);
|
||||
//ret = sf_auto_operation_adaptation(sim_info_t->OperatorCode, sim_info_t);
|
||||
|
||||
if(pStaticParam->SimSignal == 0)
|
||||
if(csq == 0)
|
||||
{
|
||||
callTime++;
|
||||
|
||||
|
@ -2029,7 +2030,7 @@ SINT32 eg91_register_net_manual(SF_FN_PARAM_S *pfnParam)
|
|||
}
|
||||
else
|
||||
{
|
||||
pStaticParam->SimSignal = 105;
|
||||
sf_set_cq_signal(105);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2043,7 +2044,7 @@ SINT32 eg91_register_net_manual(SF_FN_PARAM_S *pfnParam)
|
|||
}
|
||||
else
|
||||
{
|
||||
pStaticParam->SimSignal = 0;
|
||||
sf_set_cq_signal(0);
|
||||
ret = SF_4G_ERROR_NO_SIGNAL;
|
||||
enMmcLocation = SIM_REG_NET_SAVE;
|
||||
sprintf(ttyData, "AT&W\r");
|
||||
|
@ -2079,13 +2080,13 @@ SINT32 eg91_register_net_manual(SF_FN_PARAM_S *pfnParam)
|
|||
else
|
||||
{
|
||||
callTime = 0;
|
||||
pStaticParam->SimSignal = 0;
|
||||
sf_set_cq_signal(0);
|
||||
ret = SF_4G_ERROR_NO_SIGNAL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pStaticParam->SimSignal = csq;
|
||||
sf_set_cq_signal(csq);
|
||||
//ret = sf_auto_operation_adaptation(sim_info_t->OperatorCode, sim_info_t);
|
||||
ret = SF_SUCCESS;
|
||||
MLOGD("apn:%s\n", pStaticParam->Sim4gApn);
|
||||
|
@ -2306,6 +2307,9 @@ SINT32 sf_quectel_module_complete_init(void)
|
|||
if(strcasecmp((const char *)strNow, (const char *)puiPara->ModuleImei) != 0)
|
||||
{
|
||||
strncpy((char *)puiPara->ModuleImei, (const char *)strNow, MODULE_IMEI_LEN);
|
||||
puiPara->DailyReportTime.Hour = ((UINT16)(puiPara->ModuleImei[11]-48)*10+(puiPara->ModuleImei[12]-48))%12;
|
||||
puiPara->DailyReportTime.Min = ((UINT16)(puiPara->ModuleImei[13]-48)*10+(puiPara->ModuleImei[14]-48))%60;
|
||||
|
||||
SLOGI(puiPara->ModuleImei);
|
||||
SF_DEBUG("ModuleImei=%s", puiPara->ModuleImei);
|
||||
}
|
||||
|
@ -3975,38 +3979,29 @@ UINT8 sf_get_pdp_index(void)
|
|||
Return: N/A
|
||||
Others: N/A
|
||||
*************************************************/
|
||||
void sf_custom_str_get(UINT8 *pCustomStr)
|
||||
void sf_custom_str_get(UINT8 *pStr)
|
||||
{
|
||||
UINT8 customStr[50] = { 0 };
|
||||
UIMenuStoreInfo *pPara = sf_app_ui_para_get();
|
||||
UINT8 datestr[20] = { 0 };
|
||||
SF_PARA_TIME_S drRtcTime;
|
||||
|
||||
printf("[%s:%d]pPara->CamNameSwitch=%d,pPara->CamNameStr:%s\n", __FUNCTION__, __LINE__, pPara->CamNameSwitch, pPara->CamNameStr);
|
||||
sf_sys_rtc_time_get(&drRtcTime);
|
||||
printf("[%s:%d]pPara->CamNameSwitch:%d,pPara->CamNameStr:%s\n", __FUNCTION__, __LINE__, pPara->CamNameSwitch, pPara->CamNameStr);
|
||||
|
||||
#if CUSTOM_STR
|
||||
|
||||
if(pPara->CamNameSwitch == SF_CAMID_ON)
|
||||
if(pPara->DateStyle == SF_DATE_TIME_YYMMDD)
|
||||
{
|
||||
sprintf((char *)customStr, "%s-", pPara->CamNameStr);
|
||||
sprintf((char *)datestr, "%d%02d%02d%02d%02d%02d", drRtcTime.Year, drRtcTime.Mon, drRtcTime.Day, drRtcTime.Hour, drRtcTime.Min, drRtcTime.Sec);
|
||||
}
|
||||
else if (pPara->DateStyle == SF_DATE_TIME_MMDDYY)
|
||||
{
|
||||
sprintf((char *)datestr, "%02d%02d%d%02d%02d%02d", drRtcTime.Mon, drRtcTime.Day, drRtcTime.Year, drRtcTime.Hour, drRtcTime.Min, drRtcTime.Sec);
|
||||
}
|
||||
else
|
||||
{
|
||||
customStr[0] = '\0';
|
||||
sprintf((char *)datestr, "%02d%02d%d%02d%02d%02d", drRtcTime.Day, drRtcTime.Mon, drRtcTime.Year,drRtcTime.Hour, drRtcTime.Min, drRtcTime.Sec);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
if(pPara->CamNameSwitch == SF_CAMID_ON)
|
||||
{
|
||||
sprintf((char *)customStr, "%s-", pPara->CamNameStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
customStr[0] = '\0';
|
||||
}
|
||||
|
||||
#endif
|
||||
printf("[%s:%d]customStr:%s\n", __FUNCTION__, __LINE__, customStr);
|
||||
sprintf((char *)pCustomStr, "%s", customStr);
|
||||
printf("[%s:%d]customStr:%s\n", __FUNCTION__, __LINE__, datestr);
|
||||
sprintf((char *)pStr, "%s", datestr);
|
||||
}
|
||||
|
||||
void sf_get_send_video_fname(UINT8 *videoDirKey, UINT8 *videoFname)
|
||||
|
|
|
@ -67,6 +67,7 @@ UINT8 smtpUploadPicFlag = 0; /*0:smtp upload pic fail; 1:success.*/
|
|||
UINT8 smtpUploadVideoFlag = 0; /*0:smtp upload video fail; 1:success.*/
|
||||
UINT8 sendPicSuccessFlag = 0;
|
||||
UINT8 sendVideoSuccessFlag = 0;
|
||||
UINT8 DailyReportFtpSendSucess = 0;
|
||||
extern char logStr[128];
|
||||
extern char gsmPara[GPRS_INFO_LINE_MAX];
|
||||
|
||||
|
@ -287,12 +288,12 @@ SINT32 sf_ftp_config(UINT8 ssl, UINT8 GprsMode, UINT8 timeout)
|
|||
|
||||
if(strstr((const char *)gsmPara, "OK"))
|
||||
{
|
||||
if((pPara->FtpSwitch == 0))
|
||||
if((0 == pPara->FtpSwitch))
|
||||
{
|
||||
eFtpLocation = FTP_SIM_CCHSTART;
|
||||
sprintf((char *)gsmPara, "AT+QFTPCFG=\"account\",\"%s\",\"%s\"\r", pPara->FtpUsr, pPara->FtpPwd);
|
||||
}
|
||||
else if((pPara->FtpSwitch == 2))//ftps
|
||||
else if((2 == pPara->FtpSwitch))//ftps
|
||||
{
|
||||
eFtpLocation = FTP_SIM_QSSLCFG0;
|
||||
sprintf((char *)gsmPara, "AT+QFTPCFG=\"account\",\"%s\",\"%s\"\r", pPara->FtpsUsr, pPara->FtpsPwd);
|
||||
|
@ -367,11 +368,11 @@ SINT32 sf_ftp_config(UINT8 ssl, UINT8 GprsMode, UINT8 timeout)
|
|||
eFtpLocation = FTP_SIM_EXIT;
|
||||
printf("[%s:%d]log ftp\n", __FUNCTION__, __LINE__);
|
||||
|
||||
if((pPara->FtpSwitch == 0))
|
||||
if((0 == pPara->FtpSwitch))
|
||||
{
|
||||
sprintf((char *)gsmPara, "AT+QFTPOPEN=\"%s\",%s\r", pPara->FtpIp, pPara->FtpPort);
|
||||
}
|
||||
else if((pPara->FtpSwitch == 2))
|
||||
else if((2 == pPara->FtpSwitch))
|
||||
{
|
||||
sprintf((char *)gsmPara, "AT+QFTPOPEN=\"%s\",%s\r", pPara->FtpsIp, pPara->FtpsPort);
|
||||
}
|
||||
|
@ -573,7 +574,8 @@ SINT32 sf_ftp_send(UINT8 *ftpFileName, UINT8 *filePath, UINT8 timeout)
|
|||
|
||||
if(gsmPara[0] != '\0')
|
||||
{
|
||||
printf("%s:%d %d \n%s\n", __FUNCTION__, __LINE__, eFtpLocation, gsmPara);
|
||||
//printf("%s:%d %d \n%s\n", __FUNCTION__, __LINE__, eFtpLocation, gsmPara);
|
||||
SLOGI(" %d \n%s\n", eFtpLocation, gsmPara);
|
||||
}
|
||||
|
||||
time++;
|
||||
|
@ -748,7 +750,8 @@ SINT32 sf_ftp_stop(UINT8 ssl, UINT8 GprsMode)
|
|||
|
||||
if(gsmPara[0] != '\0')
|
||||
{
|
||||
printf("eFtpLocation=%d,time=%d\ngsmPara:%s\n", eFtpLocation, time, gsmPara);
|
||||
//printf("eFtpLocation=%d,time=%d\ngsmPara:%s\n", eFtpLocation, time, gsmPara);
|
||||
SLOGI("eFtpLocation=%d,time=%d\ngsmPara:%s", eFtpLocation, time, gsmPara);
|
||||
}
|
||||
|
||||
time++;
|
||||
|
@ -780,17 +783,21 @@ SINT32 sf_pic_send_ftp(void)
|
|||
UINT8 ftpFileName[5][64] = { { 0 } };
|
||||
UINT8 filePath[5][64] = { { 0 } };
|
||||
UINT8 fileStr[5][64] = { { 0 } };
|
||||
UINT8 cameraID[20] = { 0 };
|
||||
char cameraID[64] = { 0 };
|
||||
UINT8 CamNameStr[64] = { 0 };
|
||||
UIMenuStoreInfo *pPara = sf_app_ui_para_get();
|
||||
SINT32 ret = SF_SUCCESS;
|
||||
UINT8 tempPicSize = 0;
|
||||
UINT8 piccount = 0;
|
||||
UINT8 pic = 0;
|
||||
|
||||
UINT8 csqlevel = 0;
|
||||
UINT8 timeout = 60;
|
||||
SF_SRCFILE_ATTR_S *pThumbFileCfg = sf_file_thumb_cfg_get();
|
||||
|
||||
sf_custom_str_get(cameraID);
|
||||
sf_custom_str_get(CamNameStr);
|
||||
sf_4G_signal_level_get(pPara->NetGeneration,sf_get_cq_signal(),&csqlevel);
|
||||
|
||||
snprintf(cameraID, sizeof(cameraID), "%s-%d-%d-%s-", pPara->ModuleImei, sf_app_get_battery(), csqlevel, CamNameStr); /* DCF 8.3 naming rule */
|
||||
|
||||
if(4 == pPara->NetGeneration)
|
||||
{
|
||||
|
@ -814,36 +821,10 @@ SINT32 sf_pic_send_ftp(void)
|
|||
timeout = 120;
|
||||
}
|
||||
|
||||
/*if(((pPara->CamMode == 1) || (pPara->CamMode == 2)) && (pPara->SendVideoSwitch == 1) && (pPara->NetGeneration == 4)) //video
|
||||
{
|
||||
timeout = 100;
|
||||
}
|
||||
else if((2 == pPara->SendPicSize) && (((pPara->CamMode == 0) || (pPara->CamMode == 2)) && (pPara->SendPhotoSwitch == 1))) //pic(+video)
|
||||
{
|
||||
timeout = 100;
|
||||
}*/
|
||||
|
||||
printf("NetGeneration:%dG,tempPicSize=%d,piccount=%d,pic=%d\n", pPara->NetGeneration, tempPicSize, piccount, pic);
|
||||
|
||||
if((pPara->SendMultishotIndex1) || (SF_MANUAL == sf_get_mode_flag()))
|
||||
{
|
||||
/*sprintf((char *)ftpFileName[piccount], "%s%s", cameraID, PicName[0][1]);
|
||||
|
||||
if(2 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)fileStr[piccount], "%s\\%s%s\\%s", SF_DCIM_DIR, PicName[0][0], DCF_DIR_FREE_CHAR, PicName[0][1]);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", PicName[0][1]);
|
||||
}
|
||||
else if(1 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)fileStr[piccount], "%s\\%s", SF_THUMB_BIG_DIR, PicName[0][1]);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", PicName[0][1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf((char *)fileStr[piccount], "%s\\%s", SF_THUMB_SMALL_DIR, PicName[0][1]);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", PicName[0][1]);
|
||||
}*/
|
||||
sprintf((char *)ftpFileName[piccount], "%s%s", cameraID, pThumbFileCfg->stfileattr[0].thumbfileName);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", pThumbFileCfg->stfileattr[0].thumbfileName);
|
||||
|
||||
|
@ -854,23 +835,6 @@ SINT32 sf_pic_send_ftp(void)
|
|||
{
|
||||
if(pPara->SendMultishotIndex2)
|
||||
{
|
||||
/*sprintf((char *)ftpFileName[piccount], "%s%s", cameraID, PicName[1][1]);
|
||||
|
||||
if(2 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)fileStr[piccount], "%s\\%s%s\\%s", SF_DCIM_DIR, PicName[1][0], DCF_DIR_FREE_CHAR, PicName[1][1]);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", PicName[1][1]);
|
||||
}
|
||||
else if(1 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)fileStr[piccount], "%s\\%s", SF_THUMB_BIG_DIR, PicName[1][1]);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", PicName[1][1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf((char *)fileStr[piccount], "%s\\%s", SF_THUMB_SMALL_DIR, PicName[1][1]);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", PicName[1][1]);
|
||||
}*/
|
||||
sprintf((char *)ftpFileName[piccount], "%s%s", cameraID, pThumbFileCfg->stfileattr[1].thumbfileName);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", pThumbFileCfg->stfileattr[1].thumbfileName);
|
||||
|
||||
|
@ -879,23 +843,6 @@ SINT32 sf_pic_send_ftp(void)
|
|||
|
||||
if(pPara->SendMultishotIndex3)
|
||||
{
|
||||
/*sprintf((char *)ftpFileName[piccount], "%s%s", cameraID, PicName[2][1]);
|
||||
|
||||
if(2 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)fileStr[piccount], "%s\\%s%s\\%s", SF_DCIM_DIR, PicName[2][0], DCF_DIR_FREE_CHAR, PicName[2][1]);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", PicName[2][1]);
|
||||
}
|
||||
else if(1 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)fileStr[piccount], "%s\\%s", SF_THUMB_BIG_DIR, PicName[2][1]);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", PicName[2][1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf((char *)fileStr[piccount], "%s\\%s", SF_THUMB_SMALL_DIR, PicName[2][1]);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", PicName[2][1]);
|
||||
}*/
|
||||
sprintf((char *)ftpFileName[piccount], "%s%s", cameraID, pThumbFileCfg->stfileattr[2].thumbfileName);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", pThumbFileCfg->stfileattr[2].thumbfileName);
|
||||
|
||||
|
@ -904,23 +851,6 @@ SINT32 sf_pic_send_ftp(void)
|
|||
|
||||
if(pPara->SendMultishotIndex4)
|
||||
{
|
||||
/*sprintf((char *)ftpFileName[piccount], "%s%s", cameraID, PicName[3][1]);
|
||||
|
||||
if(2 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)fileStr[piccount], "%s\\%s%s\\%s", SF_DCIM_DIR, PicName[3][0], DCF_DIR_FREE_CHAR, PicName[3][1]);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", PicName[3][1]);
|
||||
}
|
||||
else if(1 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)fileStr[piccount], "%s\\%s", SF_THUMB_BIG_DIR, PicName[3][1]);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", PicName[3][1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf((char *)fileStr[piccount], "%s\\%s", SF_THUMB_SMALL_DIR, PicName[3][1]);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", PicName[3][1]);
|
||||
}*/
|
||||
sprintf((char *)ftpFileName[piccount], "%s%s", cameraID, pThumbFileCfg->stfileattr[3].thumbfileName);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", pThumbFileCfg->stfileattr[3].thumbfileName);
|
||||
|
||||
|
@ -929,23 +859,6 @@ SINT32 sf_pic_send_ftp(void)
|
|||
|
||||
if(pPara->SendMultishotIndex5)
|
||||
{
|
||||
/*sprintf((char *)ftpFileName[piccount], "%s%s", cameraID, PicName[4][1]);
|
||||
|
||||
if(2 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)fileStr[piccount], "%s\\%s%s\\%s", SF_DCIM_DIR, PicName[4][0], DCF_DIR_FREE_CHAR, PicName[4][1]);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", PicName[4][1]);
|
||||
}
|
||||
else if(1 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)fileStr[piccount], "%s\\%s", SF_THUMB_BIG_DIR, PicName[4][1]);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", PicName[4][1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf((char *)fileStr[piccount], "%s\\%s", SF_THUMB_SMALL_DIR, PicName[4][1]);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", PicName[4][1]);
|
||||
}*/
|
||||
sprintf((char *)ftpFileName[piccount], "%s%s", cameraID, pThumbFileCfg->stfileattr[4].thumbfileName);
|
||||
sprintf((char *)filePath[piccount], "UFS:/%s", pThumbFileCfg->stfileattr[4].thumbfileName);
|
||||
|
||||
|
@ -1005,8 +918,8 @@ SINT32 sf_video_send_ftp(void)
|
|||
//extern UINT8 PicName[5][2][35];
|
||||
UINT8 ftpFileName[64] = { 0 };
|
||||
UINT8 filePath[64] = { 0 };
|
||||
//UINT8 fileStr[64] = {0};
|
||||
UINT8 cameraID[20] = { 0 };
|
||||
UINT8 CamNameStr[64] = {0};
|
||||
char cameraID[64] = { 0 };
|
||||
//UINT8 videoDirKey[4] = { 0 };
|
||||
UINT8 videoDir[64] = { 0 };
|
||||
//UINT8 videoFname[15] = { 0 };
|
||||
|
@ -1017,9 +930,13 @@ SINT32 sf_video_send_ftp(void)
|
|||
UINT8 pic = 0;
|
||||
UINT8 timeout = 120;
|
||||
UINT8 fileIndex = 0;
|
||||
UINT8 csqlevel = 0;
|
||||
SF_SRCFILE_ATTR_S *pThumbFileCfg = sf_file_thumb_cfg_get();
|
||||
|
||||
sf_custom_str_get(cameraID);
|
||||
sf_custom_str_get(CamNameStr);
|
||||
sf_4G_signal_level_get(pPara->NetGeneration,sf_get_cq_signal(),&csqlevel);
|
||||
|
||||
snprintf(cameraID, sizeof(cameraID), "%s-%d-%d-%s-", pPara->ModuleImei, sf_app_get_battery(), csqlevel, CamNameStr); /* DCF 8.3 naming rule */
|
||||
|
||||
printf("NetGeneration:%dG,tempPicSize=%d,piccount=%d,pic=%d\n", pPara->NetGeneration, tempPicSize, piccount, pic);
|
||||
/*sf_get_send_video_fname(videoDirKey, videoFname);
|
||||
|
@ -1059,26 +976,27 @@ SINT32 sf_video_send_ftp(void)
|
|||
SINT32 sf_simcom_ftp_dailyreport_send(void)
|
||||
{
|
||||
SINT32 ret = SF_SUCCESS;
|
||||
#if 0
|
||||
UINT8 CamNameStr[20] = { 0 };
|
||||
//UINT8 CamNameStr[20] = { 0 };
|
||||
UINT8 uploadFname[64] = { 0 };
|
||||
UINT8 customStr[64] = { 0 };
|
||||
UINT8 filePath[64] = { 0 };
|
||||
UINT8 timeout = 60;
|
||||
UIMenuStoreInfo *pPara = sf_app_ui_para_get();
|
||||
|
||||
printf("%s:%d start\n", __FUNCTION__, __LINE__);
|
||||
|
||||
if(SF_SUCCESS != sf_create_send_dailyreport())
|
||||
if(SUCCESS != sf_create_dailyreport_file())
|
||||
{
|
||||
printf("%s:%d err create dailyreport file\n", __FUNCTION__, __LINE__);
|
||||
return SF_FAILURE;
|
||||
}
|
||||
|
||||
sprintf((char *)filePath, "UFS:/%s", SF_DAILYREPORT_TXT);
|
||||
sprintf((char *)filePath, "UFS:/%s-dr.txt", pPara->ModuleImei);
|
||||
|
||||
printf("%s:%d filePath:%s\n", __FUNCTION__, __LINE__, filePath);
|
||||
sf_custom_send_str_get((UINT8 *)SF_DAILYREPORT_FILENAME, customStr);
|
||||
sf_custom_str_get(CamNameStr);
|
||||
sprintf((char *)uploadFname, "%s-%s%s", customStr, CamNameStr, SF_DAILYREPORT_TXT);
|
||||
//sf_custom_send_str_get((UINT8 *)SF_DAILYREPORT_FILENAME, customStr);
|
||||
sf_custom_str_get(customStr);
|
||||
sprintf((char *)uploadFname, "%s-%s-dr.txt",pPara->ModuleImei, customStr);
|
||||
|
||||
ret = sf_quectel_upload_file_to_module((UINT8 *)SF_DAILYREPORT_FILENAME, (UINT8 *)SF_DAILYREPORT_TXT);
|
||||
|
||||
|
@ -1093,9 +1011,11 @@ SINT32 sf_simcom_ftp_dailyreport_send(void)
|
|||
if(SF_SUCCESS != ret)
|
||||
{
|
||||
printf("%s:%d err ret: [0x%08X] filePath:%s\n", __FUNCTION__, __LINE__, ret, filePath);
|
||||
}else {
|
||||
DailyReportFtpSendSucess = 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
printf("[%s:%d]ret:[0x%08X]\n\n", __FUNCTION__, __LINE__, ret);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ static UINT8 sf_3g_net_level_get(UINT8 simSignal)
|
|||
else
|
||||
return 4;
|
||||
|
||||
return SF_SUCCESS;
|
||||
//return SF_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -160,9 +160,9 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
//sf_wifi_app_start();
|
||||
}
|
||||
//#if
|
||||
//app_RegisterNet_start();
|
||||
//#endif
|
||||
#if SF_IQ_TEST != ENABLE
|
||||
app_RegisterNet_start();
|
||||
#endif
|
||||
SLOGD("poweron type beginning :[%d,%s]\n", startup, sf_poweron_type_string(startup));
|
||||
/*if(SF_MCU_STARTUP_ONKEY != startup)
|
||||
{
|
||||
|
|
|
@ -52,7 +52,8 @@ extern "C" {
|
|||
#include "sf_service.h"
|
||||
#include <FileSysTsk.h>
|
||||
//#include "sf_wifi_svr.h"
|
||||
|
||||
#include <sf_file.h>
|
||||
#include <sf_commMng.h>
|
||||
|
||||
extern pthread_mutex_t Param_mutexLock;
|
||||
SINT8 longClickhold = 0;
|
||||
|
@ -106,6 +107,10 @@ const SF_CHAR* app_process_message_getstatusstring(SF_MESSAGE_TYPE_E enType)
|
|||
return "CMD_PARA";
|
||||
case CMD_GPRS:
|
||||
return "CMD_GPRS";
|
||||
case CMD_WIFI:
|
||||
return "CMD_GPRS";
|
||||
case CMD_DEV:
|
||||
return "CMD_GPRS";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
|
@ -437,7 +442,7 @@ static SINT32 process_cmd_holdup(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
}
|
||||
return SF_SUCCESS;
|
||||
}
|
||||
static SINT32 app_process_cmd_keyctrl(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
static SINT32 sf_app_process_cmd_keyctrl(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
SF_MESSAGE_CMD_KEY_E enEventkey = pMessageBuf->arg1;
|
||||
MLOGI("[%d,%s],[%d,%s]\n", pMessageBuf->arg1,\
|
||||
|
@ -488,10 +493,10 @@ static SINT32 app_process_cmd_keyctrl(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
|
||||
return SF_SUCCESS;
|
||||
}
|
||||
static SINT32 app_process_cmd_SD(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
static SINT32 sf_app_process_cmd_SD(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
static SINT8 bsdstatus = 0;
|
||||
static SINT8 bsdoutstatus = 0;
|
||||
//static SINT8 bsdstatus = 0;
|
||||
//static SINT8 bsdoutstatus = 0;
|
||||
UINT32 status;
|
||||
MLOGI("[%d,%s]\n",pMessageBuf->arg1,app_process_SD_getstatusstring(pMessageBuf->arg1));
|
||||
switch(pMessageBuf->arg1)
|
||||
|
@ -517,12 +522,14 @@ static SINT32 app_process_cmd_SD(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
sf_set_card(1);
|
||||
sf_sd_status_set(SF_SD_OK);
|
||||
sf_sys_status_led_set(SF_LED_SYS_STATE_SD_NORMAL);
|
||||
sf_statistics_param_load(sf_statistics_param_get());
|
||||
MLOGI("card-%d mount OK\r\n", pMessageBuf->arg2 + 1);
|
||||
break;
|
||||
case FST_STA_DISK_UNFORMAT:
|
||||
sf_set_card(1);
|
||||
sf_sd_status_set(SF_SD_OK);
|
||||
sf_sys_status_led_set(SF_LED_SYS_STATE_SD_NORMAL);
|
||||
sf_statistics_param_load(sf_statistics_param_get());
|
||||
MLOGI("^Rcard-%d mount FAIL: Unformat\r\n", pMessageBuf->arg2 + 1);
|
||||
break;
|
||||
case FST_STA_DISK_UNKNOWN_FORMAT:
|
||||
|
@ -629,7 +636,7 @@ static SINT32 app_process_cmd_SD(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
}
|
||||
return SF_SUCCESS;
|
||||
}
|
||||
static SINT32 app_proccess_cmd_file(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
static SINT32 sf_app_proccess_cmd_file(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
#ifdef SF_HARDWARE_TEST
|
||||
app_system_poweroff(SF_POWEROFF_NOT);
|
||||
|
@ -646,7 +653,7 @@ static SINT32 app_proccess_cmd_file(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
}
|
||||
return SF_SUCCESS;
|
||||
}
|
||||
static SINT32 app_proccess_cmd_poweroff(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
static SINT32 sf_app_proccess_cmd_poweroff(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
return app_system_poweroff(pMessageBuf->arg1);
|
||||
}
|
||||
|
@ -661,7 +668,7 @@ static void app_proccess_cmd_led(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
sf_led_event_process(pMessageBuf->arg1,pMessageBuf->arg2,pMessageBuf->arg3);
|
||||
}
|
||||
|
||||
static SINT32 app_proccess_cmd_mcu(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
static SINT32 sf_app_proccess_cmd_mcu(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
MLOGI("ID = %#x\n",pMessageBuf->arg1);
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
|
@ -694,7 +701,7 @@ static SINT32 app_proccess_cmd_mcu(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
return SF_SUCCESS;
|
||||
}
|
||||
|
||||
static SINT32 app_proccess_cmd_para_update(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
static SINT32 sf_app_proccess_cmd_para_update(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
MLOGI("ID = %#x\n",pMessageBuf->arg1);
|
||||
|
||||
|
@ -710,7 +717,7 @@ static SINT32 app_proccess_cmd_para_update(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
return SF_SUCCESS;
|
||||
}
|
||||
|
||||
static SINT32 sf_proccess_cmd_wifi(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
static SINT32 sf_app_proccess_cmd_wifi(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
MLOGI("ID = %#x\n",pMessageBuf->arg1);
|
||||
|
||||
|
@ -766,6 +773,25 @@ static SINT32 app_proccess_cmd_venc(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
return SF_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
static SINT32 sf_app_proccess_cmd_dev(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
MLOGI("ID = %#x\n",pMessageBuf->arg1);
|
||||
|
||||
switch(pMessageBuf->arg1)
|
||||
{
|
||||
case SF_DEV_CMD_TEMPER:
|
||||
sf_app_set_temper(pMessageBuf->arg2);
|
||||
break;
|
||||
case SF_DEV_CMD_BAT:
|
||||
sf_app_set_battery(pMessageBuf->arg2, pMessageBuf->arg3);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return SF_SUCCESS;
|
||||
}
|
||||
|
||||
void* app_message_recv_thread(void *arg)
|
||||
{
|
||||
SINT32 ret = 0;
|
||||
|
@ -781,20 +807,20 @@ void* app_message_recv_thread(void *arg)
|
|||
switch(stMessagebuf.cmdId)
|
||||
{
|
||||
case CMD_KEY:
|
||||
app_process_cmd_keyctrl(&stMessagebuf);
|
||||
sf_app_process_cmd_keyctrl(&stMessagebuf);
|
||||
break;
|
||||
case CMD_SD:
|
||||
app_process_cmd_SD(&stMessagebuf);
|
||||
sf_app_process_cmd_SD(&stMessagebuf);
|
||||
break;
|
||||
case CMD_LED:
|
||||
sf_sys_status_led_set(stMessagebuf.arg1);
|
||||
//app_proccess_cmd_led(&stMessagebuf);
|
||||
break;
|
||||
case CMD_FILE:
|
||||
app_proccess_cmd_file(&stMessagebuf);
|
||||
sf_app_proccess_cmd_file(&stMessagebuf);
|
||||
break;
|
||||
case CMD_POWEROFF:
|
||||
app_proccess_cmd_poweroff(&stMessagebuf);
|
||||
sf_app_proccess_cmd_poweroff(&stMessagebuf);
|
||||
break;
|
||||
#if defined(CFG_LIVE_ENBLE)
|
||||
case CMD_VENC:
|
||||
|
@ -802,13 +828,16 @@ void* app_message_recv_thread(void *arg)
|
|||
break;
|
||||
#endif
|
||||
case CMD_MCU:
|
||||
app_proccess_cmd_mcu(&stMessagebuf);
|
||||
sf_app_proccess_cmd_mcu(&stMessagebuf);
|
||||
break;
|
||||
case CMD_PARA:
|
||||
app_proccess_cmd_para_update(&stMessagebuf);
|
||||
sf_app_proccess_cmd_para_update(&stMessagebuf);
|
||||
break;
|
||||
case CMD_WIFI:
|
||||
sf_proccess_cmd_wifi(&stMessagebuf);
|
||||
sf_app_proccess_cmd_wifi(&stMessagebuf);
|
||||
break;
|
||||
case CMD_DEV:
|
||||
sf_app_proccess_cmd_dev(&stMessagebuf);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -344,6 +344,16 @@ SINT32 app_led_net_reg_start(void)
|
|||
sf_com_message_send_to_app(&stMessageBuf);
|
||||
return SF_SUCCESS;
|
||||
}
|
||||
|
||||
SINT32 sf_app_cq_signal_to_cardv(void)
|
||||
{
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
stMessageBuf.cmdId = CMD_GPRS;
|
||||
stMessageBuf.arg1 = SF_GPRS_CMD_SIGNAL;
|
||||
stMessageBuf.arg2 = sf_get_cq_signal();
|
||||
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
return SF_SUCCESS;
|
||||
}
|
||||
SINT32 app_led_net_reg_stop(SINT32 s32ret)
|
||||
{
|
||||
|
||||
|
@ -351,16 +361,15 @@ SINT32 app_led_net_reg_stop(SINT32 s32ret)
|
|||
UINT8 netSearchStep = sf_get_netsearch_step();
|
||||
if(s32ret == SF_SUCCESS) {
|
||||
UINT8 signalLevel = 0;
|
||||
sf_4G_signal_level_get(puiPara->NetGeneration,puiPara->SimSignal,&signalLevel);
|
||||
sf_4G_signal_level_get(puiPara->NetGeneration,sf_get_cq_signal(),&signalLevel);
|
||||
MLOGI("signalLevel = %d\n",signalLevel);
|
||||
sf_app_cq_signal_to_cardv();
|
||||
if(netSearchStep == GPRS_SEARCH_STEP_LOGIN_FAILED)
|
||||
{
|
||||
sf_sys_status_led_set(SF_LED_SYS_STATE_SERVER_FAIL);
|
||||
}
|
||||
else
|
||||
{
|
||||
sf_set_sim_insert(1);
|
||||
sf_set_cq_signal(puiPara->SimSignal);
|
||||
switch(signalLevel)
|
||||
{
|
||||
case 1:
|
||||
|
@ -385,7 +394,6 @@ SINT32 app_led_net_reg_stop(SINT32 s32ret)
|
|||
|| s32ret == SF_4G_ERROR_NO_SUPPOET \
|
||||
|| s32ret == SF_APP_ERROR_NO_SUPPOET)
|
||||
{
|
||||
sf_set_sim_insert(0);
|
||||
sf_sys_status_led_set(SF_LED_SYS_STATE_SIM_ERROR);
|
||||
}
|
||||
else if(s32ret == SF_HTTP_ERROR_REQUEST) {
|
||||
|
@ -399,7 +407,6 @@ SINT32 app_led_net_reg_stop(SINT32 s32ret)
|
|||
else if(s32ret == SF_4G_ERROR_REG_NET) {
|
||||
sf_sys_status_led_set(SF_LED_SYS_STATE_SIM_ERROR);
|
||||
sf_sys_status_led_set(SF_LED_SYS_STATE_ERROR);
|
||||
sf_set_sim_insert(0);
|
||||
}
|
||||
else {
|
||||
sf_sys_status_led_set(SF_LED_SYS_STATE_ERROR);
|
||||
|
|
|
@ -45,6 +45,10 @@
|
|||
#include "sf_param_common.h"
|
||||
#include "sf_eg91_sim.h"
|
||||
#include "sf_ftp.h"
|
||||
#include "sf_commu_mcu_reg.h"
|
||||
#include "sf_file.h"
|
||||
#include "sf_commMng.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
|
@ -129,7 +133,7 @@ SINT32 sf_USB_net_init(void)
|
|||
static UINT8 flag = 0;
|
||||
SF_CHAR cmdStr[128] = {0};
|
||||
int ret = SF_FAILURE;
|
||||
SF_PDT_PARAM_STATISTICS_S *sfPara = sf_statistics_param_get();
|
||||
//SF_PDT_PARAM_STATISTICS_S *sfPara = sf_statistics_param_get();
|
||||
if(flag == 0)
|
||||
{
|
||||
flag = 1;
|
||||
|
@ -597,7 +601,7 @@ static SINT32 app_server_excute_cmd(SF_FN_PARAM_S *pfnParam)
|
|||
{
|
||||
SINT32 ret = SF_SUCCESS;
|
||||
SF_PDT_PARAM_CFG_S *pParam = (SF_PDT_PARAM_CFG_S*)pfnParam->pstParam;
|
||||
SF_PDT_PARAM_STATISTICS_S *pstaticParam = (SF_PDT_PARAM_STATISTICS_S*)pfnParam->pstaticParam;
|
||||
//SF_PDT_PARAM_STATISTICS_S *pstaticParam = (SF_PDT_PARAM_STATISTICS_S*)pfnParam->pstaticParam;
|
||||
|
||||
|
||||
if(sf_get_login_reponse()->synConfigCommand == 1) {
|
||||
|
@ -999,14 +1003,21 @@ static SINT16 app_file_transfer_Error_return_server(SF_FN_PARAM_S *pfnParam)
|
|||
static SINT32 app_file_transfer(SF_FN_PARAM_S *pfnParam)
|
||||
{
|
||||
SINT32 s32ret = 0;
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
//SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
//UIMenuStoreInfo *pCustomerParam = pfnParam->pstParam;
|
||||
//SF_PDT_PARAM_STATISTICS_S *pStaticParam = pfnParam->pstaticParam;
|
||||
UIMenuStoreInfo *pCustomerParam = pfnParam->pstParam;
|
||||
SF_PDT_PARAM_STATISTICS_S *pStaticParam = pfnParam->pstaticParam;
|
||||
if(sf_usb_IsInsert())
|
||||
return SF_SUCCESS;
|
||||
|
||||
sf_4G_status_set(SF_4G_SENDING);
|
||||
SLOGD("STARTUP:[%d]\n",sf_poweron_type_get());
|
||||
if(sf_get_cq_signal() == 0)
|
||||
{
|
||||
SLOGD("no csq signal\n");
|
||||
return SF_SUCCESS;
|
||||
}
|
||||
|
||||
switch(sf_poweron_type_get())
|
||||
{
|
||||
case SF_MCU_STARTUP_OFF:
|
||||
|
@ -1037,13 +1048,16 @@ static SINT32 app_file_transfer(SF_FN_PARAM_S *pfnParam)
|
|||
case SF_MCU_STARTUP_TIMELAPSE:
|
||||
case SF_MCU_STARTUP_PIR:
|
||||
//sf_share_mem_file_init();
|
||||
sf_check_auto_thumb_file();
|
||||
if(TRUE == sf_check_auto_thumb_file()){
|
||||
s32ret = sf_simcom_ftp_send(1);
|
||||
}
|
||||
|
||||
/*
|
||||
stMessageBuf.cmdId = CMD_KEY;
|
||||
stMessageBuf.arg1 = SF_EVENT_KEY_SHORT_CLICK;
|
||||
stMessageBuf.arg2 = SF_KEY_PIN_AOTU_MODE_POWOFF;//auto mode powoff
|
||||
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
*/
|
||||
break;
|
||||
#if 0
|
||||
case SF_MCU_STARTUP_NORMAL:
|
||||
|
@ -1071,11 +1085,17 @@ static SINT32 app_file_transfer(SF_FN_PARAM_S *pfnParam)
|
|||
case SF_MCU_STARTUP_DP:
|
||||
case SF_MCU_STARTUP_USB:
|
||||
case SF_MCU_STARTUP_RESET:
|
||||
case SF_MCU_STARTUP_SYN_PARAM:
|
||||
|
||||
case SF_MCU_STARTUP_BATCH_SEND:
|
||||
|
||||
break;
|
||||
#endif
|
||||
case SF_MCU_STARTUP_SYN_PARAM:
|
||||
if(pCustomerParam->GpsSendFlag){
|
||||
s32ret = sf_simcom_ftp_send(2);
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1120,10 +1140,10 @@ SINT32 app_FileSend_thread(void)
|
|||
}
|
||||
static SINT32 app_Register_Net_Error_return_setup(SF_FN_PARAM_S *pfnParam,SINT32 s32ret)
|
||||
{
|
||||
SF_PDT_PARAM_STATISTICS_S *pStaticParam = pfnParam->pstaticParam;
|
||||
//SF_PDT_PARAM_STATISTICS_S *pStaticParam = pfnParam->pstaticParam;
|
||||
|
||||
SLOGD("s32ret:%x\n", s32ret);
|
||||
SLOGD("bind flag:%x\n", pStaticParam->bindFlag);
|
||||
//SLOGD("bind flag:%x\n", pStaticParam->bindFlag);
|
||||
if(sf_poweron_type_get() == SF_MCU_STARTUP_ONKEY)
|
||||
{
|
||||
if(SF_TRUE == sf_sys_rtc_time_check(&rtcTime))
|
||||
|
@ -1132,8 +1152,17 @@ static SINT32 app_Register_Net_Error_return_setup(SF_FN_PARAM_S *pfnParam,SINT32
|
|||
}
|
||||
|
||||
app_led_net_reg_stop(s32ret);
|
||||
}else{
|
||||
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
MLOGI(" SF_KEY_PIN_AOTU_MODE_POWOFF\n");
|
||||
stMessageBuf.cmdId = CMD_KEY;
|
||||
stMessageBuf.arg1 = SF_EVENT_KEY_SHORT_CLICK;
|
||||
stMessageBuf.arg2 = SF_KEY_PIN_AOTU_MODE_POWOFF;//auto mode powoff
|
||||
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
RegisterNetTskParam.IsRun = 0;
|
||||
}
|
||||
pStaticParam->u8ResetLimited = 0;
|
||||
//pStaticParam->u8ResetLimited = 0;
|
||||
sf_4G_status_set(SF_4G_FREE);
|
||||
|
||||
return SF_SUCCESS;
|
||||
|
@ -1141,13 +1170,13 @@ static SINT32 app_Register_Net_Error_return_setup(SF_FN_PARAM_S *pfnParam,SINT32
|
|||
}
|
||||
static SINT32 app_Register_Net_Error_return_init(SF_FN_PARAM_S *pfnParam)
|
||||
{
|
||||
SF_PDT_PARAM_CFG_S *pCustomerParam =pfnParam->pstParam;
|
||||
SF_PDT_PARAM_STATISTICS_S *pStaticParam = pfnParam->pstaticParam;
|
||||
//SF_PDT_PARAM_CFG_S *pCustomerParam =pfnParam->pstParam;
|
||||
//SF_PDT_PARAM_STATISTICS_S *pStaticParam = pfnParam->pstaticParam;
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
|
||||
if(sf_poweron_type_get() != SF_MCU_STARTUP_ONKEY)
|
||||
{
|
||||
if(pCustomerParam->GprsMode == 1) {
|
||||
/*if(pCustomerParam->GprsMode == 1) {
|
||||
app_realtime_resetlimited(pStaticParam, pCustomerParam->GprsMode);
|
||||
stMessageBuf.arg1 = (pStaticParam->u8ResetLimited < 3 )?SF_POWEROFF_SYNC_PARAM:SF_POWEROFF_NOT;
|
||||
}
|
||||
|
@ -1155,21 +1184,27 @@ static SINT32 app_Register_Net_Error_return_init(SF_FN_PARAM_S *pfnParam)
|
|||
stMessageBuf.arg1 = SF_POWEROFF_NOT;
|
||||
}
|
||||
stMessageBuf.cmdId = CMD_POWEROFF;
|
||||
sf_com_message_send_to_app(&stMessageBuf);
|
||||
sf_com_message_send_to_app(&stMessageBuf);*/
|
||||
MLOGI(" SF_KEY_PIN_AOTU_MODE_POWOFF CMD_KEY\n");
|
||||
stMessageBuf.cmdId = CMD_KEY;
|
||||
stMessageBuf.arg1 = SF_EVENT_KEY_SHORT_CLICK;
|
||||
stMessageBuf.arg2 = SF_KEY_PIN_AOTU_MODE_POWOFF;//auto mode powoff
|
||||
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
}
|
||||
|
||||
RegisterNetTskParam.IsRun = 0;
|
||||
return SF_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
static SINT32 app_Register_Net_Error_return_server(SF_FN_PARAM_S *pfnParam,SINT32 s32ret)
|
||||
{
|
||||
SF_PDT_PARAM_CFG_S *pCustomerParam = pfnParam->pstParam;
|
||||
SF_PDT_PARAM_STATISTICS_S *pStaticParam = pfnParam->pstaticParam;
|
||||
//SF_PDT_PARAM_CFG_S *pCustomerParam = pfnParam->pstParam;
|
||||
//SF_PDT_PARAM_STATISTICS_S *pStaticParam = pfnParam->pstaticParam;
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
s32ret |= sf_4G_server_close(pfnParam);
|
||||
//s32ret |= sf_4G_server_close(pfnParam);
|
||||
SLOGE("s32ret:%#x\n", s32ret);
|
||||
SLOGD("bind flag:%x\n", pStaticParam->bindFlag);
|
||||
//SLOGD("bind flag:%x\n", pStaticParam->bindFlag);
|
||||
if(sf_poweron_type_get() == SF_MCU_STARTUP_ONKEY)
|
||||
{
|
||||
if(SF_TRUE == sf_sys_rtc_time_check(&rtcTime))
|
||||
|
@ -1183,10 +1218,16 @@ static SINT32 app_Register_Net_Error_return_server(SF_FN_PARAM_S *pfnParam,SINT3
|
|||
else
|
||||
{
|
||||
|
||||
app_realtime_resetlimited(pStaticParam, pCustomerParam->GprsMode);
|
||||
/*app_realtime_resetlimited(pStaticParam, pCustomerParam->GprsMode);
|
||||
stMessageBuf.arg1 = (pStaticParam->u8ResetLimited < 3 )?SF_POWEROFF_SYNC_PARAM:SF_POWEROFF_NOT;
|
||||
stMessageBuf.cmdId = CMD_POWEROFF;
|
||||
sf_com_message_send_to_app(&stMessageBuf);
|
||||
sf_com_message_send_to_app(&stMessageBuf);*/
|
||||
|
||||
MLOGI(" SF_KEY_PIN_AOTU_MODE_POWOFF CMD_KEY\n");
|
||||
stMessageBuf.cmdId = CMD_KEY;
|
||||
stMessageBuf.arg1 = SF_EVENT_KEY_SHORT_CLICK;
|
||||
stMessageBuf.arg2 = SF_KEY_PIN_AOTU_MODE_POWOFF;//auto mode powoff
|
||||
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
}
|
||||
RegisterNetTskParam.IsRun = 0;
|
||||
|
||||
|
@ -1197,15 +1238,14 @@ static SINT32 app_Register_Net_Error_return_server(SF_FN_PARAM_S *pfnParam,SINT3
|
|||
static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
|
||||
{
|
||||
SINT32 s32ret = 0;
|
||||
UINT8 timeCnt = 0;
|
||||
//UINT8 timeCnt = 0;
|
||||
//UINT8 bIsKeepConnect = 0;
|
||||
//SF_CHAR version[12] = {0};
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
//SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
|
||||
//SF_PDT_PARAM_CFG_S *pCustomerParam = pfnParam->pstParam;
|
||||
SF_PDT_PARAM_STATISTICS_S *pStaticParam = pfnParam->pstaticParam;
|
||||
|
||||
UIMenuStoreInfo *pCustomerParam = pfnParam->pstParam;
|
||||
//SF_PDT_PARAM_STATISTICS_S *pStaticParam = pfnParam->pstaticParam;
|
||||
UIMenuStoreInfo *pCustomerParam = sf_app_ui_para_get();
|
||||
sf_log_Level_set(SF_LOG_LEVEL_DEBUG);
|
||||
|
||||
if(sf_usb_IsInsert())
|
||||
|
@ -1261,26 +1301,6 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
|
|||
}
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,s32ret);
|
||||
|
||||
/*sf_4G_usb_net_apn_cfg(pfnParam);
|
||||
sf_USB_net_init();
|
||||
|
||||
if(pStaticParam->AcmIP[0] == '\0')
|
||||
{
|
||||
s32ret = sf_4G_http_authenrequst(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_NO_SUPPOET);
|
||||
}
|
||||
|
||||
s32ret = sf_4G_server_open(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_NO_SUPPOET);
|
||||
|
||||
s32ret = app_server_querystatus(SF_CMD_LOGIN_IN, pfnParam,SF_NULL);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_NO_SUPPOET);
|
||||
|
||||
s32ret = sf_4G_server_close(pfnParam);
|
||||
|
||||
s32ret = app_server_excute_cmd(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_NO_SUPPOET);
|
||||
*/
|
||||
break;
|
||||
|
||||
case SF_MCU_STARTUP_NORMAL:
|
||||
|
@ -1399,25 +1419,7 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
|
|||
case SF_MCU_STARTUP_SERVER:
|
||||
|
||||
break;
|
||||
case SF_MCU_STARTUP_DP:/*
|
||||
#ifdef SF_HARDWARE_TEST
|
||||
app_system_poweroff(SF_POWEROFF_NOT);
|
||||
break;
|
||||
#endif
|
||||
pCustomerParam->GPSEnterResetModeFlag = 1;
|
||||
pCustomerParam->GPSWaitRestartFlag = 0;
|
||||
s32ret = sf_4G_sim_IsInsert();
|
||||
if(!s32ret)
|
||||
{
|
||||
timeCnt = 0;
|
||||
while((sf_sd_status_get() == SF_SD_BUTT) && (timeCnt < 5))
|
||||
{
|
||||
usleep(1000*1000);
|
||||
timeCnt++;
|
||||
}
|
||||
|
||||
SF_APPCOMM_CHECK_RETURN(SF_FAILURE,SF_APP_ERROR_REQUEST);
|
||||
}
|
||||
case SF_MCU_STARTUP_DP:
|
||||
|
||||
s32ret = app_ttyusb_IsOpen();
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_REQUEST);
|
||||
|
@ -1429,66 +1431,35 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
|
|||
s32ret = sf_4G_sim_init(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_REQUEST);
|
||||
|
||||
s32ret = sf_4G_register_net_auto(pfnParam);
|
||||
s32ret = sf_4G_register_net_manual(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_REQUEST);
|
||||
|
||||
pStaticParam->DailyReportAgain = pStaticParam->DailyReportAgain?0:1;
|
||||
MLOGD("DailyReportAgain:%d\n", pStaticParam->DailyReportAgain);
|
||||
|
||||
sf_4G_usb_net_apn_cfg(pfnParam);
|
||||
sf_USB_net_init();
|
||||
|
||||
s32ret = app_http_IsAuthenrequst(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_REQUEST);
|
||||
|
||||
s32ret = sf_4G_server_open(pfnParam);
|
||||
if(s32ret == SF_SUCCESS) {
|
||||
s32ret = app_server_querystatus(SF_CMD_LOGIN_IN, pfnParam, SF_NULL);
|
||||
s32ret = sf_4G_server_close(pfnParam);
|
||||
s32ret = sf_get_utc();
|
||||
if((s32ret == SF_SIM_ERROR_UTC) || (SF_ON == pCustomerParam->GpsSwitch))
|
||||
{
|
||||
s32ret = sf_get_ntp(s32ret);
|
||||
}
|
||||
if(1 == pCustomerParam->NeedTimeSyncStartUp)
|
||||
{
|
||||
printf("[%s:%d]8 between A and B,no reg net again,no reset time sync.\n", __FUNCTION__, __LINE__);
|
||||
sf_set_dr_reset_time_sys_flag(1);
|
||||
}
|
||||
|
||||
// s32ret = app_server_excute_cmd(pfnParam);
|
||||
// SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_NO_SUPPOET);
|
||||
if(0 != sf_get_cq_signal()){
|
||||
pCustomerParam->NeedTimeSyncStartUp = 1;
|
||||
}
|
||||
if(pCustomerParam->DailyReportSwitch)
|
||||
{
|
||||
pCustomerParam->GpsSendFlag = 1;//indicate need send dp file in b power on.
|
||||
}
|
||||
sf_dailyReport_set();
|
||||
sf_share_mem_customer_down(1);
|
||||
|
||||
s32ret = sf_4G_acm_tcp_server_open(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_NO_SUPPOET);
|
||||
|
||||
s32ret = app_server_Iskeepconnect(pfnParam,pCustomerParam->GprsMode);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_NO_SUPPOET);
|
||||
|
||||
s32ret = app_gps_anti_theft(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_NO_SUPPOET);
|
||||
|
||||
stMessageBuf.arg1 = SF_POWEROFF_NOT;
|
||||
stMessageBuf.cmdId = CMD_POWEROFF;
|
||||
sf_com_message_send_to_app(&stMessageBuf);*/
|
||||
break;
|
||||
case SF_MCU_STARTUP_USB:
|
||||
|
||||
break;
|
||||
case SF_MCU_STARTUP_RESET:/*
|
||||
#ifdef SF_HARDWARE_TEST
|
||||
app_system_poweroff(SF_POWEROFF_NOT);
|
||||
break;
|
||||
#endif
|
||||
pCustomerParam->GPSEnterResetModeFlag = 1;
|
||||
s32ret = sf_4G_sim_IsInsert();
|
||||
if(!s32ret)
|
||||
{
|
||||
timeCnt = 0;
|
||||
while((sf_sd_status_get() == SF_SD_BUTT) && (timeCnt < 5))
|
||||
{
|
||||
usleep(1000*1000);
|
||||
timeCnt++;
|
||||
}
|
||||
|
||||
SF_APPCOMM_CHECK_RETURN(SF_FAILURE,SF_APP_ERROR_REQUEST);
|
||||
}
|
||||
#ifdef SF_GPS_TEST
|
||||
sf_commu_set_mcu(19, 1);
|
||||
sf_commu_set_mcu(20 ,1);
|
||||
sf_commu_set_mcu(84 ,1);
|
||||
#endif
|
||||
case SF_MCU_STARTUP_RESET:
|
||||
|
||||
s32ret = app_ttyusb_IsOpen();
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_REQUEST);
|
||||
|
@ -1503,56 +1474,22 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
|
|||
s32ret = sf_4G_register_net_manual(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_REQUEST);
|
||||
|
||||
|
||||
#ifdef SF_GPS_TEST
|
||||
s32ret = app_gps_map_update(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_NO_SUPPOET);
|
||||
|
||||
s32ret = app_gps_info_get(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_NO_SUPPOET);
|
||||
|
||||
break;
|
||||
#endif
|
||||
|
||||
sf_4G_usb_net_apn_cfg(pfnParam);
|
||||
sf_USB_net_init();
|
||||
if(pStaticParam->AcmIP[0] == '\0') {
|
||||
s32ret = sf_4G_http_authenrequst(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_REQUEST);
|
||||
s32ret = sf_get_utc();
|
||||
if((s32ret == SF_SIM_ERROR_UTC) || (SF_ON == pCustomerParam->GpsSwitch))
|
||||
{
|
||||
s32ret = sf_get_ntp(s32ret);
|
||||
}
|
||||
|
||||
s32ret = sf_4G_server_open(pfnParam);
|
||||
if(s32ret == SF_SUCCESS) {
|
||||
s32ret = app_server_querystatus(SF_CMD_LOGIN_IN, pfnParam, SF_NULL);
|
||||
s32ret = sf_4G_server_close(pfnParam);
|
||||
if(0 != sf_get_cq_signal()){
|
||||
pCustomerParam->GpsSendFlag = 0;
|
||||
pCustomerParam->NeedTimeSyncStartUp = 1;
|
||||
//avoid always A mode power on
|
||||
pCustomerParam->NetWorkNeedSearch = 0;
|
||||
//printf("[%s:%d]NeedTimeSyncStartUp=%d\n", __FUNCTION__, __LINE__, pCustomerParam->NeedTimeSyncStartUp);
|
||||
}
|
||||
|
||||
// s32ret = app_server_excute_cmd(pfnParam);
|
||||
// SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_NO_SUPPOET);
|
||||
|
||||
s32ret = sf_4G_acm_tcp_server_open(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_NO_SUPPOET);
|
||||
|
||||
s32ret = app_server_Iskeepconnect(pfnParam,pCustomerParam->GprsMode);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_NO_SUPPOET);
|
||||
|
||||
s32ret = app_gps_anti_theft(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_NO_SUPPOET);
|
||||
|
||||
stMessageBuf.arg1 = SF_POWEROFF_NOT;
|
||||
stMessageBuf.cmdId = CMD_POWEROFF;
|
||||
sf_com_message_send_to_app(&stMessageBuf);
|
||||
sf_dailyReport_set();
|
||||
sf_share_mem_customer_down(1);
|
||||
break;
|
||||
case SF_MCU_STARTUP_SYN_PARAM:
|
||||
#ifdef SF_HARDWARE_TEST
|
||||
app_system_poweroff(SF_POWEROFF_NOT);
|
||||
break;
|
||||
#endif
|
||||
pCustomerParam->GPSEnterResetModeFlag = 0;
|
||||
s32ret = sf_4G_sim_IsInsert();
|
||||
if(!s32ret) {
|
||||
SF_APPCOMM_CHECK_RETURN(SF_FAILURE,SF_APP_ERROR_REQUEST);
|
||||
}
|
||||
|
||||
s32ret = app_ttyusb_IsOpen();
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_REQUEST);
|
||||
|
@ -1563,32 +1500,12 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
|
|||
s32ret = sf_4G_register_net_auto(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_REQUEST);
|
||||
|
||||
sf_4G_usb_net_apn_cfg(pfnParam);
|
||||
sf_USB_net_init();
|
||||
|
||||
s32ret = app_http_IsAuthenrequst(pfnParam);
|
||||
s32ret = app_FileSend_thread();
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_REQUEST);
|
||||
|
||||
s32ret = app_gps_info_get(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_REQUEST);
|
||||
|
||||
s32ret = sf_4G_server_open(pfnParam);
|
||||
if(s32ret == SF_SUCCESS) {
|
||||
s32ret = app_server_querystatus(SF_CMD_LOGIN_IN, pfnParam, SF_NULL);
|
||||
s32ret = sf_4G_server_close(pfnParam);
|
||||
}
|
||||
|
||||
s32ret = app_server_excute_cmd(pfnParam);
|
||||
|
||||
s32ret = sf_4G_acm_tcp_server_open(pfnParam);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_NO_SUPPOET);
|
||||
|
||||
s32ret = app_server_Iskeepconnect(pfnParam,pCustomerParam->GprsMode);
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret,SF_APP_ERROR_NO_SUPPOET);
|
||||
|
||||
stMessageBuf.arg1 = SF_POWEROFF_NOT;
|
||||
stMessageBuf.cmdId = CMD_POWEROFF;
|
||||
sf_com_message_send_to_app(&stMessageBuf);*/
|
||||
pCustomerParam->NetWorkNeedSearch = 0;
|
||||
pCustomerParam->NeedTimeSyncStartUp = 0;
|
||||
sf_share_mem_customer_down(1);
|
||||
break;
|
||||
case SF_MCU_STARTUP_BATCH_SEND:
|
||||
|
||||
|
|
|
@ -15,9 +15,11 @@
|
|||
#include <sys/ipc.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include "sf_datahttp.h"
|
||||
#include "sf_log.h"
|
||||
#include "sf_module.h"
|
||||
#include "sf_ledmng.h"
|
||||
#include "sf_service.h"
|
||||
#include "sf_storeMng.h"
|
||||
#include "sf_systemMng.h"
|
||||
#include "sf_keymng.h"
|
||||
|
@ -85,7 +87,7 @@ void app_poweroff_time_clear(void)
|
|||
{
|
||||
AutoPowerOffTime = 0;
|
||||
}
|
||||
static void* auto_poweroff_thread(void)
|
||||
static void* auto_poweroff_thread(void * arg)
|
||||
{
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
while(AutoPoweroffTskCfg.IsRun)
|
||||
|
@ -221,7 +223,7 @@ SINT32 app_auto_poweroff_start(void)
|
|||
return SF_SUCCESS;
|
||||
}
|
||||
|
||||
static void* battery_monitoring_thread(void)
|
||||
static void* battery_monitoring_thread(void *arg)
|
||||
{
|
||||
SINT32 batPercentVal = 1;
|
||||
SINT32 lastbatPercentVal = 1;
|
||||
|
@ -346,7 +348,7 @@ SINT32 app_batmonitoring_start(void)
|
|||
return SF_SUCCESS;
|
||||
}
|
||||
|
||||
void* flash_poweroff_thread(void)
|
||||
void* flash_poweroff_thread(void *arg)
|
||||
{
|
||||
UINT16 i = 0;
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
|
@ -406,7 +408,7 @@ SINT8 app_flash_poweroff_task_IsRun(void)
|
|||
{
|
||||
return FunKeySwitchTskCfg.IsRun;
|
||||
}
|
||||
void* upgrade_restore_thread(void)
|
||||
void* upgrade_restore_thread(void *arg)
|
||||
{
|
||||
UINT16 i = 0;
|
||||
|
||||
|
@ -467,7 +469,7 @@ SINT8 app_upgrade_restore_IsRun(void)
|
|||
return UpgradeRestoreTskCfg.IsRun;
|
||||
}
|
||||
|
||||
void* upgrade_ota_restore_thread(void)
|
||||
void* upgrade_ota_restore_thread(void *arg)
|
||||
{
|
||||
UINT16 i = 0;
|
||||
|
||||
|
@ -817,7 +819,7 @@ _error_deal_:
|
|||
SINT32 app_preinit(void)
|
||||
{
|
||||
SINT8 bUsbIsInsert = 0;
|
||||
SINT8 bSimIsInsert = 0;
|
||||
//SINT8 bSimIsInsert = 0;
|
||||
SF_STARTUP_TYPE_E startup = SF_MCU_STARTUP_ONKEY;
|
||||
startup = sf_poweron_type_get();
|
||||
|
||||
|
@ -847,6 +849,27 @@ SINT32 app_preinit(void)
|
|||
}
|
||||
|
||||
|
||||
/*************************************************
|
||||
Function: sf_versionGet
|
||||
Description:
|
||||
Input: ver:version buffer; fea:feature code buffer
|
||||
Output: version and feature code
|
||||
Return: version
|
||||
Others: N/A
|
||||
*************************************************/
|
||||
UINT8 *sf_versionGet(UINT8 ver[],UINT8 fea[])
|
||||
{
|
||||
|
||||
strcpy((char *)ver, SF_BASE_VERSION);
|
||||
strcpy((char *)fea, SF_BASE_VERSION_FEA);
|
||||
|
||||
printf("ver:%s\n",ver);
|
||||
printf("fea:%s\n",fea);
|
||||
|
||||
return ver;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
|
|
|
@ -207,14 +207,16 @@ SINT32 sf_share_mem_file_down(UINT32 to, SINT32 param)
|
|||
stMessageBuf.cmdId = CMD_FILE;
|
||||
if(to)//to cardv
|
||||
{
|
||||
MLOGI("file UPDATE to cardv\n");
|
||||
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
}
|
||||
else //to sf app
|
||||
{
|
||||
MLOGI("file UPDATE to app\n");
|
||||
sf_com_message_send_to_app(&stMessageBuf);
|
||||
}
|
||||
|
||||
printf("[%s:%d] creat share mem succeed!!!\n", __FUNCTION__, __LINE__);
|
||||
//printf("[%s:%d] creat share mem succeed!!!\n", __FUNCTION__, __LINE__);
|
||||
return SF_SUCCESS;
|
||||
}
|
||||
return SF_FAILURE;
|
||||
|
@ -267,14 +269,16 @@ SINT32 sf_share_mem_customer_down(UINT32 to)
|
|||
stMessageBuf.cmdId = CMD_PARA;
|
||||
if(to)//to cardv
|
||||
{
|
||||
MLOGI("PARA UPDATE to cardv ID:%d\n",sf_sharMemId);
|
||||
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
}
|
||||
else //to sf app
|
||||
{
|
||||
MLOGI("PARA UPDATE to app ID:%d\n",sf_sharMemId);
|
||||
sf_com_message_send_to_app(&stMessageBuf);
|
||||
}
|
||||
|
||||
printf("[%s:%d] creat share mem succeed ID:%d!!!\n", __FUNCTION__, __LINE__, sf_sharMemId);
|
||||
//printf("[%s:%d] to:%d creat share mem succeed ID:%d!!!\n", __FUNCTION__, __LINE__, to, sf_sharMemId);
|
||||
return SF_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,13 @@
|
|||
#include "sf_file.h"
|
||||
#include "HMACSHA.h"
|
||||
#include "sf_commu_mcu_reg.h"
|
||||
#include "sf_systemMng.h"
|
||||
#include "sf_storeMng.h"
|
||||
#include <sf_device.h>
|
||||
#include <sf_module.h>
|
||||
#include <sf_system.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
|
@ -37,9 +44,12 @@ UINT8 PicName[5][2][35] = { { { 0 } } };
|
|||
UINT8 mmsUploadFlg = 0; /*0:mms upload file fail; 1:success.*/
|
||||
extern char logStr[128];
|
||||
extern char gsmPara[GPRS_INFO_LINE_MAX];
|
||||
static SINT16 Temper = 0;
|
||||
static BOOL TemperFalg = 0;
|
||||
|
||||
|
||||
|
||||
static UINT8 battery = 0;
|
||||
static BOOL batteryFalg = 0;
|
||||
static UINT8 batteryType = 0;
|
||||
|
||||
UINT8 sf_check_file_video(void)
|
||||
{
|
||||
|
@ -280,7 +290,7 @@ SINT32 sf_quectel_upload_file_to_module(UINT8 *fileAbsolutePath, UINT8 *uploadFn
|
|||
SINT32 ttyRet = SF_FAILURE;
|
||||
UINT32 fd = 0;
|
||||
UINT32 countflag = 0;
|
||||
UINT32 time = 0;
|
||||
//UINT32 time = 0;
|
||||
struct stat statBuf;
|
||||
|
||||
//UINT8 sdFname[64] = {0};
|
||||
|
@ -601,19 +611,6 @@ SINT32 sf_upload_send_files_to_module(UINT8 mode)
|
|||
sprintf((char *)uploadFname[piccount], "%s", pThumbFileCfg->stfileattr[0].thumbfileName);
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s", pThumbFileCfg->stfileattr[0].thumbfilePath);
|
||||
|
||||
/*if(2 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s\\%s%s\\%s", SF_DCIM_DIR, PicName[0][0], DCF_DIR_FREE_CHAR, PicName[0][1]);
|
||||
}
|
||||
else if(1 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s\\%s", SF_THUMB_BIG_DIR, PicName[0][1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s\\%s", SF_THUMB_SMALL_DIR, PicName[0][1]);
|
||||
}*/
|
||||
|
||||
piccount++;
|
||||
}
|
||||
}
|
||||
|
@ -622,20 +619,6 @@ SINT32 sf_upload_send_files_to_module(UINT8 mode)
|
|||
{
|
||||
if(pPara->SendMultishotIndex2)
|
||||
{
|
||||
/*sprintf((char *)uploadFname[piccount], "%s", PicName[1][1]);
|
||||
|
||||
if(2 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s\\%s%s\\%s", SF_DCIM_DIR, PicName[1][0], DCF_DIR_FREE_CHAR, PicName[1][1]);
|
||||
}
|
||||
else if(1 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s\\%s", SF_THUMB_BIG_DIR, PicName[1][1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s\\%s", SF_THUMB_SMALL_DIR, PicName[1][1]);
|
||||
}*/
|
||||
sprintf((char *)uploadFname[piccount], "%s", pThumbFileCfg->stfileattr[1].thumbfileName);
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s", pThumbFileCfg->stfileattr[1].thumbfilePath);
|
||||
|
||||
|
@ -644,20 +627,6 @@ SINT32 sf_upload_send_files_to_module(UINT8 mode)
|
|||
|
||||
if(pPara->SendMultishotIndex3)
|
||||
{
|
||||
/*sprintf((char *)uploadFname[piccount], "%s", PicName[2][1]);
|
||||
|
||||
if(2 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s\\%s%s\\%s", SF_DCIM_DIR, PicName[2][0], DCF_DIR_FREE_CHAR, PicName[2][1]);
|
||||
}
|
||||
else if(1 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s\\%s", SF_THUMB_BIG_DIR, PicName[2][1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s\\%s", SF_THUMB_SMALL_DIR, PicName[2][1]);
|
||||
}*/
|
||||
sprintf((char *)uploadFname[piccount], "%s", pThumbFileCfg->stfileattr[2].thumbfileName);
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s", pThumbFileCfg->stfileattr[2].thumbfilePath);
|
||||
|
||||
|
@ -666,20 +635,6 @@ SINT32 sf_upload_send_files_to_module(UINT8 mode)
|
|||
|
||||
if(pPara->SendMultishotIndex4)
|
||||
{
|
||||
/*sprintf((char *)uploadFname[piccount], "%s", PicName[3][1]);
|
||||
|
||||
if(2 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s\\%s%s\\%s", SF_DCIM_DIR, PicName[3][0], DCF_DIR_FREE_CHAR, PicName[3][1]);
|
||||
}
|
||||
else if(1 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s\\%s", SF_THUMB_BIG_DIR, PicName[3][1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s\\%s", SF_THUMB_SMALL_DIR, PicName[3][1]);
|
||||
}*/
|
||||
sprintf((char *)uploadFname[piccount], "%s", pThumbFileCfg->stfileattr[3].thumbfileName);
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s", pThumbFileCfg->stfileattr[3].thumbfilePath);
|
||||
|
||||
|
@ -688,20 +643,6 @@ SINT32 sf_upload_send_files_to_module(UINT8 mode)
|
|||
|
||||
if(pPara->SendMultishotIndex5)
|
||||
{
|
||||
/*sprintf((char *)uploadFname[piccount], "%s", PicName[4][1]);
|
||||
|
||||
if(2 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s\\%s%s\\%s", SF_DCIM_DIR, PicName[4][0], DCF_DIR_FREE_CHAR, PicName[4][1]);
|
||||
}
|
||||
else if(1 == tempPicSize)
|
||||
{
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s\\%s", SF_THUMB_BIG_DIR, PicName[4][1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s\\%s", SF_THUMB_SMALL_DIR, PicName[4][1]);
|
||||
}*/
|
||||
sprintf((char *)uploadFname[piccount], "%s", pThumbFileCfg->stfileattr[4].thumbfileName);
|
||||
sprintf((char *)uploadAbsolutePath[piccount], "%s", pThumbFileCfg->stfileattr[4].thumbfilePath);
|
||||
|
||||
|
@ -772,6 +713,549 @@ void sf_set_upload_to_module_flag(UINT8 Falg)
|
|||
uploadToModuleFalg = Falg;
|
||||
}
|
||||
|
||||
#if 1
|
||||
|
||||
|
||||
/*************************************************
|
||||
Function: sf_create_thumb_dir
|
||||
Description: creat thumb dir
|
||||
Input: N/A
|
||||
Output: N/A
|
||||
Return: N/A
|
||||
Others: N/A
|
||||
*************************************************/
|
||||
void sf_create_thumb_dir(void)
|
||||
{
|
||||
/*
|
||||
UINT32 sysMode = 0;
|
||||
UINT32 attribute = 0;
|
||||
char *dir_path = "/sd";
|
||||
|
||||
if (access(SF_SEND_LIST_DIR, F_OK) != -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(mkdir(SF_SEND_LIST_DIR, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) == SUCCESS)
|
||||
{
|
||||
printf("THUMB creat successed !!!\n");
|
||||
sp5kFsFileAttrSet(SF_THUMB_DIR, SP5K_FS_ATTR_HIDDEN|SP5K_FS_ATTR_SYSTEM);
|
||||
mkdir(SF_SEND_LIST_DIR, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("THUMB creat faild !!! Or no need creat\n");
|
||||
mkdir(SF_SEND_LIST_DIR, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************************
|
||||
Function: sf_maximum_sending_limit
|
||||
Description: maximun sending limit
|
||||
Input: N/A
|
||||
Output: N/A
|
||||
Return: TRUE/FALSE
|
||||
Others: N/A
|
||||
*************************************************/
|
||||
UINT8 sf_maximum_sending_limit(void)
|
||||
{
|
||||
static UINT8 doFirst = 1;
|
||||
UINT8 ret = 0;
|
||||
SF_PDT_PARAM_STATISTICS_S *pSifarPara = sf_statistics_param_get();
|
||||
UIMenuStoreInfo *pPara = sf_app_ui_para_get();
|
||||
SF_PARA_TIME_S rtcTime;
|
||||
sf_sys_rtc_time_get(&rtcTime);
|
||||
|
||||
if(doFirst) // avoid called twice nearly 00:00
|
||||
{
|
||||
doFirst = 0;
|
||||
|
||||
if((rtcTime.Year!=pSifarPara->Year)||(rtcTime.Mon!=pSifarPara->Mon)||(rtcTime.Day!=pSifarPara->Day))
|
||||
{
|
||||
printf("new day, refresh counter!\n");
|
||||
|
||||
pSifarPara->picSendMax = 0;
|
||||
/*antony add here for default smtp number limit.*/
|
||||
|
||||
pSifarPara->subscribeSendCnt = 0;
|
||||
pSifarPara->subscribeVideoSendCnt = 0;
|
||||
pSifarPara->Year=rtcTime.Year;
|
||||
pSifarPara->Mon=rtcTime.Mon;
|
||||
pSifarPara->Day=rtcTime.Day;
|
||||
pSifarPara->Hour=rtcTime.Hour;
|
||||
|
||||
ret=FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
printf("sf_maximum_sending_limit-picSendMax:%d----SendMaxNum:%d----\n", pSifarPara->picSendMax, pPara->SendMaxNum);
|
||||
|
||||
if(pPara->SendMaxNum==0)
|
||||
{
|
||||
pSifarPara->Mon=rtcTime.Mon;
|
||||
pSifarPara->Day=rtcTime.Day;
|
||||
|
||||
ret = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(pSifarPara->picSendMax >= pPara->SendMaxNum)
|
||||
{
|
||||
ret = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
SINT16 sf_app_get_temper(UINT8 type) /*0:°F 1:°C */
|
||||
{
|
||||
int tmp = 0;
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
|
||||
TemperFalg = 0;
|
||||
Temper = 0;
|
||||
stMessageBuf.cmdId = CMD_DEV;
|
||||
stMessageBuf.arg1 = SF_DEV_CMD_TEMPER;
|
||||
stMessageBuf.arg2 = type;
|
||||
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
while((TemperFalg == 0) && (tmp < 20))
|
||||
{
|
||||
usleep(1000);
|
||||
tmp++;
|
||||
}
|
||||
return Temper;
|
||||
}
|
||||
|
||||
void sf_app_set_temper(SINT16 val) /*0:°F 1:°C */
|
||||
{
|
||||
TemperFalg = 1;
|
||||
Temper = val;
|
||||
}
|
||||
|
||||
|
||||
UINT8 sf_app_get_battery(void)
|
||||
{
|
||||
int tmp = 0;
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
|
||||
batteryFalg = 0;
|
||||
battery = 0;
|
||||
stMessageBuf.cmdId = CMD_DEV;
|
||||
stMessageBuf.arg1 = SF_DEV_CMD_BAT;
|
||||
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
while((batteryFalg == 0) && (tmp < 30))
|
||||
{
|
||||
usleep(1000);
|
||||
tmp++;
|
||||
}
|
||||
return battery;
|
||||
}
|
||||
|
||||
void sf_app_set_battery(UINT8 val, UINT8 type)
|
||||
{
|
||||
batteryFalg = 1;
|
||||
battery = val;
|
||||
batteryType = type;
|
||||
}
|
||||
|
||||
void sf_custom_send_str_get(UINT8 *sendName, UINT8 *pStr)
|
||||
{
|
||||
/*
|
||||
UIMenuStoreInfo *pPara = sf_app_ui_para_get();
|
||||
UINT8 datestr[20] = { 0 };
|
||||
SF_PARA_TIME_S drRtcTime;
|
||||
|
||||
sf_sys_rtc_time_get(&drRtcTime);
|
||||
printf("[%s:%d]pPara->CamNameSwitch:%d,pPara->CamNameStr:%s\n", __FUNCTION__, __LINE__, pPara->CamNameSwitch, pPara->CamNameStr);
|
||||
|
||||
if(pPara->DateStyle == SF_DATE_TIME_YYMMDD)
|
||||
{
|
||||
sprintf((char *)datestr, "%d%02d%02d%02d%02d%02d", drRtcTime.Year, drRtcTime.Mon, drRtcTime.Day, drRtcTime.Hour, drRtcTime.Min, drRtcTime.Sec);
|
||||
}
|
||||
else if (pPara->DateStyle == SF_DATE_TIME_MMDDYY)
|
||||
{
|
||||
sprintf((char *)datestr, "%02d%02d%d%02d%02d%02d", drRtcTime.Mon, drRtcTime.Day, drRtcTime.Year, drRtcTime.Hour, drRtcTime.Min, drRtcTime.Sec);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf((char *)datestr, "%02d%02d%d%02d%02d%02d", drRtcTime.Day, drRtcTime.Mon, drRtcTime.Year,drRtcTime.Hour, drRtcTime.Min, drRtcTime.Sec);
|
||||
}
|
||||
printf("[%s:%d]customStr:%s\n", __FUNCTION__, __LINE__, datestr);
|
||||
sprintf((char *)pStr, "%s", datestr);
|
||||
*/
|
||||
}
|
||||
|
||||
/*************************************************
|
||||
Function: sf_create_dailyreport_file
|
||||
Description: create dailyreport file
|
||||
Input: N/A
|
||||
Output: N/A
|
||||
Return: SUCCESS/FAIL
|
||||
Others: N/A
|
||||
*************************************************/
|
||||
UINT32 sf_create_dailyreport_file(void)
|
||||
{
|
||||
UINT32 size=0, i=0;
|
||||
int fd = 0, fd1 = 0, ret = FAIL;
|
||||
char tmpDate[32] = {0};
|
||||
UINT8 szTmp[250] = {0};
|
||||
UINT8 szTmp1[250] = {0};
|
||||
UINT8 szTmp2[250] = {0};
|
||||
UINT8 cfgTmp[150] = {0};
|
||||
UINT32 szTmpsize = 0;
|
||||
UINT8 *buf = NULL;
|
||||
//uiPara_t *pPara = appUiParaGet();
|
||||
//sfPara_t* pSifarPara = sf_ParaGet();
|
||||
SF_PDT_PARAM_STATISTICS_S *pSifarPara = sf_statistics_param_get();
|
||||
UIMenuStoreInfo *pPara = sf_app_ui_para_get();
|
||||
UINT32 dskfree=0;// totalSize = 0;
|
||||
char dskfreeStr[20]= {0};
|
||||
UINT8 cameraID[20]= {0};
|
||||
char str[50]= {0};
|
||||
//UINT8 gpsStr[25] = {0};
|
||||
//UINT8 gpsStrTemp[45] = {0};
|
||||
UINT16 temp = 0;
|
||||
//UINT32 TotalFile=0;
|
||||
UINT8 csqlevel=0;
|
||||
UINT8 localver[20] = {0}; /*Software version*/
|
||||
UINT8 localfea[5] = {0};/*Software fea*/
|
||||
SF_PARA_TIME_S drRtcTime;
|
||||
|
||||
|
||||
/*Avoid New Card*/
|
||||
|
||||
if (access(SF_THUMB_DIR, F_OK) == -1) {
|
||||
printf("%s directory does not exist. Creating...\n", SF_THUMB_DIR);
|
||||
|
||||
if (mkdir(SF_THUMB_DIR, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) == -1) {
|
||||
perror("mkdir() error");
|
||||
} else {
|
||||
printf("%s directory created.\n", SF_THUMB_DIR);
|
||||
}
|
||||
} else {
|
||||
printf("%s directory exists.\n", SF_THUMB_DIR);
|
||||
}
|
||||
//sf_create_thumb_dir();
|
||||
|
||||
if(pPara->CamNameSwitch)
|
||||
{
|
||||
SF_STRCPY(cameraID, pPara->CamNameStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
cameraID[i++]=' ';
|
||||
cameraID[i++]=' ';
|
||||
cameraID[i++]=' ';
|
||||
cameraID[i++]=' ';
|
||||
cameraID[i++]='\0';
|
||||
}
|
||||
|
||||
i=0;
|
||||
|
||||
sprintf(str, "%d Celsius Degree", sf_app_get_temper(1));
|
||||
sf_sys_rtc_time_get(&drRtcTime);
|
||||
|
||||
|
||||
if(sf_in_card_exist())
|
||||
{
|
||||
SF_STORE_ATTR_S storeattrs = {0};
|
||||
sf_sd_info_get(&storeattrs);
|
||||
dskfree=dskfree/1024;
|
||||
sprintf(dskfreeStr, "%dM/%dM", storeattrs.SDFree, storeattrs.SDTotalSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(dskfreeStr, "NO CARD");
|
||||
}
|
||||
|
||||
sf_maximum_sending_limit();
|
||||
|
||||
|
||||
/*if(pPara->GpsSwitch)
|
||||
{
|
||||
if((pPara->latitude[0] != '\0') && (pPara->longitude[0] != '\0'))
|
||||
{
|
||||
GSM_GpsInforStrGet(gpsStr, 1);
|
||||
sprintf(gpsStrTemp, "GPS:%s (%s)\r\n", gpsStr, pPara->GpsGotTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(gpsStrTemp, "GPS:\r\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gpsStrTemp[0] = '\0';
|
||||
}*/
|
||||
|
||||
//csqlevel = sf_signal_level_get(pPara->NetGeneration, sf_get_cq_signal());
|
||||
sf_4G_signal_level_get(pPara->NetGeneration,sf_get_cq_signal(),&csqlevel);
|
||||
if(pPara->DateStyle == SF_DATE_TIME_YYMMDD)
|
||||
{
|
||||
sprintf(tmpDate, "%d/%02d/%02d %02d:%02d:%02d", drRtcTime.Year, drRtcTime.Mon, drRtcTime.Day, drRtcTime.Hour, drRtcTime.Min, drRtcTime.Sec);
|
||||
}
|
||||
else if (pPara->DateStyle == SF_DATE_TIME_MMDDYY)
|
||||
{
|
||||
sprintf(tmpDate, "%02d/%02d/%d %02d:%02d:%02d", drRtcTime.Mon, drRtcTime.Day, drRtcTime.Year, drRtcTime.Hour, drRtcTime.Min, drRtcTime.Sec);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(tmpDate, "%02d/%02d/%d %02d:%02d:%02d", drRtcTime.Day, drRtcTime.Mon, drRtcTime.Year,drRtcTime.Hour, drRtcTime.Min, drRtcTime.Sec);
|
||||
}
|
||||
|
||||
sprintf((char *)szTmp, "IMEI:%s\r\n"
|
||||
"CSQ:%d-%dG\r\n"
|
||||
"CamID:%s\r\n"
|
||||
"Temp:%s\r\n"
|
||||
"Date:%s\r\n"
|
||||
"Battery:%d%%\r\n"
|
||||
"SD:%s\r\n"
|
||||
"ICCID:%s\r\n"
|
||||
"Trigger:%d\r\n"
|
||||
"Total Pics:%d\r\n"
|
||||
"Total Pics Sent:%d\r\n", \
|
||||
pPara->ModuleImei, \
|
||||
csqlevel, \
|
||||
pPara->NetGeneration, \
|
||||
cameraID, \
|
||||
str, \
|
||||
tmpDate, \
|
||||
sf_app_get_battery(), \
|
||||
dskfreeStr, \
|
||||
pPara->SimIccid, \
|
||||
pSifarPara->TirgNum, \
|
||||
pSifarPara->NewFlieCount, \
|
||||
pSifarPara->picSendCount + pSifarPara->videoSendCount);
|
||||
|
||||
sf_versionGet(localver,localfea);
|
||||
temp = batteryType;
|
||||
|
||||
//if(CameraCmd.setPara)
|
||||
// pPara = pPara_sms_saved;
|
||||
|
||||
if(temp == 1)
|
||||
{
|
||||
sprintf(str, "DC");
|
||||
}
|
||||
else if(temp == 2)
|
||||
{
|
||||
sprintf(str, "Custom");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(pPara->BatteryType == 0)
|
||||
sprintf(str, "Alkaline");
|
||||
else if(pPara->BatteryType == 1)
|
||||
sprintf(str, "NI-MH");
|
||||
else
|
||||
sprintf(str, "Lithium");
|
||||
}
|
||||
|
||||
sprintf((char *)szTmp1, "Total Pics Success:%d\r\n"
|
||||
"Total Pics Failed:%d\r\n"
|
||||
"Total Pics Timeout:%d\r\n"
|
||||
"Total Transmission Time:%d\r\n"
|
||||
"Thumbnail Transmission Time:%d\r\n"
|
||||
"Thumbnail Pics Sent:%d\r\n"
|
||||
"Thumbnail Pics Failed:%d\r\n", \
|
||||
pSifarPara->picSendSucessCount + (pSifarPara->videoSendCount - pSifarPara->videoSendFailCount), \
|
||||
pSifarPara->picSendFailCount + pSifarPara->videoSendFailCount, \
|
||||
pSifarPara->picSendTimeoutCount, \
|
||||
pSifarPara->picSendTimeCount + pSifarPara->videoSendTimeCount, \
|
||||
pSifarPara->sendThumbnailTimeCount, \
|
||||
pSifarPara->sendThumbnailCount, \
|
||||
pSifarPara->sendThumbnailFailCount);
|
||||
|
||||
sprintf((char *)szTmp2, "HD Transmission Time:%d\r\n"
|
||||
"HD Pics Sent:%d\r\n"
|
||||
"HD Pics Failed:%d\r\n"
|
||||
"Video Transmission Time:%d\r\n"
|
||||
"Video Sent:%d\r\n"
|
||||
"Video Faild:%d\r\n"
|
||||
"Ver:%s\r\n"
|
||||
"FW Ver:%s\r\n"
|
||||
"Mod:%s\r\n"
|
||||
"Power Type:%s\r\n", \
|
||||
pSifarPara->picSendTimeCount - pSifarPara->sendThumbnailTimeCount, \
|
||||
pSifarPara->picSendCount - pSifarPara->sendThumbnailCount,
|
||||
pSifarPara->picSendFailCount - pSifarPara->sendThumbnailFailCount,\
|
||||
pSifarPara->videoSendTimeCount, \
|
||||
pSifarPara->videoSendCount, \
|
||||
pSifarPara->videoSendFailCount, \
|
||||
localfea, \
|
||||
localver, \
|
||||
pPara->ModuleSubver, \
|
||||
str);
|
||||
|
||||
sprintf((char *)cfgTmp, "$R01*%d#", pPara->CamMode== SF_CAM_MODE_PHOTO ?1:2);
|
||||
|
||||
sprintf(str, "%d#", pPara->ImgSize+1);
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
sprintf(str, "%d#", pPara->VideoSize+1);
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
sprintf(str, "%02d#", pPara->VideoLenth == 0 ? 10 : 15);
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
sprintf(str, "%d#", pPara->Multishot+1);
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
sprintf(str, "%d#", pPara->MultiShotIntevel);
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
sprintf(str, "%d#", pPara->NightMode+1);
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
sprintf(str, "%d#", pPara->BatteryType+1);
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
sprintf(str, "%d#", pPara->FlashLed+1);
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
sprintf(str, "%d#", pPara->NTPZoneS+1);
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
if(pPara->PirDelaySwitch)
|
||||
sprintf(str, "%02d:%02d:%02d#", pPara->PirDelayTime.Hour, pPara->PirDelayTime.Min, pPara->PirDelayTime.Hour);
|
||||
else
|
||||
sprintf(str, "OFF#");
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
|
||||
if(pPara->TimelapseSwitch)
|
||||
sprintf(str, "%02d:%02d:%02d#", pPara->TimelapseTime.Hour, pPara->TimelapseTime.Min, pPara->TimelapseTime.Sec);
|
||||
else
|
||||
sprintf(str, "OFF#");
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
|
||||
if(pPara->WorkTime1Switch)
|
||||
sprintf(str, "%02d:%02d-%02d:%02d#", pPara->WorkTime[0].StartTime.Hour, pPara->WorkTime[0].StartTime.Min, pPara->WorkTime[0].StopTime.Hour,pPara->WorkTime[0].StopTime.Min);
|
||||
else
|
||||
sprintf(str, "OFF#");
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
|
||||
if(pPara->SdLoopSwitch)
|
||||
sprintf(str, "ON#");
|
||||
else
|
||||
sprintf(str, "OFF#");
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
|
||||
if(pPara->SendMaxNum)
|
||||
sprintf(str, "%02d#", pPara->SendMaxNum);
|
||||
else
|
||||
sprintf(str, "OFF#");
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
|
||||
if(pPara->FtpSwitch)
|
||||
sprintf(str, "ON#");
|
||||
else
|
||||
sprintf(str, "OFF#");
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
|
||||
sprintf(str, "%d#", pPara->GprsMode);
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
|
||||
|
||||
sprintf(str, "%d#", pPara->PirSensitivity);
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
|
||||
|
||||
sprintf(str, "%d#", pPara->SendType);
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
|
||||
if(pPara->SendType)
|
||||
{
|
||||
sprintf(str, "%02d:%02d#", pPara->TimeSend1.Hour, pPara->TimeSend1.Min);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(str, "null#");
|
||||
}
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
|
||||
if(pPara->SendType == 2)
|
||||
{
|
||||
sprintf(str, "%02d:%02d#", pPara->TimeSend2.Hour, pPara->TimeSend2.Min);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(str, "null#");
|
||||
}
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
|
||||
sprintf(str, "%d#", pPara->GpsSwitch);
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
|
||||
sprintf(str, "0#"); //gps number
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
|
||||
sprintf(str, "%d#", pPara->PicUpDailyReport);
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
|
||||
sprintf(str, "%d#", pPara->SendMulti);
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
|
||||
sprintf(str, "null#null#null#null$\r\n");
|
||||
SF_STRCAT(cfgTmp, (const char *)str);
|
||||
|
||||
printf("szTmp:%s\n", szTmp);
|
||||
printf("szTmp1=%s\n",szTmp1);
|
||||
printf("szTmp2=%s\n",szTmp2);
|
||||
printf("cfgTmp:%s\n", cfgTmp);
|
||||
|
||||
if(sf_file_IsExsit(SF_DAILYREPORT_FILENAME) == SF_TRUE){
|
||||
sf_file_remove(SF_DAILYREPORT_FILENAME);
|
||||
}
|
||||
|
||||
fd = open(SF_DAILYREPORT_FILENAME, O_APPEND | O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
|
||||
|
||||
if(fd)
|
||||
{
|
||||
szTmpsize=SF_STRLEN(szTmp);
|
||||
//printf("szTmpsize=%d\n",szTmpsize);
|
||||
write(fd, szTmp, szTmpsize);
|
||||
szTmpsize=SF_STRLEN(szTmp1);
|
||||
//printf("szTmpsize=%d\n",szTmpsize);
|
||||
write(fd, szTmp1, szTmpsize);
|
||||
szTmpsize=SF_STRLEN(szTmp2);
|
||||
//printf("szTmpsize=%d\n",szTmpsize);
|
||||
write(fd, szTmp2, szTmpsize);
|
||||
|
||||
|
||||
if(sf_file_IsExsit(SF_ERROR_CODE) == SF_TRUE){
|
||||
size = sf_get_file_size((UINT8 *)SF_ERROR_CODE);
|
||||
}
|
||||
fd1 = open(SF_ERROR_CODE, O_APPEND | O_WRONLY, S_IRUSR | S_IWUSR);
|
||||
if(fd1)
|
||||
{
|
||||
//size = sp5kFsFileSizeGet(fd1);
|
||||
buf = malloc(size);
|
||||
|
||||
if (buf)
|
||||
{
|
||||
read(fd1, buf, size-1);
|
||||
printf("error code size=%d\n",size);
|
||||
write(fd, buf, size-1);
|
||||
write(fd, (UINT8 *)"\r\n", SF_STRLEN("\r\n"));
|
||||
free(buf);
|
||||
}
|
||||
|
||||
close(fd1);
|
||||
}
|
||||
|
||||
szTmpsize=SF_STRLEN(cfgTmp);
|
||||
//printf("szTmpsize=%d\n",szTmpsize);
|
||||
write(fd, cfgTmp, szTmpsize);
|
||||
|
||||
ret = SUCCESS;
|
||||
close(fd);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
|
|
|
@ -50,11 +50,11 @@ SINT32 sf_file_remove(SF_CHAR *fileName)
|
|||
|
||||
if(s32ret != SF_SUCCESS)
|
||||
{
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
stMessageBuf.cmdId = 0x0113;
|
||||
stMessageBuf.arg1 = 0;
|
||||
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
usleep(500000);
|
||||
//SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
//stMessageBuf.cmdId = 0x0113;
|
||||
//stMessageBuf.arg1 = 0;
|
||||
//sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
//usleep(500000);
|
||||
}
|
||||
count++;
|
||||
}while(sf_file_IsExsit((CHAR *)fileName) == SF_TRUE && count < 10);
|
||||
|
@ -79,11 +79,11 @@ SINT32 sf_file_size_get(SF_CHAR *filePath,UINT32 *pFileSize)
|
|||
fd = open(filePath, O_RDWR); /*open jpg file*/
|
||||
if(fd < 0) {
|
||||
// MLOGE("open [%s] failed !!!,errno = [%d,%s]\n",filePath,errno,strerror(errno));
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
stMessageBuf.cmdId = 0x0113;
|
||||
stMessageBuf.arg1 = 0;
|
||||
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
usleep(500000);
|
||||
//SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
//stMessageBuf.cmdId = 0x0113;
|
||||
//stMessageBuf.arg1 = 0;
|
||||
//sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
//usleep(500000);
|
||||
fd = open(filePath, O_RDWR); /*open jpg file*/
|
||||
if(fd < 0) {
|
||||
MLOGE("open [%s] failed !!!,errno = [%d,%s]\n",filePath,errno,strerror(errno));
|
||||
|
@ -632,6 +632,11 @@ SINT16 sf_file_subscribe_check(SF_FILE_ATTR_S *pstfileAttr, SF_SEND_FILE_ATTR_S*
|
|||
|
||||
void sf_file_thumb_cfg_fill(char* filepath,char* fileName, UINT32 size, SF_FILE_TYPE_E enFileType)
|
||||
{
|
||||
if (pThumbFileCfg == NULL) {
|
||||
printf("%s:%d pThumbFileCfg err\n", __FUNCTION__, __LINE__);
|
||||
return;
|
||||
}
|
||||
|
||||
if(pThumbFileCfg->filecnt >= SF_SRCFILE_MAX)
|
||||
{
|
||||
pThumbFileCfg->filecnt = 0;
|
||||
|
@ -655,7 +660,7 @@ void sf_file_thumb_cfg_set(SF_SRCFILE_ATTR_S *pThumbFileCfgl)
|
|||
void sf_file_thumb_cfg_set_down(SF_SRCFILE_ATTR_S *pSfCustomerPara)
|
||||
{
|
||||
//currentInfo = *pSfCustomerPara;
|
||||
memcpy(pSfCustomerPara,&pThumbFileCfg,sizeof(pThumbFileCfg));
|
||||
memcpy(pSfCustomerPara,&pThumbFileCfg,sizeof(SF_SRCFILE_ATTR_S));
|
||||
}
|
||||
|
||||
SF_SRCFILE_ATTR_S* sf_file_thumb_cfg_get(void)
|
||||
|
@ -669,8 +674,7 @@ void sf_file_thumb_cfg_clear(void)
|
|||
|
||||
BOOL sf_check_auto_thumb_file(VOID)
|
||||
{
|
||||
FILE *fp = NULL;
|
||||
UINT32 u32ize = 0;
|
||||
|
||||
BOOL ret = FALSE;
|
||||
UINT8 fileIndex = 0;
|
||||
printf("%s:%d s\n", __FUNCTION__, __LINE__);
|
||||
|
@ -678,30 +682,21 @@ BOOL sf_check_auto_thumb_file(VOID)
|
|||
char tmp[64] = {'\0'};
|
||||
|
||||
SF_SRCFILE_ATTR_S* fileCfg = sf_file_thumb_cfg_get();
|
||||
snprintf(tmp, sizeof(tmp), "%s", SF_SD_THUMB_PATH_CFG);
|
||||
|
||||
fp = fopen(tmp,"r");
|
||||
if(fp == NULL){
|
||||
return FALSE;
|
||||
}
|
||||
u32ize = fseek(fp, 0, SEEK_SET);
|
||||
snprintf(tmp, sizeof(tmp), "%s", SF_THUMB_SEND_LIST);
|
||||
sf_get_send_file_list(&SendFileList[0][0], &SendFileTotal);
|
||||
|
||||
if (fileCfg) {
|
||||
fread(fileCfg, 1, sizeof(SF_SRCFILE_ATTR_S), fp);
|
||||
if(fileCfg->filecnt)
|
||||
{
|
||||
ret = TRUE;
|
||||
for(fileIndex = 0; fileIndex < fileCfg->filecnt; fileIndex++)
|
||||
for(fileIndex = 0; fileIndex < SendFileTotal; fileIndex++)
|
||||
{
|
||||
printf("%s:%d thumbfileSize:%d thumbfileName:%s thumbfilePath:%s\n", __FUNCTION__, __LINE__,pThumbFileCfg->stfileattr[fileIndex].thumbfileSize,fileCfg->stfileattr[fileIndex].thumbfileName,fileCfg->stfileattr[fileIndex].thumbfilePath);
|
||||
snprintf(fileCfg->stfileattr[fileIndex].thumbfileName, sizeof(fileCfg->stfileattr[fileIndex].thumbfileName), "%s", &SendFileList[fileIndex][1]);
|
||||
snprintf(fileCfg->stfileattr[fileIndex].thumbfilePath, sizeof(fileCfg->stfileattr[fileIndex].thumbfilePath), "%s%s", SF_SEND_LIST_DIR, &SendFileList[fileIndex][1]);
|
||||
printf("%s:%d thumbfileSize:%d thumbfileName:%s thumbfilePath:%s\n", __FUNCTION__, __LINE__,fileCfg->stfileattr[fileIndex].thumbfileSize,fileCfg->stfileattr[fileIndex].thumbfileName,fileCfg->stfileattr[fileIndex].thumbfilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
sf_file_remove(tmp);
|
||||
printf("%s:%d e u32ize:%d sizeof:%d\n", __FUNCTION__, __LINE__,u32ize,sizeof(SF_SRCFILE_ATTR_S));
|
||||
fp = NULL;
|
||||
u32ize = 0;
|
||||
printf("%s:%d e \n", __FUNCTION__, __LINE__);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -1058,11 +1058,11 @@ SINT32 sf_statistics_param_load(SF_PDT_PARAM_STATISTICS_S* pStatisticsParam)
|
|||
fd = open(SIFAR_STATISTICS_PARAM_PATH, O_RDWR);
|
||||
if(fd < 0) {
|
||||
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
stMessageBuf.cmdId = 0x0113;
|
||||
stMessageBuf.arg1 = 0;
|
||||
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
usleep(500000);
|
||||
//SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
//stMessageBuf.cmdId = 0x0113;
|
||||
//stMessageBuf.arg1 = 0;
|
||||
//sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
//usleep(500000);
|
||||
fd = open(SIFAR_STATISTICS_PARAM_PATH, O_RDWR); /*open jpg file*/
|
||||
if(fd < 0) {
|
||||
MLOGE("errno = [%d,%s]\n",errno,strerror(errno));
|
||||
|
@ -1094,11 +1094,11 @@ SINT32 sf_statistics_param_load(SF_PDT_PARAM_STATISTICS_S* pStatisticsParam)
|
|||
{
|
||||
fd = open(SIFAR_STATISTICS_PARAM_PATH, O_CREAT|O_RDWR, 0);
|
||||
if(fd < 0) {
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
stMessageBuf.cmdId = 0x0113;
|
||||
stMessageBuf.arg1 = 0;
|
||||
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
usleep(500000);
|
||||
//SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
//stMessageBuf.cmdId = 0x0113;
|
||||
///stMessageBuf.arg1 = 0;
|
||||
//sf_com_message_send_to_cardv(&stMessageBuf);
|
||||
//usleep(500000);
|
||||
fd = open(SIFAR_STATISTICS_PARAM_PATH, O_CREAT|O_RDWR, 0); /*open jpg file*/
|
||||
if(fd < 0) {
|
||||
MLOGE("errno = [%d,%s]\n",errno,strerror(errno));
|
||||
|
@ -1121,8 +1121,8 @@ SINT32 sf_statistics_param_load(SF_PDT_PARAM_STATISTICS_S* pStatisticsParam)
|
|||
|
||||
|
||||
MLOGD("SendPicDayCnt::%d\n", pStatisticsParam->SendPicDayCnt);
|
||||
if(strlen(pStatisticsParam->WebIP) < 1)
|
||||
sf_statistics_param_specify(pStatisticsParam);
|
||||
//if(strlen(pStatisticsParam->WebIP) < 1)
|
||||
// sf_statistics_param_specify(pStatisticsParam);
|
||||
|
||||
return SF_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ static UINT8 SIMPIN1 = 1;
|
|||
static UINT8 SIMPIN11 = 1;
|
||||
static UINT8 SIMPINPUK = 1;
|
||||
static UINT8 cq_Signal = 0;
|
||||
static UINT8 drNoResetTimeSync = SF_FALSE; //0:reset; 1:no reset;
|
||||
|
||||
UINT8 sf_mcu_read(UINT32 reg, UINT8 *data)
|
||||
{
|
||||
|
@ -352,8 +353,9 @@ unsigned char sf_mcu_reg_set(MCUParam_t attrId, unsigned char val)
|
|||
SINT32 isCard = sf_in_card_exist();
|
||||
SINT32 isCardFull = sf_is_card_full();
|
||||
//CameraBootSetting_t* pCameraBootSetting = CameraBootSettingGetHandle();
|
||||
|
||||
MLOGI("isUsb = %d isCard = %d isCardFull = %d val = %d simCardInsert = %d\n", isUsb, isCard, isCardFull, val, simCardInsert);
|
||||
sf_set_sim_insert(1);//Remove hardware detection SIM card
|
||||
MLOGI("DailyReportSwitch=%d %02d:%02d\n", puiPara->DailyReportSwitch, puiPara->DailyReportTime2.Hour, puiPara->DailyReportTime2.Min);
|
||||
MLOGI("isUsb = %d isCard = %d isCardFull = %d val = %d simCardInsert = %d start mode = %d\n", isUsb, isCard, isCardFull, val, simCardInsert, sf_poweron_type_get());
|
||||
if(!isCard)
|
||||
{
|
||||
isCard = sf_is_card();
|
||||
|
@ -426,7 +428,7 @@ unsigned char sf_mcu_reg_set(MCUParam_t attrId, unsigned char val)
|
|||
|
||||
|
||||
//if(puiPara->dailyReport)
|
||||
if(/*(puiPara->GpsSwitch) && */(paraSyncFlag == 1))
|
||||
if(/*(puiPara->GpsSwitch) && */(1 == paraSyncFlag))
|
||||
{
|
||||
temp &= ~0x10;
|
||||
}
|
||||
|
@ -499,9 +501,9 @@ unsigned char sf_mcu_reg_set(MCUParam_t attrId, unsigned char val)
|
|||
mcuReg[i] = TIME_SYNC_HOUR;
|
||||
mcuData[i++] = 0;
|
||||
mcuReg[i] = TIME_SYNC_MINUTE;
|
||||
mcuData[i++] = 0;
|
||||
mcuReg[i] = TIME_SYNC_SEC;
|
||||
mcuData[i++] = 1;
|
||||
mcuReg[i] = TIME_SYNC_SEC;
|
||||
mcuData[i++] = 30;
|
||||
}
|
||||
|
||||
if(puiPara->DailyReportSwitch)
|
||||
|
@ -546,6 +548,11 @@ unsigned char sf_mcu_reg_set(MCUParam_t attrId, unsigned char val)
|
|||
//sf_pdp_flg_set(0);
|
||||
}
|
||||
}
|
||||
if((PowerOnMode == PWR_ON_AUTO) || (PowerOnMode == PWR_ON_SETUP) || (PowerOnMode == PWR_ON_GPRS_INIT) || ((PowerOnMode == PWR_ON_DAILY_REPORT) && (drNoResetTimeSync != SF_TRUE)))
|
||||
{
|
||||
temp |= 0x10; /*bit4 rest*/
|
||||
}
|
||||
|
||||
if(((puiPara->GprsSwitch) && (simCardInsert) && ((puiPara->SendType) == 0)) || (paraSyncFlag))
|
||||
{
|
||||
temp |= 0x80;
|
||||
|
@ -683,9 +690,7 @@ unsigned char sf_mcu_reg_set(MCUParam_t attrId, unsigned char val)
|
|||
mcuData[i++] = puiPara->TimeSend4.Hour;
|
||||
mcuReg[i] = DAILY_SEND4_MINUTE;
|
||||
mcuData[i++] = puiPara->TimeSend4.Min;
|
||||
}
|
||||
else if(attrId == SF_MCU_CTRL_MODULE_PIR)
|
||||
{
|
||||
}else if(attrId == SF_MCU_CTRL_MODULE_PIR){
|
||||
mcuReg[i] = ANALOG_PIR_SENSITIVITY;
|
||||
|
||||
temp = (puiPara->PirSensitivity);//sf_mcu_analog_pir_sen_convert(SysGetFlag(DigPirSensitivity));
|
||||
|
@ -726,9 +731,7 @@ unsigned char sf_mcu_reg_set(MCUParam_t attrId, unsigned char val)
|
|||
mcuReg[i] = GPS_POWER_CTRL;
|
||||
mcuData[i++] = 0;
|
||||
}
|
||||
}
|
||||
else if(attrId == SF_MCU_PARA)
|
||||
{
|
||||
}else if(attrId == SF_MCU_PARA){
|
||||
mcuReg[i] = ANALOG_PIR_SENSITIVITY;
|
||||
|
||||
temp = (puiPara->PirSensitivity);//sf_mcu_analog_pir_sen_convert(puiPara->PirSensitivity);
|
||||
|
@ -770,15 +773,11 @@ unsigned char sf_mcu_reg_set(MCUParam_t attrId, unsigned char val)
|
|||
mcuReg[i] = GPS_POWER_CTRL;
|
||||
mcuData[i++] = 0;
|
||||
}
|
||||
}
|
||||
else if(attrId == SF_MCU_RESET_MODULE)
|
||||
{
|
||||
}else if(attrId == SF_MCU_RESET_MODULE){
|
||||
mcuReg[i] = SYS_STATUS;
|
||||
mcuData[i++] = (puiPara->CamArmDiable) << 6 | isUsb << 2 | isCardFull << 1 | isCard << 0 | 0x10;
|
||||
//sf_pdp_flg_set(0);
|
||||
}
|
||||
else if(attrId == SF_MCU_SOFT_UPDATE)
|
||||
{
|
||||
}else if(attrId == SF_MCU_SOFT_UPDATE){
|
||||
mcuReg[i] = SYS_STATUS;
|
||||
|
||||
if(val == 1)
|
||||
|
@ -789,14 +788,10 @@ unsigned char sf_mcu_reg_set(MCUParam_t attrId, unsigned char val)
|
|||
{
|
||||
mcuData[i++] = (puiPara->CamArmDiable) << 6 | isUsb << 2 | isCardFull << 1 | isCard << 0;
|
||||
}
|
||||
}
|
||||
else if(attrId == SF_MCU_POWER_RESTART)
|
||||
{
|
||||
}else if(attrId == SF_MCU_POWER_RESTART){
|
||||
mcuReg[i] = SYS_STATUS;
|
||||
mcuData[i++] = (puiPara->CamArmDiable) << 6 | isUsb << 2 | isCardFull << 1 | isCard << 0 | 0x20;
|
||||
}
|
||||
else if(attrId == SF_MCU_PIR_RESTART)
|
||||
{
|
||||
}else if(attrId == SF_MCU_PIR_RESTART){
|
||||
mcuReg[i] = SYS_STATUS;
|
||||
mcuData[i++] = (puiPara->CamArmDiable) << 6 | isUsb << 2 | isCardFull << 1 | isCard << 0 | 0x80;
|
||||
}
|
||||
|
@ -1152,6 +1147,12 @@ int sf_get_signal_ready(void)
|
|||
return isSignalReady;
|
||||
}
|
||||
|
||||
UINT8 sf_get_cq_signal(void)
|
||||
{
|
||||
printf("[%s:%d]cq_Signal=%d\n", __FUNCTION__, __LINE__, cq_Signal);
|
||||
return cq_Signal;
|
||||
}
|
||||
|
||||
void sf_set_sim_pin_flag(UINT8 simPin, UINT8 simPins, UINT8 simPinPuk)
|
||||
{
|
||||
SIMPIN1 = simPin;
|
||||
|
@ -1160,6 +1161,141 @@ void sf_set_sim_pin_flag(UINT8 simPin, UINT8 simPins, UINT8 simPinPuk)
|
|||
printf("[%s:%d]SIMPIN1=%d,SIMPIN11=%d,SIMPINPUK=%d\n", __FUNCTION__, __LINE__, SIMPIN1, SIMPIN11, SIMPINPUK);
|
||||
}
|
||||
|
||||
|
||||
/*************************************************
|
||||
Function: sf_dailyReport_refresh
|
||||
Description: refresh dailyreport
|
||||
Input: N/A
|
||||
Output: N/A
|
||||
Return: N/A
|
||||
Others: N/A
|
||||
*************************************************/
|
||||
void sf_dailyReport_refresh(void)
|
||||
{
|
||||
|
||||
UIMenuStoreInfo *puiPara = sf_app_ui_para_get();
|
||||
UINT32 preTimeValue = 0;
|
||||
UINT32 dr1TimeValue = 0;
|
||||
UINT32 dr2TimeValue = 0;
|
||||
SF_PARA_TIME_S preRtcTime = { 0 };
|
||||
sf_sys_rtc_time_get(&preRtcTime);
|
||||
|
||||
preTimeValue = preRtcTime.Hour * 60 + preRtcTime.Min;
|
||||
dr1TimeValue = puiPara->DailyReportTime.Hour * 60 + puiPara->DailyReportTime.Min;
|
||||
dr2TimeValue = dr1TimeValue + (12 * 60);
|
||||
|
||||
if(puiPara->ReDailyReport == 0)
|
||||
{
|
||||
//twice a day
|
||||
if(((preTimeValue < dr1TimeValue) && (preTimeValue < dr2TimeValue)) || ((preTimeValue >= dr1TimeValue) && (preTimeValue >= dr2TimeValue)))
|
||||
{
|
||||
puiPara->DailyReportTime2.Hour = puiPara->DailyReportTime.Hour;
|
||||
puiPara->DailyReportTime2.Min = puiPara->DailyReportTime.Min;
|
||||
}
|
||||
else
|
||||
{
|
||||
puiPara->DailyReportTime2.Hour = (puiPara->DailyReportTime.Hour + 12) % 24;
|
||||
puiPara->DailyReportTime2.Min = puiPara->DailyReportTime.Min;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if((preTimeValue >= dr1TimeValue) && (preTimeValue < dr1TimeValue + 60))
|
||||
{
|
||||
puiPara->DailyReportTime2.Hour = (puiPara->DailyReportTime.Hour + 1) % 24;
|
||||
puiPara->DailyReportTime2.Min = puiPara->DailyReportTime.Min;
|
||||
}
|
||||
else if((preTimeValue >= dr1TimeValue + 60) && (preTimeValue < dr2TimeValue))
|
||||
{
|
||||
puiPara->DailyReportTime2.Hour = (puiPara->DailyReportTime.Hour + 12) % 24;
|
||||
puiPara->DailyReportTime2.Min = puiPara->DailyReportTime.Min;
|
||||
}
|
||||
else if((preTimeValue >= dr2TimeValue) && (preTimeValue < dr2TimeValue + 60))
|
||||
{
|
||||
puiPara->DailyReportTime2.Hour = (puiPara->DailyReportTime.Hour + 12 + 1) % 24;
|
||||
puiPara->DailyReportTime2.Min = puiPara->DailyReportTime.Min;
|
||||
}
|
||||
else
|
||||
{
|
||||
puiPara->DailyReportTime2.Hour = puiPara->DailyReportTime.Hour;
|
||||
puiPara->DailyReportTime2.Min = puiPara->DailyReportTime.Min;
|
||||
}
|
||||
}
|
||||
|
||||
if(puiPara->DailyReportTestSwitch)
|
||||
{
|
||||
if(puiPara->ReDailyReport)
|
||||
{
|
||||
puiPara->DailyReportTime2.Hour = (preRtcTime.Hour + (preRtcTime.Min + 15) / 60) % 24;
|
||||
puiPara->DailyReportTime2.Min = (preRtcTime.Min + 15) % 60;
|
||||
}
|
||||
else
|
||||
{
|
||||
puiPara->DailyReportTime2.Hour = (preRtcTime.Hour + (preRtcTime.Min + 30) / 60) % 24;
|
||||
puiPara->DailyReportTime2.Min = (preRtcTime.Min + 30) % 60;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*************************************************
|
||||
Function: sf_dailyReport_set
|
||||
Description: set dailyreport
|
||||
Input: N/A
|
||||
Output: N/A
|
||||
Return: N/A
|
||||
Others: N/A
|
||||
*************************************************/
|
||||
void sf_dailyReport_set(void)
|
||||
{
|
||||
UIMenuStoreInfo *puiPara = sf_app_ui_para_get();
|
||||
extern UINT8 DailyReportFtpSendSucess;
|
||||
|
||||
if((sf_get_mode_flag()) || (PWR_ON_GPRS_INIT == sf_convert_power_on_mode()))//if reset cam, cam software update, mode software udate
|
||||
{
|
||||
if (puiPara->FristSendDailyAndGps)
|
||||
{
|
||||
puiPara->NeedTimeSyncStartUp = 1;
|
||||
}
|
||||
|
||||
puiPara->ReDailyReport = 0;
|
||||
sf_dailyReport_refresh();
|
||||
}
|
||||
else if(PWR_ON_DAILY_REPORT == sf_convert_power_on_mode())
|
||||
{
|
||||
if (puiPara->FristSendDailyAndGps)
|
||||
{
|
||||
puiPara->FristSendDailyAndGps = 0;
|
||||
puiPara->ReDailyReport = 0;
|
||||
}
|
||||
else if (DailyReportFtpSendSucess == 0)
|
||||
{
|
||||
if(puiPara->ReDailyReport==0)
|
||||
puiPara->ReDailyReport = 1;
|
||||
else
|
||||
puiPara->ReDailyReport = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
puiPara->ReDailyReport = 0;
|
||||
}
|
||||
|
||||
sf_dailyReport_refresh();
|
||||
}
|
||||
}
|
||||
/*************************************************
|
||||
Function: sf_set_dr_reset_time_sys_flag
|
||||
Description: set sf_set_dr_reset_time_sys_flag
|
||||
Input: N/A
|
||||
Output: N/A
|
||||
Return: N/A
|
||||
Others: N/A
|
||||
*************************************************/
|
||||
void sf_set_dr_reset_time_sys_flag(UINT8 value)
|
||||
{
|
||||
drNoResetTimeSync = value;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
|
|
|
@ -856,7 +856,7 @@ void sf_app_Get_Camera_Info(MSG_DEV_INFO_Get_Rsp_T *camInfo)
|
|||
|
||||
//UINT8 signalValue=0;
|
||||
//sf_get_signal_level(&signalValue);
|
||||
camInfo->signalLevel = puiPara->SimSignal;
|
||||
camInfo->signalLevel = sf_cardv_get_cq_signal();
|
||||
printf("[sf_app_Get_Camera_Info],sf_get_signal_level\n");
|
||||
|
||||
//char strIccid[32]= {0};
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
version-info = [00 01 00 01];
|
||||
ae_expect_lum {
|
||||
size = [b0 00 00 00];
|
||||
data = [3c 00 00 00 3c 00 00 00 26 00 00 00 26 00 00 00 26 00 00 00 26 00 00 00 26 00 00 00 26 00 00 00 27 00 00 00 2c 00 00 00 32 00 00 00 3a 00 00 00 44 00 00 00 51 00 00 00 51 00 00 00 51 00 00 00 51 00 00 00 51 00 00 00 51 00 00 00 51 00 00 00 51 00 00 00 51 00 00 00 51 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 3c 00 00 00 46 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00];
|
||||
data = [3c 00 00 00 3c 00 00 00 26 00 00 00 26 00 00 00 26 00 00 00 26 00 00 00 26 00 00 00 26 00 00 00 27 00 00 00 2c 00 00 00 32 00 00 00 3a 00 00 00 44 00 00 00 50 00 00 00 50 00 00 00 50 00 00 00 50 00 00 00 50 00 00 00 50 00 00 00 50 00 00 00 50 00 00 00 50 00 00 00 50 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 3c 00 00 00 46 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00];
|
||||
};
|
||||
ae_la_clamp {
|
||||
size = [50 01 00 00];
|
||||
|
@ -15,7 +15,7 @@
|
|||
};
|
||||
ae_over_exposure {
|
||||
size = [b0 01 00 00];
|
||||
data = [01 00 00 00 8c 00 00 00 03 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 02 00 00 00 02 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00 06 00 00 00 07 00 00 00 08 00 00 00 09 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 05 00 00 00 07 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 04 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00];
|
||||
data = [01 00 00 00 8c 00 00 00 03 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 05 00 00 00 04 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 02 00 00 00 02 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00 06 00 00 00 07 00 00 00 08 00 00 00 09 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 05 00 00 00 07 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 04 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00];
|
||||
};
|
||||
ae_convergence {
|
||||
size = [2c 00 00 00];
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
};
|
||||
awb_ct_weight {
|
||||
size = [78 00 00 00];
|
||||
data = [fc 08 00 00 f0 0a 00 00 74 0e 00 00 5c 12 00 00 64 19 00 00 f8 2a 00 00 48 03 00 00 60 03 00 00 bc 03 00 00 f7 03 00 00 23 04 00 00 c3 04 00 00 01 00 00 00 01 00 00 00 02 00 00 00 04 00 00 00 08 00 00 00 09 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 03 00 00 00 08 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00];
|
||||
data = [fc 08 00 00 f0 0a 00 00 74 0e 00 00 5c 12 00 00 64 19 00 00 f8 2a 00 00 48 03 00 00 60 03 00 00 bc 03 00 00 f7 03 00 00 23 04 00 00 c3 04 00 00 01 00 00 00 01 00 00 00 01 00 00 00 02 00 00 00 05 00 00 00 06 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 03 00 00 00 08 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00];
|
||||
};
|
||||
awb_target {
|
||||
size = [24 00 00 00];
|
||||
|
|
File diff suppressed because one or more lines are too long
BIN
code/hdal/vendor/output/libvendor_ai2_pub.a
vendored
BIN
code/hdal/vendor/output/libvendor_ai2_pub.a
vendored
Binary file not shown.
BIN
code/hdal/vendor/output/libvendor_ai2_pub2.a
vendored
BIN
code/hdal/vendor/output/libvendor_ai2_pub2.a
vendored
Binary file not shown.
|
@ -1,11 +1,17 @@
|
|||
#ifndef _SF_BATTERY_
|
||||
#define _SF_BATTERY_
|
||||
#ifndef _SF_BATTERY_H
|
||||
#define _SF_BATTERY_H
|
||||
|
||||
#include <kwrap/task.h>
|
||||
//#include <sf_type.h>
|
||||
|
||||
//typedef signed int SINT32;
|
||||
|
||||
typedef enum {
|
||||
SF_POWER_TYPE_DC = (unsigned char)0x01,
|
||||
SF_POWER_TYPE_LI_POLYER,
|
||||
SF_POWER_TYPE_AA
|
||||
} SF_POWERTYPE_E;
|
||||
|
||||
UINT32 sf_battery_voltage_convert(UINT32 resistanceGnd, UINT32 resistanceVin, UINT32 adcVal);
|
||||
UINT32 sf_battery_convert_to_adc(UINT32 resistanceGnd, UINT32 resistanceVin, UINT32 volt);
|
||||
UINT32 sf_get_max_value(UINT32 *_ValueList);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#ifndef _SF_COMMON_
|
||||
#define _SF_COMMON_
|
||||
#ifndef _SF_COMMON_H
|
||||
#define _SF_COMMON_H
|
||||
|
||||
#include <kwrap/nvt_type.h>
|
||||
|
||||
#define SF_DATE_TIME_YEAR_MAX 2050
|
||||
#define SF_DATE_TIME_YEAR_MIN 2021
|
||||
|
@ -77,9 +79,8 @@ BOOL sf_is_movie_running(void);
|
|||
BOOL sf_is_movie_preview(void);
|
||||
BOOL sf_is_cap_preview(void);
|
||||
BOOL sf_is_preview(void);
|
||||
|
||||
#define SF_SD_DISK "A:"
|
||||
#define SF_SD_ROOT "/mnt/sd/"
|
||||
#define SF_SD_THUMB_PATH "/mnt/sd/Thumb/"
|
||||
UINT8 sf_cardv_get_cq_signal(void);
|
||||
INT16 sf_adc2Temperature(UINT16 adcValue, UINT8 type);/*type: 0:°F 1:°C */
|
||||
void sf_stamp_temperature_get(INT16 *fTemper,INT16 *cTemper); /*0:F 1:C*/
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef _SF_INC_
|
||||
#define _SF_INC_
|
||||
#ifndef _SF_INC_H
|
||||
#define _SF_INC_H
|
||||
|
||||
#include <sf_mcu.h>
|
||||
#include <sf_sd_common.h>
|
||||
|
|
|
@ -479,7 +479,7 @@ signed int sf_battery_adc_value_get(void)
|
|||
|
||||
if((sf_get_mode_flag() == 0) || (needCheckFirst == TRUE))
|
||||
{
|
||||
printf("[%s:%d]ConfigureModeFlag=%d,needCheckFirst=%d\n",__FUNCTION__,__LINE__,sf_get_mode_flag(),needCheckFirst);
|
||||
//printf("[%s:%d]ConfigureModeFlag=%d,needCheckFirst=%d\n",__FUNCTION__,__LINE__,sf_get_mode_flag(),needCheckFirst);
|
||||
needCheckFirst = FALSE;
|
||||
|
||||
for(readBatCnt = 0; readBatCnt < 5;) //get max value of 5 times.
|
||||
|
@ -1110,10 +1110,12 @@ UINT8 sf_battery_value_get(UINT8 nightMode)
|
|||
*************************************************/
|
||||
UINT8 sf_battery_type_get(void)
|
||||
{
|
||||
if(LiPolymerVoltageVal)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
if(IsPowerDcIn)
|
||||
return SF_POWER_TYPE_DC;
|
||||
else if(LiPolymerVoltageVal)
|
||||
return SF_POWER_TYPE_LI_POLYER;
|
||||
else
|
||||
return SF_POWER_TYPE_AA;
|
||||
}
|
||||
|
||||
/*************************************************
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
#include <sf_param_struct.h>
|
||||
#include "UIAppNetwork.h"
|
||||
#include <sf_wifi_svr.h>
|
||||
#include <sf_log.h>
|
||||
|
||||
BOOL isGoing2PowerOff = FALSE;
|
||||
UINT16 AutoOfftime = 0;
|
||||
|
@ -69,8 +70,21 @@ UINT8 NetWorkFlag = 0;
|
|||
UINT8 RespFlag = 0;
|
||||
static BOOL IsMenu = FALSE;
|
||||
static BOOL IsCap = FALSE;
|
||||
static UINT8 cq_Signal = 0;
|
||||
static UINT32 TemperAdc = 0;
|
||||
|
||||
|
||||
const UINT16 Adc2TempTable[]=
|
||||
{
|
||||
0,1648,1721,1794,1867,1940,2013,2086,2159, 2232,2305, 2378,2451,2524,2597,2670,2743, 2816, 2889, 2968,
|
||||
3047,3126,3205,3284,3363,3442,3521,3600/*-15*/,3679,3758,3837,3916,3995,4074,4153,4232,4321/*-10*/, 4427,4533,4639,
|
||||
4745,4851,4957,5063,5169,5275,5381,5487,5593,5699,5805,5911,6017,6123,6238/*0*/,6334,6430,6526,6622,6718,
|
||||
6814,6910,7006,7102,7198,7294,7390,7486,7582,7678,7774,7870,7996,8063/*10*/,8182,8301,8420,8539,8658,8777,
|
||||
8896,9015,9134,9253,9372,9491,9610,9729,9848,9967,10128/*20*/,10221,10314,10407,10500,10593,10686,10779,10872,10965,
|
||||
11058,11151,11244,11337,11430,11480,11530,11580,11630/*30*/,11680,11730,11780,11830,11880,11930,11980,12032,12097,12162,12232,
|
||||
12302,12372,12442,12512,12582,12652,12722/*40*/,12769,12816,12863,12910,12957,13004,13051,13098,13145,13192,13239,13286,13333,
|
||||
13380,13427,13474,13521/*50*/,13591,13661,13731,13801,13871,13941,14011,14081,14151,14221,14291,14361,14431,14501,14571,14641,
|
||||
14711,14781,14851/*60*/,14941,15031,15111,15181,15251,15321,15391,15461,15531,15601,15671,15741,15811
|
||||
};
|
||||
|
||||
int sf_pir_statu_read(void)
|
||||
{
|
||||
|
@ -1121,16 +1135,16 @@ UINT32 sf_set_pir_sensitivity(UINT8 pirs)
|
|||
puiPara->DigitPirSensitivity = digPirLevel[pirs];
|
||||
puiPara->DigitPirCnt = digPirCount[pirs];
|
||||
puiPara->DigitPirWindowTime = 0;
|
||||
|
||||
/*if(puiPara->PirSensitivity)
|
||||
#if SF_IQ_TEST == DISABLE
|
||||
if(puiPara->PirSensitivity)
|
||||
{
|
||||
puiPara->TimelapseSwitch = SF_OFF;
|
||||
puiPara->TimelapseTime.Hour = 0;
|
||||
puiPara->TimelapseTime.Min = 0;
|
||||
puiPara->TimelapseTime.Sec = 0;
|
||||
//Save_MenuInfo();
|
||||
}*/
|
||||
|
||||
}
|
||||
#endif
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -1241,11 +1255,160 @@ void sf_rtsp_restart(void)
|
|||
}
|
||||
}
|
||||
|
||||
UINT8 sf_cardv_get_cq_signal(void)
|
||||
{
|
||||
return cq_Signal;
|
||||
}
|
||||
|
||||
|
||||
INT16 sf_celsius_change_to_fahrenheit(INT16 cTemper)
|
||||
{
|
||||
INT16 fTemper = 0;
|
||||
fTemper = cTemper*9/5 + 32;
|
||||
printf("fTemper=%d%s\n",fTemper,"`F");
|
||||
return fTemper;
|
||||
}
|
||||
|
||||
void sf_stamp_temperature_get(INT16 *fTemper,INT16 *cTemper) /*0:F 1:C*/
|
||||
{
|
||||
UINT8 readBatCnt = 0;
|
||||
UINT32 pValue = 0;
|
||||
UINT32 temperValueList[6] = {0};
|
||||
UINT32 maxValue = 0;
|
||||
|
||||
for(readBatCnt=0; readBatCnt<5; readBatCnt++) //get max value of 5 times.
|
||||
{
|
||||
if(sf_adc_value_get(SF_ADC_TEMP, &TemperAdc) == SUCCESS)
|
||||
{
|
||||
temperValueList[readBatCnt] = pValue;
|
||||
}
|
||||
}
|
||||
|
||||
for(readBatCnt = 0; readBatCnt < 5; readBatCnt++)
|
||||
{
|
||||
maxValue = (maxValue > temperValueList[readBatCnt]? maxValue : temperValueList[readBatCnt]);
|
||||
}
|
||||
|
||||
TemperAdc = maxValue;
|
||||
|
||||
//*fTemper = sf_adc2Temperature((UINT16)TemperAdc, 0);
|
||||
*cTemper = sf_adc2Temperature((UINT16)TemperAdc, 1);
|
||||
*fTemper = sf_celsius_change_to_fahrenheit(*cTemper);
|
||||
}
|
||||
|
||||
INT16 sf_adc2Temperature(UINT16 adcValue, UINT8 type)/*type: 0:°F 1:°C */
|
||||
{
|
||||
UINT16 lowIndex = 0, highIndex = 175, keyIndex = 77, midIndex = 0;
|
||||
UINT16 tmp = 0;
|
||||
INT16 Temper = 0;
|
||||
|
||||
while(lowIndex < highIndex)
|
||||
{
|
||||
if((lowIndex == highIndex) || (lowIndex == (highIndex - 1)))
|
||||
{
|
||||
keyIndex = lowIndex;
|
||||
break;
|
||||
}
|
||||
else if( (adcValue < Adc2TempTable[lowIndex]) || (adcValue > Adc2TempTable[highIndex]))
|
||||
{
|
||||
keyIndex = 255;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
midIndex = (lowIndex + highIndex) / 2;
|
||||
if(adcValue < Adc2TempTable[midIndex])
|
||||
highIndex = midIndex;
|
||||
else
|
||||
lowIndex = midIndex;
|
||||
}
|
||||
//printf("low=%bx,high=%bx\r",lowIndex,highIndex);
|
||||
}
|
||||
|
||||
if(keyIndex == 255)
|
||||
tmp = 176;
|
||||
else
|
||||
tmp = keyIndex;
|
||||
|
||||
if(tmp > 176)
|
||||
tmp = 176;
|
||||
|
||||
if(type == 1)
|
||||
{
|
||||
if(tmp >= 22)
|
||||
{
|
||||
tmp = tmp-22;
|
||||
if( tmp >= 32)
|
||||
{
|
||||
tmp = (tmp - 32) * 5 / 9;
|
||||
Temper = (SINT16)tmp;
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp = (32 - tmp) * 5 / 9;
|
||||
Temper = -(SINT16)tmp;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp = 22 - tmp;
|
||||
tmp = (32 + tmp) * 5 / 9;
|
||||
Temper = -(SINT16)tmp;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tmp > 22)
|
||||
{
|
||||
Temper = tmp - 22;
|
||||
}
|
||||
else
|
||||
{
|
||||
Temper = 22 - tmp;
|
||||
Temper = -Temper;
|
||||
}
|
||||
}
|
||||
|
||||
printf("Temper = %d%s\n", Temper, (type ? "`C" : "`F"));
|
||||
return Temper;
|
||||
}
|
||||
|
||||
static const SF_CHAR* sf_process_message_getstatusstring(SF_MESSAGE_TYPE_E enType)
|
||||
{
|
||||
switch(enType)
|
||||
{
|
||||
case CMD_KEY:
|
||||
return "CMD_KEY";
|
||||
case CMD_SD:
|
||||
return "CMD_SD";
|
||||
case CMD_LED:
|
||||
return "CMD_LED";
|
||||
case CMD_FILE:
|
||||
return "CMD_FILE";
|
||||
case CMD_POWEROFF:
|
||||
return "CMD_POWEROFF";
|
||||
case CMD_VENC:
|
||||
return "CMD_VENC";
|
||||
case CMD_MCU:
|
||||
return "CMD_MCU";
|
||||
case CMD_PARA:
|
||||
return "CMD_PARA";
|
||||
case CMD_GPRS:
|
||||
return "CMD_GPRS";
|
||||
case CMD_WIFI:
|
||||
return "CMD_GPRS";
|
||||
case CMD_DEV:
|
||||
return "CMD_GPRS";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
static SINT32 sf_cardv_proccess_cmd_mcu(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
printf("[%s:%d] ID = %#x\n", __FUNCTION__, __LINE__,pMessageBuf->arg1);
|
||||
//printf("[%s:%d] ID = %#x\n", __FUNCTION__, __LINE__,pMessageBuf->arg1);
|
||||
//SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
|
||||
MLOGI("ID = %#x\n",pMessageBuf->arg1);
|
||||
switch(pMessageBuf->arg1)
|
||||
{
|
||||
case SF_MCU_CMD_POWERON:
|
||||
|
@ -1265,17 +1428,16 @@ static SINT32 sf_cardv_proccess_cmd_mcu(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
|
||||
static SINT32 sf_cardv_proccess_cmd_key(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
printf("[%s:%d] ID = %#x\n", __FUNCTION__, __LINE__,pMessageBuf->arg1);
|
||||
//printf("[%s:%d] ID = %#x\n", __FUNCTION__, __LINE__,pMessageBuf->arg1);
|
||||
//SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
|
||||
MLOGI("ID = %#x\n",pMessageBuf->arg1);
|
||||
switch(pMessageBuf->arg1)
|
||||
{
|
||||
case SF_EVENT_KEY_SHORT_CLICK:
|
||||
if(SF_KEY_PIN_DATAREADY == pMessageBuf->arg2)
|
||||
{
|
||||
sf_mcu_dataready_ck(pMessageBuf->arg3);
|
||||
}
|
||||
else if(SF_KEY_PIN_AOTU_MODE_POWOFF == pMessageBuf->arg2)
|
||||
}else if(SF_KEY_PIN_AOTU_MODE_POWOFF == pMessageBuf->arg2)
|
||||
{
|
||||
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, 0); //shutdown start
|
||||
}
|
||||
|
@ -1287,14 +1449,17 @@ static SINT32 sf_cardv_proccess_cmd_key(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
return SF_SUCCESS;
|
||||
}
|
||||
|
||||
static SINT32 app_proccess_cmd_para_update(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
static SINT32 sf_cardv_proccess_cmd_para_update(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
printf("[%s:%d] ID = %#x\n", __FUNCTION__, __LINE__,pMessageBuf->arg1);
|
||||
|
||||
//UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||
//printf("[%s:%d] ID = %#x\n", __FUNCTION__, __LINE__,pMessageBuf->arg1);
|
||||
MLOGI("ID = %#x\n",pMessageBuf->arg1);
|
||||
switch(pMessageBuf->arg1)
|
||||
{
|
||||
case SF_PARA_CMD_UPDATE:
|
||||
//MLOGI("NeedTimeSyncStartUp = %d\n",puiPara->NeedTimeSyncStartUp);
|
||||
sf_share_mem_customer_update();
|
||||
//MLOGI("NeedTimeSyncStartUp = %d\n",puiPara->NeedTimeSyncStartUp);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1303,84 +1468,25 @@ static SINT32 app_proccess_cmd_para_update(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
return SF_SUCCESS;
|
||||
}
|
||||
|
||||
#if 0
|
||||
void sf_cardv_proccess_cmd_gprs(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
|
||||
static SINT32 sf_cardv_proccess_cmd_gprs(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
UINT8 netSearchStep = pMessageBuf->arg1;
|
||||
UINT8 cq_Signal = pMessageBuf->arg2;
|
||||
UINT32 simCardInsert = ((pMessageBuf->arg3) >> 0) & 1;
|
||||
UINT8 gGPRSNoRespone = ((pMessageBuf->arg3) >> 1) & 1;
|
||||
UINT32 FtpOpenOk = ((pMessageBuf->arg3) >> 2) & 1;
|
||||
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||
MLOGI("ID = %#x\n",pMessageBuf->arg1);
|
||||
switch(pMessageBuf->arg1)
|
||||
{
|
||||
case SF_GPRS_CMD_SIGNAL:
|
||||
cq_Signal = pMessageBuf->arg2;
|
||||
break;
|
||||
|
||||
if (sf_get_fw_update())
|
||||
return;
|
||||
|
||||
if(puiPara->GprsSwitch == SF_ON)
|
||||
{
|
||||
|
||||
printf("simCardInsert=%d gprs_search_process=%d cq_Signal=%d gGPRSNoRespone=%d ", simCardInsert, netSearchStep, cq_Signal, gGPRSNoRespone);
|
||||
|
||||
if(!simCardInsert)
|
||||
{
|
||||
sf_sys_status_led_set(SF_LED_SYS_STATE_SIM_ERROR);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(netSearchStep == GPRS_SEARCH_STEP_IDLE)
|
||||
{
|
||||
sf_sys_status_led_set(SF_LED_SYS_STATE_GPRS_SEARCH);
|
||||
}
|
||||
/*else if(gprs_search_process == GPRS_SEARCH_STEP_INIT)
|
||||
{
|
||||
appOsdLib_TextIDDraw(0, 32, SP5K_GFX_ALIGN_TOP_LEFT, ID_STR_MODULE_INIT);
|
||||
}*/
|
||||
else if(netSearchStep == GPRS_SEARCH_STEP_SEARCH)
|
||||
{
|
||||
sf_sys_status_led_set(SF_LED_SYS_STATE_GPRS_SEARCH);
|
||||
}
|
||||
else if(netSearchStep == GPRS_SEARCH_STEP_SYNC_TIME)
|
||||
{
|
||||
//sf_signal_led_show(sf_signal_level_get(puiPara->NetFlagG, cq_Signal));
|
||||
}
|
||||
else if(netSearchStep == GPRS_SEARCH_STEP_GPS_LOCATE)
|
||||
{
|
||||
//sf_signal_led_show(sf_signal_level_get(puiPara->NetFlagG, cq_Signal));
|
||||
}
|
||||
/*else if(gprs_search_process == GPRS_SEARCH_STEP_INIT_FAILED)
|
||||
{
|
||||
appOsdLib_TextIDDraw(0, 32, SP5K_GFX_ALIGN_TOP_LEFT, ID_STR_MODULE_ERROR);
|
||||
}*/
|
||||
else
|
||||
{
|
||||
if((cq_Signal == 0) && (gGPRSNoRespone == 0))
|
||||
{
|
||||
if(!sf_get_fw_update())
|
||||
{
|
||||
sf_sys_status_led_set(SF_LED_SYS_STATE_SIM_ERROR);
|
||||
sf_sys_status_led_set(SF_LED_SYS_STATE_ERROR);
|
||||
}
|
||||
}
|
||||
else if(cq_Signal == 0)
|
||||
{
|
||||
sf_sys_status_led_set(SF_LED_SYS_STATE_GPRS_NO_SIGNAL);
|
||||
}
|
||||
else if(FtpOpenOk == FAIL)
|
||||
{
|
||||
sf_sys_status_led_set(SF_LED_SYS_STATE_SERVER_FAIL);
|
||||
}
|
||||
else //if(cq_Signal < 32)
|
||||
{
|
||||
sf_signal_led_show(sf_signal_level_get(puiPara->NetGeneration, cq_Signal));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return SF_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
static SINT32 sf_cardv_proccess_cmd_wifi(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
MLOGI("ID = %#x\n",pMessageBuf->arg1);
|
||||
switch(pMessageBuf->arg1)
|
||||
{
|
||||
case SF_WIFI_CMD_START:
|
||||
|
@ -1404,9 +1510,9 @@ static SINT32 sf_cardv_proccess_cmd_wifi(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
|
||||
static SINT32 sf_cardv_proccess_cmd_file(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
printf("[%s:%d] ID = %#x\n", __FUNCTION__, __LINE__,pMessageBuf->arg1);
|
||||
//printf("[%s:%d] ID = %#x\n", __FUNCTION__, __LINE__,pMessageBuf->arg1);
|
||||
//UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||
|
||||
MLOGI("ID = %#x\n",pMessageBuf->arg1);
|
||||
switch(pMessageBuf->arg1)
|
||||
{
|
||||
case SF_PARA_CMD_UPDATE:
|
||||
|
@ -1423,6 +1529,38 @@ static SINT32 sf_cardv_proccess_cmd_file(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
return SF_SUCCESS;
|
||||
}
|
||||
|
||||
static SINT32 sf_cardv_proccess_cmd_dev(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
//printf("[%s:%d] ID = %#x\n", __FUNCTION__, __LINE__,pMessageBuf->arg1);
|
||||
MLOGI("ID = %#x\n",pMessageBuf->arg1);
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
switch(pMessageBuf->arg1)
|
||||
{
|
||||
case SF_DEV_CMD_TEMPER:
|
||||
if(sf_adc_value_get(SF_ADC_TEMP, &TemperAdc) == SUCCESS)
|
||||
{
|
||||
sf_adc2Temperature((UINT16)TemperAdc, 1);
|
||||
}
|
||||
|
||||
stMessageBuf.cmdId = CMD_DEV;
|
||||
stMessageBuf.arg1 = SF_DEV_CMD_TEMPER;
|
||||
stMessageBuf.arg2 = (SINT32)sf_adc2Temperature((UINT16)TemperAdc, pMessageBuf->arg2);
|
||||
sf_com_message_send_to_app(&stMessageBuf);
|
||||
break;
|
||||
case SF_DEV_CMD_BAT:
|
||||
stMessageBuf.cmdId = CMD_DEV;
|
||||
stMessageBuf.arg1 = SF_DEV_CMD_BAT;
|
||||
stMessageBuf.arg2 = (SINT32)sf_battery_value_get(0);
|
||||
stMessageBuf.arg3 = (SINT32)sf_battery_type_get();
|
||||
sf_com_message_send_to_app(&stMessageBuf);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return SF_SUCCESS;
|
||||
}
|
||||
|
||||
void* sf_cardv_message_thread(void *argv)
|
||||
{
|
||||
SINT32 ret = 0;
|
||||
|
@ -1434,7 +1572,8 @@ void* sf_cardv_message_thread(void *argv)
|
|||
{
|
||||
continue;
|
||||
}
|
||||
printf("[%s:%d]cmdId:%#x,paramBuf[%d]\n", __FUNCTION__, __LINE__,stMessagebuf.cmdId,stMessagebuf.arg1);
|
||||
MLOGI("cmdId:[%#x,%s]\n",stMessagebuf.cmdId,sf_process_message_getstatusstring(stMessagebuf.cmdId));
|
||||
//printf("[%s:%d]cmdId:%#x,paramBuf[%d]\n", __FUNCTION__, __LINE__,stMessagebuf.cmdId,stMessagebuf.arg1);
|
||||
switch(stMessagebuf.cmdId)
|
||||
{
|
||||
case CMD_MCU:
|
||||
|
@ -1444,16 +1583,19 @@ void* sf_cardv_message_thread(void *argv)
|
|||
sf_cardv_proccess_cmd_key(&stMessagebuf);
|
||||
break;
|
||||
case CMD_PARA:
|
||||
app_proccess_cmd_para_update(&stMessagebuf);
|
||||
sf_cardv_proccess_cmd_para_update(&stMessagebuf);
|
||||
break;
|
||||
case CMD_GPRS:
|
||||
//sf_cardv_proccess_cmd_gprs(&stMessagebuf);
|
||||
sf_cardv_proccess_cmd_gprs(&stMessagebuf);
|
||||
break;
|
||||
case CMD_FILE:
|
||||
sf_cardv_proccess_cmd_file(&stMessagebuf);
|
||||
break;
|
||||
case CMD_WIFI:
|
||||
sf_cardv_proccess_cmd_wifi(&stMessagebuf);
|
||||
break;
|
||||
case CMD_DEV:
|
||||
sf_cardv_proccess_cmd_dev(&stMessagebuf);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -72,26 +72,26 @@ EXTRA_INCLUDE += \
|
|||
-I$(NVT_HDAL_DIR)/vendor/ai/drivers/k_driver/source/kdrv_ai/nue2 \
|
||||
# application local includes
|
||||
EXTRA_INCLUDE += \
|
||||
-I./SrcCode \
|
||||
-I./SrcCode/Startup \
|
||||
-I./SrcCode/System \
|
||||
-I./SrcCode/Dx/include \
|
||||
-I./SrcCode/Gx/include \
|
||||
-I./SrcCode/Compatible \
|
||||
-I./SrcCode/UIApp/UsbMsdcCb \
|
||||
-I./SrcCode/UIApp/PhotoFast \
|
||||
-I./SrcCode/UIApp/MovieFast \
|
||||
-I./SrcCode/UIApp/UsbDiskFast \
|
||||
-I./SrcCode/UIApp/UsbCamFast \
|
||||
-I./SrcCode/UIApp/Photo \
|
||||
-I./SrcCode/FastFlow \
|
||||
-I./SrcCode/Dx/$(MODEL) \
|
||||
-I$(APP_DIR)/source/cardv/SrcCode \
|
||||
-I$(APP_DIR)/source/cardv/SrcCode/Startup \
|
||||
-I$(APP_DIR)/source/cardv/SrcCode/System \
|
||||
-I$(APP_DIR)/source/cardv/SrcCode/Dx/include \
|
||||
-I$(APP_DIR)/source/cardv/SrcCode/Gx/include \
|
||||
-I$(APP_DIR)/source/cardv/SrcCode/Compatible \
|
||||
-I$(APP_DIR)/source/cardv/SrcCode/UIApp/UsbMsdcCb \
|
||||
-I$(APP_DIR)/source/cardv/SrcCode/UIApp/PhotoFast \
|
||||
-I$(APP_DIR)/source/cardv/SrcCode/UIApp/MovieFast \
|
||||
-I$(APP_DIR)/source/cardv/SrcCode/UIApp/UsbDiskFast \
|
||||
-I$(APP_DIR)/source/cardv/SrcCode/UIApp/UsbCamFast \
|
||||
-I$(APP_DIR)/source/cardv/SrcCode/UIApp/Photo \
|
||||
-I$(APP_DIR)/source/cardv/SrcCode/FastFlow \
|
||||
-I$(APP_DIR)/source/cardv/SrcCode/Dx/$(MODEL) \
|
||||
|
||||
|
||||
ifeq "$(UI_STYLE)" "UI_STYLE_LVGL"
|
||||
|
||||
EXTRA_INCLUDE += \
|
||||
-I./SrcCode/UIWnd/LVGL_SPORTCAM \
|
||||
-I$(APP_DIR)/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM \
|
||||
|
||||
endif
|
||||
|
||||
|
|
|
@ -300,7 +300,7 @@ EXTRA_LIB += \
|
|||
-ldrv_pmu_ip6303 \
|
||||
-ldrv_gsensor_da380 \
|
||||
-ldrv_touch_gt911 \
|
||||
-ldrv_sf_i2c_mcu \
|
||||
-lsifar \
|
||||
|
||||
# HDAL Samples
|
||||
|
||||
|
|
|
@ -167,6 +167,12 @@ UINT32 DrvGPIO_GetPhotoMovieModeFromMonitor(void)
|
|||
sf_mcu_reg_set(SF_MCU_POWEROFF,0);
|
||||
break;
|
||||
case 1:
|
||||
#if SF_IQ_TEST == DISABLE
|
||||
case 3:
|
||||
case 8:
|
||||
case 10://A
|
||||
case 11://B
|
||||
#endif
|
||||
g_uiBootMode = DX_HUNTING_MODE_OTHER;
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef _SF_BATTERY_
|
||||
#define _SF_BATTERY_
|
||||
#ifndef _SF_BATTERY_H
|
||||
#define _SF_BATTERY_H
|
||||
|
||||
#include <kwrap/task.h>
|
||||
|
||||
|
|
|
@ -482,7 +482,10 @@
|
|||
#define DCF_SUPPORT_FORMAT (DCF_FILE_TYPE_JPG|DCF_FILE_TYPE_AVI|DCF_FILE_TYPE_MOV|DCF_FILE_TYPE_MP4)
|
||||
#define DCF_DIR_NAME "MEDIA" /* 100MEDIA */
|
||||
#define DCF_FILE_NAME "SYFW" /* SYFW0001.JPG */
|
||||
|
||||
#define PHOTO_THUMB_PATH "A:\\THUMB\\"
|
||||
#define MOVIE_THUMB_PATH "A:\\THUMB\\"
|
||||
#define SF_SEND_LIST_DIR "/mnt/sd/THUMB"
|
||||
#define SF_THUMB_SEND_LIST PHOTO_THUMB_PATH"send.list"
|
||||
//..............................................................................
|
||||
// EXIF Config
|
||||
#define USE_EXIF DISABLE
|
||||
|
@ -937,7 +940,7 @@
|
|||
#define HUNTING_CAMERA_SYS_PARTITION_NAME sys
|
||||
#define HUNTING_CAMERA_BOOT_LINUX ENABLE
|
||||
#define HUNTING_CAMERA_MCU ENABLE
|
||||
#define HUNTING_CAMERA_4G DISABLE//ENABLE
|
||||
#define HUNTING_CAMERA_4G ENABLE
|
||||
#define PHOTO_STAMP_ISP_STATUS DISABLE
|
||||
#define PHOTO_PREVIEW_SLICE_ENC_FUNC ENABLE
|
||||
#define PHOTO_PREVIEW_SLICE_ENC_VER2_FUNC ENABLE
|
||||
|
@ -948,10 +951,11 @@
|
|||
#define MOVIE_AI_DEMO DISABLE
|
||||
#define HUNTING_MCU_I2C DISABLE
|
||||
#define HUNTING_MCU_UART ENABLE
|
||||
#define HUNTING_IR_LED_940 ENABLE//DISABLE
|
||||
#define HUNTING_IR_LED_940 ENABLE
|
||||
#define SF_EXIF_MN_BUF_SIZE 256
|
||||
#define SF_BASE_VERSION "7MD4RCwD3T8"
|
||||
#define SF_BASE_VERSION "7MD4RCwD6T2"
|
||||
#define SF_TRIGGER_TIME_TEST DISABLE
|
||||
#define SF_IQ_TEST ENABLE
|
||||
|
||||
#define HUNTING_PHOTO_FAST_AE_60_FPS ENABLE
|
||||
#define HW_S530 1
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
/**********************************************************************************
|
||||
* independent thumbnail
|
||||
*********************************************************************************/
|
||||
#define MOVIE_THUMB_PATH "A:\\Thumb\\"
|
||||
|
||||
static char thumb_current_path_main[256] = {'\0'};
|
||||
static char thumb_current_path_clone[256] = {'\0'};
|
||||
|
@ -194,7 +193,7 @@ static void MovieFast_ShutDown(void)
|
|||
#endif
|
||||
|
||||
#if HUNTING_CAMERA_MCU
|
||||
#if HUNTING_CAMERA_4G == ENABLE
|
||||
#if SF_IQ_TEST != ENABLE
|
||||
fastboot_set_done(BOOT_FLOW_BOOT);
|
||||
flow_wait_linux();
|
||||
#else
|
||||
|
@ -1006,7 +1005,7 @@ THREAD_RETTYPE MovieFast_InitMovieModeThread(void *arg)
|
|||
#endif
|
||||
|
||||
MovieFast_InstallID();
|
||||
vos_util_delay_ms(330);
|
||||
vos_util_delay_ms(132);
|
||||
//Set_AEMODE(1);
|
||||
//vos_util_delay_ms(500);
|
||||
|
||||
|
|
|
@ -1787,7 +1787,7 @@ static void PhotoFast_ShutDown(void)
|
|||
#endif
|
||||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
|
||||
#if HUNTING_CAMERA_4G == ENABLE
|
||||
#if SF_IQ_TEST != ENABLE
|
||||
fastboot_set_done(BOOT_FLOW_BOOT);
|
||||
flow_wait_linux();
|
||||
#else
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
/**********************************************************************************
|
||||
* independent thumbnail
|
||||
*********************************************************************************/
|
||||
#define PHOTO_THUMB_PATH "A:\\Thumb\\"
|
||||
|
||||
|
||||
#define PHOTOFAST_SLICE_ENC_DBG_DUMP 0
|
||||
|
@ -2131,7 +2130,7 @@ INT32 PhotoFast_SliceEncode_CB3(void* user_data)
|
|||
|
||||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
memset(tmp, '\0', sizeof(tmp));
|
||||
snprintf(tmp, sizeof(tmp), "/mnt/sd/Thumb/%s", file_path); /* DCF 8.3 naming rule */
|
||||
snprintf(tmp, sizeof(tmp), "%s/%s", SF_SEND_LIST_DIR, file_path); /* DCF 8.3 naming rule */
|
||||
snprintf(tmp2, sizeof(tmp2), "%s", file_path); /* DCF 8.3 naming rule */
|
||||
sf_file_thumb_cfg_fill(tmp, tmp2, queue_ele_in->jpg_thumb_size, SF_FILE_TYPE_PIC_SMALL);
|
||||
DBG_DUMP("PHOTO THUMB %s \n %s\n %s\n", tmp, tmp2,file_path);
|
||||
|
|
|
@ -162,7 +162,7 @@ SECTIONS
|
|||
libdrv_rtc.a (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
||||
libdrv_serial.a (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
||||
libdrv_storage.a (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
||||
libdrv_sf_i2c_mcu.a (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
||||
libsifar.a (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
||||
/* kdrv */
|
||||
libkdrv_comm.a (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
||||
libarb_protected.a (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
||||
|
|
36
rtos/code/driver/na51089/include/sf_i2c_driver.h
Normal file
36
rtos/code/driver/na51089/include/sf_i2c_driver.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
#ifndef _SF_I2C_DRIVER_H
|
||||
#define _SF_I2C_DRIVER_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/delay.h>
|
||||
#include "kwrap/type.h"
|
||||
#include "kwrap/flag.h"
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/slab.h>
|
||||
#else
|
||||
#include "kwrap/type.h"
|
||||
#include "kwrap/flag.h"
|
||||
#include "rtos_na51089/kdrv_i2c.h"
|
||||
#endif
|
||||
|
||||
//#ifndef SF_I2C_NAME
|
||||
#define SF_I2C_NAME "sf_mcu"
|
||||
//#endif
|
||||
|
||||
//#ifndef SF_I2C_ADDR
|
||||
#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
||||
#define MCU_I2C_SLAVE_ADDR (0x20>>1)
|
||||
#elif defined(_MODEL_565_HUNTING_EVB_LINUX_4G_68CS_)
|
||||
#define MCU_I2C_SLAVE_ADDR (0xA0>>1)
|
||||
#else
|
||||
#define MCU_I2C_SLAVE_ADDR (0x20>>1)
|
||||
#endif
|
||||
|
||||
|
||||
ER sf_i2c_init_driver(UINT32 i2c_id);
|
||||
void sf_i2c_remove_driver(UINT32 id);
|
||||
INT32 sf_i2c_transfer(struct i2c_msg *msgs, INT32 num);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -25,23 +25,9 @@
|
|||
#define SUCCESS 0
|
||||
#define FAIL 1
|
||||
|
||||
//#ifndef SF_I2C_NAME
|
||||
#define SF_I2C_NAME "sf_mcu"
|
||||
//#endif
|
||||
|
||||
#define SF_SEND_LIST_ITEM_LENGTH 15
|
||||
#define SF_THUMB_SEND_LIST "A:\\Thumb\\send.list"
|
||||
|
||||
#define SF_SD_THUMB_PATH "A:\\Thumb\\ThumbFileCfg"
|
||||
//#ifndef SF_I2C_ADDR
|
||||
#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
|
||||
#define MCU_I2C_SLAVE_ADDR (0x20>>1)
|
||||
#elif defined(_MODEL_565_HUNTING_EVB_LINUX_4G_68CS_)
|
||||
#define MCU_I2C_SLAVE_ADDR (0xA0>>1)
|
||||
#else
|
||||
#define MCU_I2C_SLAVE_ADDR (0x20>>1)
|
||||
#endif
|
||||
|
||||
//#endif
|
||||
#define SF_MCU_NIGHT_MODE_LUMINANCE 600
|
||||
|
||||
#define DIGITAL_PIR 1
|
||||
|
@ -496,10 +482,6 @@ typedef struct sf_SRCFILE_ATTR_S {
|
|||
SF_FILE_ATTR_S stfileattr[SF_SRCFILE_MAX];
|
||||
}SF_SRCFILE_ATTR_S;
|
||||
|
||||
ER sf_i2c_init_driver(UINT32 i2c_id);
|
||||
void sf_i2c_remove_driver(UINT32 id);
|
||||
INT32 sf_i2c_transfer(struct i2c_msg *msgs, INT32 num);
|
||||
|
||||
extern int sf_mcu_test(void);
|
||||
extern int sf_mod_init(void);
|
||||
extern void sf_mod_exit(void);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
MODULE_NAME = drv_sf_i2c_mcu
|
||||
MODULE_NAME = sifar
|
||||
# DIRs
|
||||
VOS_DRIVER_DIR = $(NVT_VOS_DIR)/drivers
|
||||
KDRV_DIR = $(NVT_HDAL_DIR)/drivers/k_driver
|
||||
|
@ -43,7 +43,7 @@ $(MODULE_NAME)-objs := \
|
|||
sf_i2c_driver.o \
|
||||
sf_sd_common.o \
|
||||
sf_commu_mcu.o \
|
||||
sf_mcu_dev.o
|
||||
sf_mcu.o
|
||||
|
||||
ifeq ($(KERNELRELEASE),)
|
||||
PWD := $(shell pwd)
|
||||
|
@ -87,7 +87,7 @@ SRC = \
|
|||
sf_i2c_driver.c \
|
||||
sf_sd_common.c \
|
||||
sf_commu_mcu.c \
|
||||
sf_mcu_dev.c
|
||||
sf_mcu.c
|
||||
|
||||
copy = if [ ! -z "$(1)" -a "$(1)" != " " ]; then cp -avf $(1) $(2); fi
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <sf_mcu.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sf_i2c_driver.h>
|
||||
|
||||
#define MALLOC(x) malloc((x))
|
||||
#define FREE(x) free((x))
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#endif
|
||||
#include <sf_commu_mcu.h>
|
||||
|
||||
#define __MODULE__ sf_i2c_mcu
|
||||
#define __MODULE__ sf_mcu
|
||||
#define __DBGLVL__ 2 // 0=FATAL, 1=ERR, 2=WRN, 3=UNIT, 4=FUNC, 5=IND, 6=MSG, 7=VALUE, 8=USER
|
||||
#define __DBGFLT__ "*" // *=All, [mark]=CustomClass
|
||||
#include "kwrap/debug.h"
|
||||
|
@ -42,10 +42,10 @@
|
|||
|
||||
#include <uart.h>
|
||||
#include "FileSysTsk.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sf_i2c_driver.h>
|
||||
|
||||
static UINT8 McuSubVersion = 0;
|
||||
static UINT16 McuVersion = 0;
|
||||
|
@ -2040,6 +2040,10 @@ void sf_file_thumb_cfg_fill(char* filepath,char* fileName, UINT32 size, SF_FILE_
|
|||
{
|
||||
if (pThumbFileCfg == NULL) {
|
||||
pThumbFileCfg = malloc(sizeof(SF_SRCFILE_ATTR_S));
|
||||
if (pThumbFileCfg == NULL) {
|
||||
printf("%s:%d pThumbFileCfg malloc err\n", __FUNCTION__, __LINE__);
|
||||
return;
|
||||
}
|
||||
memset(pThumbFileCfg, 0, sizeof(SF_SRCFILE_ATTR_S));
|
||||
printf("%s:%d pThumbFileCfg malloc\n", __FUNCTION__, __LINE__);
|
||||
}
|
||||
|
@ -2132,6 +2136,10 @@ void sf_add_file_name_to_send_list(char *sendfname)
|
|||
//UINT32 fd = 0;
|
||||
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||
|
||||
#if SF_IQ_TEST != ENABLE
|
||||
FileSys_SetAttrib(PHOTO_THUMB_PATH, FST_ATTRIB_HIDDEN | FST_ATTRIB_SYSTEM, TRUE);
|
||||
#endif
|
||||
|
||||
if(strlen(sendfname) != SF_SEND_LIST_ITEM_LENGTH-3) //3 ->CamMode \r\n
|
||||
{
|
||||
printf("%s:%d AddFileNameToSenddist fail: send file name format error\n", __FUNCTION__, __LINE__);
|
|
@ -7,7 +7,7 @@
|
|||
version-info = [00 01 00 01];
|
||||
ae_expect_lum {
|
||||
size = [b0 00 00 00];
|
||||
data = [3c 00 00 00 3c 00 00 00 26 00 00 00 26 00 00 00 26 00 00 00 26 00 00 00 26 00 00 00 26 00 00 00 27 00 00 00 2c 00 00 00 32 00 00 00 3a 00 00 00 44 00 00 00 51 00 00 00 51 00 00 00 51 00 00 00 51 00 00 00 51 00 00 00 51 00 00 00 51 00 00 00 51 00 00 00 51 00 00 00 51 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 3c 00 00 00 46 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00];
|
||||
data = [3c 00 00 00 3c 00 00 00 26 00 00 00 26 00 00 00 26 00 00 00 26 00 00 00 26 00 00 00 26 00 00 00 27 00 00 00 2c 00 00 00 32 00 00 00 3a 00 00 00 44 00 00 00 50 00 00 00 50 00 00 00 50 00 00 00 50 00 00 00 50 00 00 00 50 00 00 00 50 00 00 00 50 00 00 00 50 00 00 00 50 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 32 00 00 00 3c 00 00 00 46 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00 5a 00 00 00];
|
||||
};
|
||||
ae_la_clamp {
|
||||
size = [50 01 00 00];
|
||||
|
@ -15,7 +15,7 @@
|
|||
};
|
||||
ae_over_exposure {
|
||||
size = [b0 01 00 00];
|
||||
data = [01 00 00 00 8c 00 00 00 03 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 02 00 00 00 02 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00 06 00 00 00 07 00 00 00 08 00 00 00 09 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 05 00 00 00 07 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 04 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00];
|
||||
data = [01 00 00 00 8c 00 00 00 03 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 06 00 00 00 05 00 00 00 04 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 02 00 00 00 02 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00 06 00 00 00 07 00 00 00 08 00 00 00 09 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 05 00 00 00 07 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 0a 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 04 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00];
|
||||
};
|
||||
ae_convergence {
|
||||
size = [2c 00 00 00];
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
};
|
||||
awb_ct_weight {
|
||||
size = [78 00 00 00];
|
||||
data = [fc 08 00 00 f0 0a 00 00 74 0e 00 00 5c 12 00 00 64 19 00 00 f8 2a 00 00 48 03 00 00 60 03 00 00 bc 03 00 00 f7 03 00 00 23 04 00 00 c3 04 00 00 01 00 00 00 01 00 00 00 02 00 00 00 04 00 00 00 08 00 00 00 09 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 03 00 00 00 08 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00];
|
||||
data = [fc 08 00 00 f0 0a 00 00 74 0e 00 00 5c 12 00 00 64 19 00 00 f8 2a 00 00 48 03 00 00 60 03 00 00 bc 03 00 00 f7 03 00 00 23 04 00 00 c3 04 00 00 01 00 00 00 01 00 00 00 01 00 00 00 02 00 00 00 05 00 00 00 06 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 03 00 00 00 08 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00];
|
||||
};
|
||||
awb_target {
|
||||
size = [24 00 00 00];
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user