1、打印输出如下:
root@NVTEVM:/mnt/app$ get_sysinfo
[Environment]
Sensor : CMOS_OS05A10M
Display : TV_OFF
Emb.Mem : EMBMEM_SPI_NOR
FD FaceScale: N/A (FD_FUNC is off)
Features : PRODUCT(5) DIRECT_MODE(1) NEW_TRIGGER(0) BUF_LEVEL(1)
DISP_WAIT(0) DIS(0) MD_FUNC(1) SMARTROI_FUNC(0) VQA_FUNC(1)
PD_FUNC(0) FD_FUNC(0) AEC_FUNC(1) ANR_FUNC(1) LTR_FUNC(0)
WDR_FUNC(1) HDR_FUNC(0) FTG_FUNC(0) 3DNR_FUNC(1) TMNR_FUNC(1)
DDR-0 on uitron: addr(0x4489c780) size(0x03763880) free(0x0058a3c0) max_free_block(0x0058a380)
Dram Partition: Address Size
Linux - 0x00900000 0x03400000
uItron - 0x04400000 0x03c00000
DSP - 0x00101000 0x007ff000
Max. buffer time : video:4000(ms), audio in:1000(ms), audio out:1000(ms)
uItron Build Date: Oct 11 2018,14:13:18
gmlib Build Date: Sep 28 2018,20:56:19
[Video Input] (IME/FrontEnd) Max. Buf
vch - Width Height Framerate Bitrate - Sensor IME MD Compress Cnt TMNR - Feature
----------------------------------------------------------------------------------
0 - 2560 1920 25/25 9600 - 0 0 off 0 1 ON - Encode Only
2 - 1920 1080 25/25 4096 - 0 2 on 0 3 ON - Encode Only
3 - 640 480 25/25 512 - 0 2 on 0 3 ON - Encode Only
4 - 640 480 25/25 512 - 0 1 off 0 3 ON - Encode Only
脚本查找:
3、https://blog.csdn.net/yifanSJ/article/details/78354365
${file#*/}:删掉第一个 / 及其左边的字符串:dir1/dir2/dir3/my.file.txt
${file##*/}:删掉最后一个 / 及其左边的字符串:my.file.txt
${file#*.}:删掉第一个 . 及其左边的字符串:file.txt
${file##*.}:删掉最后一个 . 及其左边的字符串:txt
SENSOR=$(get_sysinfo |grep -m 1 Sensor)
SENSOR=${SENSOR##* }
if [ "${SENSOR}" == "CMOS_SC5035M" ];then
nvtipcd \/lib/modules/4.1.0/extra/misc/nvt_isp/nvt_isp510.ko cfg_path=/usr/isp510_sc5035_day.cfg fps=0 &
elif [ "${SENSOR}" == "CMOS_OV4689M" ];then
nvtipcd \/lib/modules/4.1.0/extra/misc/nvt_isp/nvt_isp510.ko cfg_path=/usr/isp510_ov4689_day.cfg fps=0 &
elif [ "${SENSOR}" == "CMOS_OS05A10M" ];then
nvtipcd \/lib/modules/4.1.0/extra/misc/nvt_isp/nvt_isp510.ko cfg_path=/usr/isp510_os05a10_day.cfg fps=0 &
else
nvtipcd \/lib/modules/4.1.0/extra/misc/nvt_isp/nvt_isp510.ko cfg_path=/usr/isp510_ov4689_day.cfg fps=0 &
4、使用代码
int cur_sensor_type()
{
system("get_sysinfo | grep [Environment] | grep \"Sensor :\" > /mnt/tmp/sensor_type");
FILE* pfile = fopen("/mnt/tmp/sensor_type", "r");
if(NULL == pfile)
{
printf("open isp510/info failed.\n");
return -1;
}
char sensor_type[128];
while(NULL != fgets(sensor_type, sizeof(sensor_type), pfile))
{
if(NULL != strstr(sensor_type,"CMOS_OV4689M"))
{
fclose(pfile);
return SENSOR_TYPE_OV4689;
}
else if(NULL != strstr(sensor_type,"CMOS_SC5035M"))
{
fclose(pfile);
return SENSOR_TYPE_SC5035;
}
else if(NULL != strstr(sensor_type,"CMOS_SC5236M"))
{