Merge remote-tracking branch 'origin/Branch_S530' into branch_s530

This commit is contained in:
alisa 2023-08-24 18:16:34 +08:00
commit 95d1d07f69
23 changed files with 286 additions and 297 deletions

29
.gitlab-ci.yml Executable file
View File

@ -0,0 +1,29 @@
#
# 2023.07.23 Oliver:
# This file does not need to be modified.
# To increase the platform, please ask the administrator to increase the server script.
#
stages:
- auto
build-job:
stage: auto
tags:
- ${CI_PROJECT_NAME}
script:
- ~/${CI_PROJECT_NAME}/build.sh
- sleep 10
analyze-job:
stage: auto
tags:
- ${CI_PROJECT_NAME}
variables:
GIT_STRATEGY: none
GIT_CHECKOUT: "false"
script:
- ~/${CI_PROJECT_NAME}/analyze.sh $CI_PROJECT_NAME $CI_COMMIT_BRANCH
needs: ["build-job"]
when: on_success

View File

@ -73,3 +73,7 @@ usr/.initramfs_data.cpio.d
usr/gen_init_cpio usr/gen_init_cpio
usr/initramfs_data.cpio usr/initramfs_data.cpio
vmlinux vmlinux
arch/arm/plat-novatek/include/plat
arch/arm/plat-novatek/plat
drivers/soc/nvt/nvt_hdal/hdal
drivers/soc/nvt/nvt_hdal/vos

View File

@ -1 +0,0 @@
/home/payton/S530/BSP/linux-kernel/arch/arm/plat-novatek/include/plat-na51089

View File

@ -1 +0,0 @@
/home/payton/S530/BSP/linux-kernel/arch/arm/plat-novatek/plat-na51089

View File

@ -1 +0,0 @@
/home/payton/S530/code/hdal

View File

@ -1 +0,0 @@
/home/payton/S530/code/vos

View File

