1. 禁止第二次启动系统,避免相机报错;

2. 添加界面上的测试采集功能;
This commit is contained in:
tangchao0503
2023-06-11 18:22:00 +08:00
parent f21576ea81
commit a8838b8949
3 changed files with 42 additions and 9 deletions

View File

@ -549,6 +549,7 @@ static T_PsdkReturnCode PsdkTestWidget_GetWidgetValue(E_PsdkWidgetType widgetTyp
} }
int frameRateGlobel = 0; int frameRateGlobel = 0;
int systemON_Control = 0;
static T_PsdkReturnCode PsdkTestWidget_SetWidgetValue_StartRecord(E_PsdkWidgetType widgetType, uint32_t index, int32_t value, static T_PsdkReturnCode PsdkTestWidget_SetWidgetValue_StartRecord(E_PsdkWidgetType widgetType, uint32_t index, int32_t value,
void *userData) void *userData)
{ {
@ -567,6 +568,16 @@ static T_PsdkReturnCode PsdkTestWidget_SetWidgetValue_StartRecord(E_PsdkWidgetTy
sendto(s_sockfd, command,strlen(command),0,(struct sockaddr *)&s_server,sizeof(s_server)); sendto(s_sockfd, command,strlen(command),0,(struct sockaddr *)&s_server,sizeof(s_server));
} }
else if (value==1)//系统启动 else if (value==1)//系统启动
{
systemON_Control++;
if (systemON_Control>=2)
{
strcpy(s_strUIMessage,"请重启300TC");
messageTimeCounter = 0;
messageTimespan = 1000;
}
else
{ {
strcpy(s_strUIMessage,"系统启动中超过60s未成功请重新启动系统"); strcpy(s_strUIMessage,"系统启动中超过60s未成功请重新启动系统");
messageTimeCounter = 0; messageTimeCounter = 0;
@ -575,6 +586,7 @@ static T_PsdkReturnCode PsdkTestWidget_SetWidgetValue_StartRecord(E_PsdkWidgetTy
char* command = "1"; char* command = "1";
sendto(s_sockfd, command,strlen(command),0,(struct sockaddr *)&s_server,sizeof(s_server)); sendto(s_sockfd, command,strlen(command),0,(struct sockaddr *)&s_server,sizeof(s_server));
} }
}
break; break;
case 6://设置帧率 case 6://设置帧率
{ {
@ -754,8 +766,9 @@ static T_PsdkReturnCode PsdkTestWidget_SetWidgetValue_StartRecord(E_PsdkWidgetTy
if (value==0)//等待指令 if (value==0)//等待指令
{ {
} }
if (value==1) if (value==1)//更新
{ {
system("/home/pi/tc_ShellScripts/update.sh &> /media/nvme/300TC/update/log");
} }
else if (value==2)//重启电脑 else if (value==2)//重启电脑
{ {
@ -765,6 +778,14 @@ static T_PsdkReturnCode PsdkTestWidget_SetWidgetValue_StartRecord(E_PsdkWidgetTy
{ {
system("shutdown now"); system("shutdown now");
} }
else if (value==4)
{
system("/home/300tc/projects_source/udpClient/cmake-build-debug/udpClient 127.0.0.1 9,1");
}
else if (value==5)
{
system("/home/300tc/projects_source/udpClient/cmake-build-debug/udpClient 127.0.0.1 9,0");
}
break; break;
default: default:
break; break;

View File

@ -110,13 +110,19 @@
"item_name": "等待指令" "item_name": "等待指令"
}, },
{ {
"item_name": "采集HSI" "item_name": "更新"
}, },
{ {
"item_name": "重启300TC" "item_name": "重启电脑"
}, },
{ {
"item_name": "关机" "item_name": "关机"
},
{
"item_name": "测试采集"
},
{
"item_name": "停止采集"
} }
] ]
} }

View File

@ -110,13 +110,19 @@
"item_name": "等待指令" "item_name": "等待指令"
}, },
{ {
"item_name": "采集HSI" "item_name": "更新"
}, },
{ {
"item_name": "重启电脑" "item_name": "重启电脑"
}, },
{ {
"item_name": "关机" "item_name": "关机"
},
{
"item_name": "测试采集"
},
{
"item_name": "停止采集"
} }
] ]
} }