@ -742,9 +742,9 @@ EXIT:
//origInfo_check = currentInfo; //origInfo_check = currentInfo;
memcpy(&origInfo, &currentInfo, sizeof(currentInfo)); memcpy(&origInfo, &currentInfo, sizeof(currentInfo));
memcpy(&origInfo_check, &currentInfo, sizeof(currentInfo)); memcpy(&origInfo_check, &currentInfo, sizeof(currentInfo));
#if HUNTING_CAMERA_MCU == ENABLE //#if HUNTING_CAMERA_MCU == ENABLE
sf_share_mem_customer_down(0); // sf_share_mem_customer_down(0);
#endif //#endif
if(sys_mtd_fp){ if(sys_mtd_fp){
fclose(sys_mtd_fp); fclose(sys_mtd_fp);
sys_mtd_fp = NULL; sys_mtd_fp = NULL;

View File

@ -37,4 +37,5 @@ INT16 sf_adc2Temperature(UINT16 adcValue, UINT8 type);/*type: 0:F 1:C*/
void sf_stamp_temperature_get(INT16 *fTem,INT16 *cTem); /*0:F 1:C*/ void sf_stamp_temperature_get(INT16 *fTem,INT16 *cTem); /*0:F 1:C*/
void sf_temper_update(void); void sf_temper_update(void);
INT16 sf_celsius_change_to_fahrenheit(INT16 cTemper); INT16 sf_celsius_change_to_fahrenheit(INT16 cTemper);
UINT16 sf_battery_val_get(void);
#endif #endif

View File

@ -887,7 +887,7 @@ static SINT32 sf_app_proccess_cmd_dev(SF_MESSAGE_BUF_S *pMessageBuf)
stMessageBuf.cmdId = CMD_DEV; stMessageBuf.cmdId = CMD_DEV;
stMessageBuf.arg1 = SF_DEV_CMD_BAT; stMessageBuf.arg1 = SF_DEV_CMD_BAT;
stMessageBuf.arg2 = sf_battery_value_get(0); stMessageBuf.arg2 = sf_battery_value_get(0);
stMessageBuf.arg3 = (SINT32)sf_battery_type_get(); stMessageBuf.arg3 = ((SINT32)(((sf_battery_type_get()) << 16) | (sf_battery_val_get())));
printf("[%s:%d]batteryVal=%d battery_type:%d\n",__FUNCTION__,__LINE__,stMessageBuf.arg2, stMessageBuf.arg3); printf("[%s:%d]batteryVal=%d battery_type:%d\n",__FUNCTION__,__LINE__,stMessageBuf.arg2, stMessageBuf.arg3);
sf_com_message_send_to_cardv(&stMessageBuf); sf_com_message_send_to_cardv(&stMessageBuf);
//sf_app_set_battery(pMessageBuf->arg2, pMessageBuf->arg3); //sf_app_set_battery(pMessageBuf->arg2, pMessageBuf->arg3);

View File

@ -192,10 +192,20 @@ SINT32 sf_USB_net_init(void)
if(strncmp(puiPara->ModuleVer, GPRS_MODULE_TYPE_EG915Q, 6) == 0) if(strncmp(puiPara->ModuleVer, GPRS_MODULE_TYPE_EG915Q, 6) == 0)
{ {
ret = sf_check_usb0(); ret = sf_check_usb0();
if(ret != SUCCESS)
{
ret = sf_check_eth0();
}
} }
else else
{ {
ret = sf_check_eth0(); ret = sf_check_eth0();
if(ret != SUCCESS)
{
ret = sf_check_usb0();
}
} }
if (SUCCESS == ret) if (SUCCESS == ret)
{ {

View File

@ -397,7 +397,7 @@ void sf_battery_level_update(void)
stMessageBuf.cmdId = CMD_DEV; stMessageBuf.cmdId = CMD_DEV;
stMessageBuf.arg1 = SF_DEV_CMD_BAT; stMessageBuf.arg1 = SF_DEV_CMD_BAT;
stMessageBuf.arg2 = batteryVal; stMessageBuf.arg2 = batteryVal;
stMessageBuf.arg3 = (SINT32)sf_battery_type_get(); stMessageBuf.arg3 = ((SINT32)(((sf_battery_type_get()) << 16) | (sf_battery_val_get())));
printf("[%s:%d]batteryVal=%d battery_type:%d\n",__FUNCTION__,__LINE__,batteryVal, stMessageBuf.arg3); printf("[%s:%d]batteryVal=%d battery_type:%d\n",__FUNCTION__,__LINE__,batteryVal, stMessageBuf.arg3);
sf_com_message_send_to_cardv(&stMessageBuf); sf_com_message_send_to_cardv(&stMessageBuf);
#endif #endif
@ -1290,6 +1290,26 @@ UINT8 sf_battery_type_get(void)
return SF_POWER_TYPE_DC; return SF_POWER_TYPE_DC;
} }
/*************************************************
Function: sf_battery_type_get
Description: Get battery type.
Input: N/A
Output: N/A
Return: value: battery type, 0:normal 1:LiPolymer
Others: N/A
*************************************************/
UINT16 sf_battery_val_get(void)
{
if(IsPowerDcIn)
return (UINT16)DcVoltageVal;
else if(LiPolymerVoltageVal)
return (UINT16)LiPolymerVoltageVal;
else if(BatVoltageVal)
return (UINT16)BatVoltageVal;
else
return 0;
}
/************************************************* /*************************************************
Function: sf_is_battery_low Function: sf_is_battery_low
Description: Judge whether the power is low Description: Judge whether the power is low

View File

@ -248,7 +248,89 @@ static int find_sys_mtd_device(char* result_buf, const UINT32 result_buf_size)
return ret; return ret;
} }
UINT32 sf_app_set_pir_sensitivity(UINT8 pirs)
{
UINT8 digPirLevel[10] = {200, 38, 30, 24, 18, 16, 10, 9, 8, 7};
UINT8 digPirCount[10] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1};
UIMenuStoreInfo *puiPara = sf_app_ui_para_get();
//UIMenuStoreInfo *puiPara = sf_ui_para_get();
if(pirs >= 10)
return FAIL;
puiPara->PirSensitivity = pirs;
puiPara->DigitPirSensitivity = digPirLevel[pirs];
puiPara->DigitPirCnt = digPirCount[pirs];
puiPara->DigitPirWindowTime = 0;
//#if SF_IS_RELEASE == ENABLE
if(puiPara->PirSensitivity)
{
puiPara->TimelapseSwitch = SF_OFF;
puiPara->TimelapseTime.Hour = 0;
puiPara->TimelapseTime.Min = 0;
puiPara->TimelapseTime.Sec = 0;
//Save_MenuInfo();
}
//#endif
return SUCCESS;
}
/*************************************************
Function: sf_power_on_para_check_init
Description: power on reset para
Input: N/A
Output: N/A
Return: N/A
Others: N/A
*************************************************/
void sf_app_power_on_para_check_init(void)
{
#if HUNTING_CAMERA_MCU == ENABLE
UIMenuStoreInfo *puiPara = sf_app_ui_para_get();
UINT8 PowerOnMode = sf_poweron_type_get();
if(((PowerOnMode == SF_MCU_STARTUP_NORMAL) || (PowerOnMode == SF_MCU_STARTUP_OFF) || (PowerOnMode == SF_MCU_STARTUP_ONKEY)))
{
if(1 == puiPara->NeedTimeSyncStartUp){
puiPara->NeedTimeSyncStartUp = 0;
}
if(0 == puiPara->NetWorkNeedSearch){
puiPara->NetWorkNeedSearch = 1;
}
memset(puiPara->SimIccid,'\0',sizeof(puiPara->SimIccid));
}
printf("PowerOnMode=%d NeedTimeSyncStartUp=%d NetWorkNeedSearch:%d\n", PowerOnMode, puiPara->NeedTimeSyncStartUp, puiPara->NetWorkNeedSearch);
if(puiPara->Multishot != sf_sys_get_flag(FL_CONTINUE_SHOT))
{
sf_sys_set_flag(FL_CONTINUE_SHOT, puiPara->Multishot);
}
if(puiPara->VideoSize != sf_sys_get_flag(FL_MOVIE_SIZE))
{
sf_sys_set_flag(FL_MOVIE_SIZE, puiPara->VideoSize);
sf_sys_set_flag(FL_MOVIE_SIZE_MENU, puiPara->VideoSize);
}
if(puiPara->ImgSize != sf_sys_get_flag(FL_PHOTO_SIZE))
{
sf_sys_set_flag(FL_PHOTO_SIZE, puiPara->ImgSize);
}
if(puiPara->DateStyle != sf_sys_get_flag(FL_DateFormatIndex))
{
sf_sys_set_flag(FL_DateFormatIndex, puiPara->DateStyle);
}
if(puiPara->Language != sf_sys_get_flag(FL_LANGUAGE))
{
sf_sys_set_flag(FL_LANGUAGE, puiPara->Language);
}
if(puiPara->StampSwitch != sf_sys_get_flag(FL_DATE_STAMP))
{
sf_sys_set_flag(FL_DATE_STAMP, puiPara->StampSwitch);
}
#if SF_HW_TEST != ENABLE
sf_app_set_pir_sensitivity(puiPara->PirSensitivity);
#endif
#endif
}
int sf_customer_param_load(void) int sf_customer_param_load(void)
{ {
unsigned long long partition_ofs= 0, partition_size = 0; unsigned long long partition_ofs= 0, partition_size = 0;
@ -321,6 +403,7 @@ EXIT:
//SysCheckFlag(); //SysCheckFlag();
//origInfo = currentInfo; //origInfo = currentInfo;
//origInfo_check = currentInfo; //origInfo_check = currentInfo;
sf_app_power_on_para_check_init();
memcpy(&origInfo, &currentInfo, sizeof(currentInfo)); memcpy(&origInfo, &currentInfo, sizeof(currentInfo));
memcpy(&origInfo_check, &currentInfo, sizeof(currentInfo)); memcpy(&origInfo_check, &currentInfo, sizeof(currentInfo));
if(sys_mtd_fp){ if(sys_mtd_fp){

View File

@ -1,256 +0,0 @@
/* opensslconf.h */
/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
#ifdef __cplusplus
extern "C" {
#endif
/* OpenSSL was configured with the following options: */
#ifndef OPENSSL_DOING_MAKEDEPEND
#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
# define OPENSSL_NO_EC_NISTP_64_GCC_128
#endif
#ifndef OPENSSL_NO_GMP
# define OPENSSL_NO_GMP
#endif
#ifndef OPENSSL_NO_JPAKE
# define OPENSSL_NO_JPAKE
#endif
#ifndef OPENSSL_NO_KRB5
# define OPENSSL_NO_KRB5
#endif
#ifndef OPENSSL_NO_LIBUNBOUND
# define OPENSSL_NO_LIBUNBOUND
#endif
#ifndef OPENSSL_NO_MD2
# define OPENSSL_NO_MD2
#endif
#ifndef OPENSSL_NO_RC5
# define OPENSSL_NO_RC5
#endif
#ifndef OPENSSL_NO_RFC3779
# define OPENSSL_NO_RFC3779
#endif
#ifndef OPENSSL_NO_SCTP
# define OPENSSL_NO_SCTP
#endif
#ifndef OPENSSL_NO_SSL_TRACE
# define OPENSSL_NO_SSL_TRACE
#endif
#ifndef OPENSSL_NO_STORE
# define OPENSSL_NO_STORE
#endif
#ifndef OPENSSL_NO_UNIT_TEST
# define OPENSSL_NO_UNIT_TEST
#endif
#endif /* OPENSSL_DOING_MAKEDEPEND */
#ifndef OPENSSL_THREADS
# define OPENSSL_THREADS
#endif
#ifndef OPENSSL_NO_STATIC_ENGINE
# define OPENSSL_NO_STATIC_ENGINE
#endif
/* The OPENSSL_NO_* macros are also defined as NO_* if the application
asks for it. This is a transient feature that is provided for those
who haven't had the time to do the appropriate changes in their
applications. */
#ifdef OPENSSL_ALGORITHM_DEFINES
# if defined(OPENSSL_NO_EC_NISTP_64_GCC_128) && !defined(NO_EC_NISTP_64_GCC_128)
# define NO_EC_NISTP_64_GCC_128
# endif
# if defined(OPENSSL_NO_GMP) && !defined(NO_GMP)
# define NO_GMP
# endif
# if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE)
# define NO_JPAKE
# endif
# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
# define NO_KRB5
# endif
# if defined(OPENSSL_NO_LIBUNBOUND) && !defined(NO_LIBUNBOUND)
# define NO_LIBUNBOUND
# endif
# if defined(OPENSSL_NO_MD2) && !defined(NO_MD2)
# define NO_MD2
# endif
# if defined(OPENSSL_NO_RC5) && !defined(NO_RC5)
# define NO_RC5
# endif
# if defined(OPENSSL_NO_RFC3779) && !defined(NO_RFC3779)
# define NO_RFC3779
# endif
# if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP)
# define NO_SCTP
# endif
# if defined(OPENSSL_NO_SSL_TRACE) && !defined(NO_SSL_TRACE)
# define NO_SSL_TRACE
# endif
# if defined(OPENSSL_NO_STORE) && !defined(NO_STORE)
# define NO_STORE
# endif
# if defined(OPENSSL_NO_UNIT_TEST) && !defined(NO_UNIT_TEST)
# define NO_UNIT_TEST
# endif
#endif
/* crypto/opensslconf.h.in */
/* Generate 80386 code? */
#undef I386_ONLY
#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
#define ENGINESDIR "/home/xiaojiazhu/project_codes/s530-ntk/code/lib/external/__install/lib/engines"
#define OPENSSLDIR "/home/xiaojiazhu/project_codes/s530-ntk/code/lib/external/__install/ssl"
#endif
#endif
#undef OPENSSL_UNISTD
#define OPENSSL_UNISTD <unistd.h>
#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
#define IDEA_INT unsigned int
#endif
#if defined(HEADER_MD2_H) && !defined(MD2_INT)
#define MD2_INT unsigned int
#endif
#if defined(HEADER_RC2_H) && !defined(RC2_INT)
/* I need to put in a mod for the alpha - eay */
#define RC2_INT unsigned int
#endif
#if defined(HEADER_RC4_H)
#if !defined(RC4_INT)
/* using int types make the structure larger but make the code faster
* on most boxes I have tested - up to %20 faster. */
/*
* I don't know what does "most" mean, but declaring "int" is a must on:
* - Intel P6 because partial register stalls are very expensive;
* - elder Alpha because it lacks byte load/store instructions;
*/
#define RC4_INT unsigned char
#endif
#if !defined(RC4_CHUNK)
/*
* This enables code handling data aligned at natural CPU word
* boundary. See crypto/rc4/rc4_enc.c for further details.
*/
#define RC4_CHUNK unsigned long
#endif
#endif
#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG)
/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
* %20 speed up (longs are 8 bytes, int's are 4). */
#ifndef DES_LONG
#define DES_LONG unsigned int
#endif
#endif
#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
#define CONFIG_HEADER_BN_H
#define BN_LLONG
/* Should we define BN_DIV2W here? */
/* Only one for the following should be defined */
#undef SIXTY_FOUR_BIT_LONG
#undef SIXTY_FOUR_BIT
#define THIRTY_TWO_BIT
#endif
#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
#define CONFIG_HEADER_RC4_LOCL_H
/* if this is defined data[i] is used instead of *data, this is a %20
* speedup on x86 */
#undef RC4_INDEX
#endif
#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
#define CONFIG_HEADER_BF_LOCL_H
#define BF_PTR
#endif /* HEADER_BF_LOCL_H */
#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
#define CONFIG_HEADER_DES_LOCL_H
#ifndef DES_DEFAULT_OPTIONS
/* the following is tweaked from a config script, that is why it is a
* protected undef/define */
#ifndef DES_PTR
#undef DES_PTR
#endif
/* This helps C compiler generate the correct code for multiple functional
* units. It reduces register dependancies at the expense of 2 more
* registers */
#ifndef DES_RISC1
#undef DES_RISC1
#endif
#ifndef DES_RISC2
#undef DES_RISC2
#endif
#if defined(DES_RISC1) && defined(DES_RISC2)
#error YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
#endif
/* Unroll the inner loop, this sometimes helps, sometimes hinders.
* Very mucy CPU dependant */
#ifndef DES_UNROLL
#define DES_UNROLL
#endif
/* These default values were supplied by
* Peter Gutman <pgut001@cs.auckland.ac.nz>
* They are only used if nothing else has been defined */
#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
/* Special defines which change the way the code is built depending on the
CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
even newer MIPS CPU's, but at the moment one size fits all for
optimization options. Older Sparc's work better with only UNROLL, but
there's no way to tell at compile time what it is you're running on */
#if defined( sun ) /* Newer Sparc's */
# define DES_PTR
# define DES_RISC1
# define DES_UNROLL
#elif defined( __ultrix ) /* Older MIPS */
# define DES_PTR
# define DES_RISC2
# define DES_UNROLL
#elif defined( __osf1__ ) /* Alpha */
# define DES_PTR
# define DES_RISC2
#elif defined ( _AIX ) /* RS6000 */
/* Unknown */
#elif defined( __hpux ) /* HP-PA */
/* Unknown */
#elif defined( __aux ) /* 68K */
/* Unknown */
#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
# define DES_UNROLL
#elif defined( __sgi ) /* Newer MIPS */
# define DES_PTR
# define DES_RISC2
# define DES_UNROLL
#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
# define DES_PTR
# define DES_RISC1
# define DES_UNROLL
#endif /* Systems-specific speed defines */
#endif
#endif /* DES_DEFAULT_OPTIONS */
#endif /* HEADER_DES_LOCL_H */
#ifdef __cplusplus
}
#endif

View File

@ -80,6 +80,7 @@ static UINT8 FwUpdate = 0;
static UINT8 IsNightLedOn = 0; static UINT8 IsNightLedOn = 0;
static SF_BatteryLevel_e sf_LatestBattLevel = SF_BATT_LEVEL_0; static SF_BatteryLevel_e sf_LatestBattLevel = SF_BATT_LEVEL_0;
static UINT8 batteryVal = 0; static UINT8 batteryVal = 0;
static UINT16 powerVal = 0;
static UINT8 batteryType = 0; static UINT8 batteryType = 0;
static SINT16 fTemper = 0; static SINT16 fTemper = 0;
static SINT16 cTemper = 0; static SINT16 cTemper = 0;
@ -1699,7 +1700,8 @@ static SINT32 sf_cardv_proccess_cmd_dev(SF_MESSAGE_BUF_S *pMessageBuf)
break; break;
case SF_DEV_CMD_BAT: case SF_DEV_CMD_BAT:
batteryVal = pMessageBuf->arg2; batteryVal = pMessageBuf->arg2;
batteryType = pMessageBuf->arg3; batteryType = pMessageBuf->arg3 & 0xf0;
powerVal = pMessageBuf->arg3 & 0xf;
sf_cardv_battery_level_update(batteryVal); sf_cardv_battery_level_update(batteryVal);
MLOGI("batteryVal:%d batteryType:%d\n",batteryVal,batteryType); MLOGI("batteryVal:%d batteryType:%d\n",batteryVal,batteryType);
@ -2236,9 +2238,9 @@ UINT8 sf_cardv_battery_type_get(void)
BOOL sf_is_flash_voltage_abnormal(void) BOOL sf_is_flash_voltage_abnormal(void)
{ {
printf("batteryVal=%d batteryType=%d \n", batteryVal, batteryType); printf("powerVal=%d batteryType=%d \n", powerVal, batteryType);
if((/*SF_POWER_TYPE_DC*/1 != batteryType) && (batteryVal < 55) && (batteryVal < 55)) if((/*SF_POWER_TYPE_DC*/1 != batteryType) && (powerVal < 55) )
{ {
printf("low battery no write flash\n"); printf("low battery no write flash\n");
return TRUE; return TRUE;

16
mkall.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
#用于gitlab-ci.yml编译使用
echo "Start compile."
export ROOT_PATH=$PWD
cd rtos
source build/envsetup.sh
lunch rtos cfg_565_HUNTING_EVB_LINUX_4G_S530 gcc-6.5-newlib-2.4-2019.11-arm-ca9-eabihf
make all
cd $ROOT_PATH
source build/envsetup.sh
lunch Linux cfg_565_HUNTING_EVB_LINUX_4G_S530 arm-ca9-linux-uclibcgnueabihf-8.4.01
make all
cd $ROOT_PATH

View File

@ -1165,19 +1165,19 @@ static UINT32 ae_adc_tbl[57][3] = {
{702, 203, 1070}, {702, 203, 1070},
{701, 267, 1070}, {701, 267, 1070},
{700, 301, 1010}, {700, 301, 1010},
{699, 403, 1020}, {699, 333, 1020},
{698, 760, 1000}, {698, 386, 1000},
{697, 1085, 1000},// 524 {697, 423, 1000},// 524
{696, 1516, 1000}, {696, 502, 1000},
{695, 1802, 1000}, {695, 560, 1000},
{694, 2333, 1000}, {694, 828, 1000},
{693, 3630, 1000}, {693, 991, 1000},
{691, 4668, 1000}, {691, 1192, 1000},
{689, 7009, 1000}, {689, 1325, 1000},
{687, 8333, 1600}, {687, 1620, 1000},
{684, 8333, 2150}, {684, 1999, 1000},//8333, 2150},
{681, 8333, 2550}, {681, 3808, 1000},//8333, 2550},
{679, 8333, 2760}, {679, 8333, 1070},
{669, 8333, 3030}, {669, 8333, 3030},
{645, 8333, 3160}, {645, 8333, 3160},
{617, 8333, 3400}, {617, 8333, 3400},
@ -1191,9 +1191,9 @@ static UINT32 ae_adc_tbl[57][3] = {
{446, 16666, 2720}, {446, 16666, 2720},
{422, 16666, 2890}, {422, 16666, 2890},
{399, 16666, 3000}, {399, 16666, 3000},
{376, 16666, 3300}, {376, 16666, 3000},
{353, 16666, 3500}, {353, 16666, 3000},
{330, 16666, 4740}, {330, 16666, 3000},
{308, 16666, 3950},// 12190}, {308, 16666, 3950},// 12190},
{286, 16666, 4210},// 26600}, {286, 16666, 4210},// 26600},
{264, 16666, 4500}, //45770}, {264, 16666, 4500}, //45770},

View File

@ -9,8 +9,8 @@
#define FLGPHOTOFAST_SHUTDOWN 0x00000002 #define FLGPHOTOFAST_SHUTDOWN 0x00000002
#define FLGPHOTOFAST_MASK FLGPTN_BIT_ALL #define FLGPHOTOFAST_MASK FLGPTN_BIT_ALL
#define PHOTOFAST_AE_PRESET_FRAME_CNT 21 /* lock AE */ #define PHOTOFAST_AE_PRESET_FRAME_CNT 11 /* lock AE */
#define PHOTOFAST_START_CAP_FRAME_CNT (PHOTOFAST_AE_PRESET_FRAME_CNT + 4*2) /* capture frame, it should be larger than PHOTOFAST_AE_PRESET_FRAME_CNT by 3 */ #define PHOTOFAST_START_CAP_FRAME_CNT (PHOTOFAST_AE_PRESET_FRAME_CNT + 3*2) /* capture frame, it should be larger than PHOTOFAST_AE_PRESET_FRAME_CNT by 3 */
#define PHOTOFAST_HD_PUSH_PULL_TIMEOUT_MS 3000 #define PHOTOFAST_HD_PUSH_PULL_TIMEOUT_MS 3000
// Naming rule & FileDB // Naming rule & FileDB

View File

@ -264,10 +264,10 @@
#define SIFAR_FTP_USERNAME "cameraftp" #define SIFAR_FTP_USERNAME "cameraftp"
#define SIFAR_FTP_PASSWORD "camera123456" #define SIFAR_FTP_PASSWORD "camera123456"
#define SIFAR_FTPS_IP "49.51.247.68" #define SIFAR_FTPS_IP "150.109.112.64"
#define SIFAR_FTPS_PORT "21" #define SIFAR_FTPS_PORT "21"
#define SIFAR_FTPS_USERNAME "sifarftpsuser" #define SIFAR_FTPS_USERNAME "ftp_user"
#define SIFAR_FTPS_PASSWORD "rsHkZJPg" #define SIFAR_FTPS_PASSWORD "Sifar%%123456"
#define CUSTOM_FTP_IP "ZnRwLTE1YmVuYWpmZWIuaXNoYXJlaXQubmV0" #define CUSTOM_FTP_IP "ZnRwLTE1YmVuYWpmZWIuaXNoYXJlaXQubmV0"

View File

@ -348,6 +348,13 @@ void Load_MenuInfo(void)
} }
else{ else{
memcpy(&currentInfo, pCurrentInfoTmp, sizeof(UIMenuStoreInfo)); memcpy(&currentInfo, pCurrentInfoTmp, sizeof(UIMenuStoreInfo));
#if HUNTING_CAMERA_MCU == ENABLE
if(currentInfo.OtaFlag)
{
SysResetFlag();
Save_MenuInfo();
}
#endif
} }
free(pCurrentInfoTmp); free(pCurrentInfoTmp);
@ -368,7 +375,7 @@ void Load_MenuInfo(void)
#if HUNTING_CAMERA_MCU == ENABLE #if HUNTING_CAMERA_MCU == ENABLE
sf_power_on_para_check_init(); sf_power_on_para_check_init();
#endif #endif
origInfo = currentInfo; memcpy(&origInfo, &currentInfo, sizeof(currentInfo));
#endif #endif
@ -1130,7 +1137,7 @@ void SysResetFlag(void)
puiPara->DateStyle = DEFAULT_DATE_TIME; puiPara->DateStyle = DEFAULT_DATE_TIME;
SysSetFlag(FL_DateFormatIndex, DEFAULT_DATE_TIME); SysSetFlag(FL_DateFormatIndex, DEFAULT_DATE_TIME);
///////////// /////////////
puiPara->StampSwitch = DEFAULT_STAMP_SWITCH; puiPara->StampSwitch = DEFAULT_DATE_STAMP;//DEFAULT_STAMP_SWITCH;
puiPara->BatteryType = DEFAULT_BATTERY_TYPE; puiPara->BatteryType = DEFAULT_BATTERY_TYPE;
puiPara->SdLoopSwitch = DEFAULT_SD_LOOP_SWITCH; puiPara->SdLoopSwitch = DEFAULT_SD_LOOP_SWITCH;
puiPara->PwdSwitch = DEFAULT_PWD_SWITCH; puiPara->PwdSwitch = DEFAULT_PWD_SWITCH;
@ -1200,11 +1207,41 @@ void SysResetFlag(void)
#endif #endif
snprintf((char *)puiPara->WifiApPWD, sizeof(puiPara->WifiApPWD), "Reveal2021"); UINT8 tmpStr[60] = {0};
strcpy((char *)puiPara ->FtpIp, "119.23.174.139"); #if SF_TEST_GPRS
strcpy((char *)puiPara ->FtpPort, "21"); snprintf((char *)puiPara->FtpIp, sizeof(puiPara->FtpIp), USER_FTP_IP);
strcpy((char *)puiPara ->FtpUsr, "cameraftp"); snprintf((char *)puiPara->FtpPort, sizeof(puiPara->FtpPort), USER_FTP_PORT);
strcpy((char *)puiPara ->FtpPwd, "camera123456"); snprintf((char *)puiPara->FtpUsr, sizeof(puiPara->FtpUsr), USER_FTP_USERNAME);
snprintf((char *)puiPara->FtpPwd, sizeof(puiPara->FtpPwd), USER_FTP_PASSWORD);
snprintf((char *)puiPara->FtpsIp, sizeof(puiPara->FtpsIp), SIFAR_FTPS_IP);
snprintf((char *)puiPara->FtpsPort, sizeof(puiPara->FtpsPort), SIFAR_FTPS_PORT);
snprintf((char *)puiPara->FtpsUsr, sizeof(puiPara->FtpsUsr), SIFAR_FTPS_USERNAME);
snprintf((char *)puiPara->FtpsPwd, sizeof(puiPara->FtpsPwd), SIFAR_FTPS_PASSWORD);
//SF_STRCPY(puiPara ->APNGPRS, "3gnet");
#else
sf_base64_decode(USER_FTP_IP, (char *)tmpStr);
snprintf((char *)puiPara->FtpIp, sizeof(puiPara->FtpIp), (char *)tmpStr);
snprintf((char *)puiPara->FtpPort, sizeof(puiPara->FtpPort), USER_FTP_PORT);
memset(tmpStr, '\0', sizeof(tmpStr));
sf_base64_decode(USER_FTP_USERNAME, (char *)tmpStr);
snprintf((char *)puiPara->FtpUsr, sizeof(puiPara->FtpUsr), (char *)tmpStr);
memset(tmpStr, '\0', sizeof(tmpStr));
sf_base64_decode(USER_FTP_PASSWORD, (char *)tmpStr);
snprintf((char *)puiPara->FtpPwd, sizeof(puiPara->FtpPwd), (char *)tmpStr);
#endif
memset(tmpStr, '\0', sizeof(tmpStr));
sf_base64_decode(OTA_FTP_IP, (char *)tmpStr);
snprintf((char *)puiPara->OtaFtpIp, sizeof(puiPara->OtaFtpIp), (char *)tmpStr);
snprintf((char *)puiPara->OtaFtpPort, sizeof(puiPara->OtaFtpPort), OTA_FTP_PORT);
memset(tmpStr, '\0', sizeof(tmpStr));
sf_base64_decode(OTA_FTP_USERNAME, (char *)tmpStr);
snprintf((char *)puiPara->OtaFtpUserName, sizeof(puiPara->OtaFtpUserName), (char *)tmpStr);
memset(tmpStr, '\0', sizeof(tmpStr));
sf_base64_decode(OTA_FTP_PASSWORD, (char *)tmpStr);
snprintf((char *)puiPara->OtaFtpPassWord, sizeof(puiPara->OtaFtpPassWord), (char *)tmpStr);
#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_) #if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_)
puiPara->GpsNumber = DEFAULT_GPS_NUMBER; puiPara->GpsNumber = DEFAULT_GPS_NUMBER;

View File

@ -527,5 +527,6 @@ UINT8 sf_convert_power_on_mode(void);
void sf_hw_info_save(char *name,FST_FILE fd); void sf_hw_info_save(char *name,FST_FILE fd);
void sf_set_iso_exp_lv(UINT32 adj, UINT32 iso, UINT32 exp, UINT32 lv); void sf_set_iso_exp_lv(UINT32 adj, UINT32 iso, UINT32 exp, UINT32 lv);
UINT32 sf_in_update(void); UINT32 sf_in_update(void);
int sf_base64_decode(const char * base64, char * bindata);
#endif #endif

View File

@ -2342,6 +2342,52 @@ void sf_para_print(void)
sf_battery_print(); sf_battery_print();
} }
static char * base64char = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
int sf_base64_decode(const char * base64, char * bindata)
{
int i, j;
unsigned char k;
unsigned char temp[4];
for (i = 0, j = 0; base64[i] != '\0'; i += 4)
{
memset(temp, 0xFF, sizeof(temp));
for (k = 0; k < 64; k++)
{
if (base64char[k] == base64[i])
temp[0] = k;
}
for (k = 0; k < 64; k++)
{
if (base64char[k] == base64[i + 1])
temp[1] = k;
}
for (k = 0; k < 64; k++)
{
if (base64char[k] == base64[i + 2])
temp[2] = k;
}
for (k = 0; k < 64; k++)
{
if (base64char[k] == base64[i + 3])
temp[3] = k;
}
bindata[j++] = ((unsigned char)(((unsigned char)(temp[0] << 2)) & 0xFC)) |
((unsigned char)((unsigned char)(temp[1] >> 4) & 0x03));
if (base64[i + 2] == '=')
break;
bindata[j++] = ((unsigned char)(((unsigned char)(temp[1] << 4)) & 0xF0)) |
((unsigned char)((unsigned char)(temp[2] >> 2) & 0x0F));
if (base64[i + 3] == '=')
break;
bindata[j++] = ((unsigned char)(((unsigned char)(temp[2] << 6)) & 0xF0)) |
((unsigned char)(temp[3] & 0x3F));
}
return j;
}
#if SF_HW_TEST == ENABLE #if SF_HW_TEST == ENABLE
UINT32 testadj = 0; UINT32 testadj = 0;
UINT32 testiso = 0; UINT32 testiso = 0;