modify:
系统指令 整个挪到最上面 → 高级指令;
This commit is contained in:
@ -113,14 +113,13 @@ static const T_DjiWidgetHandlerListItem s_widgetHandlerList[] = {
|
|||||||
{1, DJI_WIDGET_TYPE_LIST, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
|
{1, DJI_WIDGET_TYPE_LIST, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
|
||||||
{2, DJI_WIDGET_TYPE_SWITCH, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
|
{2, DJI_WIDGET_TYPE_SWITCH, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
|
||||||
{3, DJI_WIDGET_TYPE_SCALE, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
|
{3, DJI_WIDGET_TYPE_SCALE, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
|
||||||
{4, DJI_WIDGET_TYPE_BUTTON, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
|
{4, DJI_WIDGET_TYPE_LIST, PsdkTestWidget_SetWidgetValue_StartRecord, DjiTestWidget_GetWidgetValue, NULL},
|
||||||
{5, DJI_WIDGET_TYPE_SWITCH, PsdkTestWidget_SetWidgetValue_StartRecord, DjiTestWidget_GetWidgetValue, NULL},
|
{5, DJI_WIDGET_TYPE_SWITCH, PsdkTestWidget_SetWidgetValue_StartRecord, DjiTestWidget_GetWidgetValue, NULL},
|
||||||
{6, DJI_WIDGET_TYPE_INT_INPUT_BOX, PsdkTestWidget_SetWidgetValue_StartRecord, DjiTestWidget_GetWidgetValue, NULL},
|
{6, DJI_WIDGET_TYPE_INT_INPUT_BOX, PsdkTestWidget_SetWidgetValue_StartRecord, DjiTestWidget_GetWidgetValue, NULL},
|
||||||
{7, DJI_WIDGET_TYPE_BUTTON, PsdkTestWidget_SetWidgetValue_StartRecord, DjiTestWidget_GetWidgetValue, NULL},
|
{7, DJI_WIDGET_TYPE_BUTTON, PsdkTestWidget_SetWidgetValue_StartRecord, DjiTestWidget_GetWidgetValue, NULL},
|
||||||
{8, DJI_WIDGET_TYPE_INT_INPUT_BOX, PsdkTestWidget_SetWidgetValue_StartRecord, DjiTestWidget_GetWidgetValue, NULL},
|
{8, DJI_WIDGET_TYPE_INT_INPUT_BOX, PsdkTestWidget_SetWidgetValue_StartRecord, DjiTestWidget_GetWidgetValue, NULL},
|
||||||
{9, DJI_WIDGET_TYPE_SWITCH, PsdkTestWidget_SetWidgetValue_StartRecord, DjiTestWidget_GetWidgetValue, NULL},
|
{9, DJI_WIDGET_TYPE_SWITCH, PsdkTestWidget_SetWidgetValue_StartRecord, DjiTestWidget_GetWidgetValue, NULL},
|
||||||
{10, DJI_WIDGET_TYPE_LIST, PsdkTestWidget_SetWidgetValue_StartRecord, DjiTestWidget_GetWidgetValue, NULL},//PsdkTestWidget_SetWidgetValue
|
{10, DJI_WIDGET_TYPE_LIST, PsdkTestWidget_SetWidgetValue_StartRecord, DjiTestWidget_GetWidgetValue, NULL},//PsdkTestWidget_SetWidgetValue
|
||||||
{11, DJI_WIDGET_TYPE_LIST, PsdkTestWidget_SetWidgetValue_StartRecord, DjiTestWidget_GetWidgetValue, NULL},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *s_widgetTypeNameArray[] = {
|
static const char *s_widgetTypeNameArray[] = {
|
||||||
@ -477,14 +476,11 @@ static void *PsdkTest_IrisRecordSystemChanged(void *arg)//
|
|||||||
case 0:
|
case 0:
|
||||||
s_strStateOfSbg="未打开";
|
s_strStateOfSbg="未打开";
|
||||||
|
|
||||||
if (systemON_Control == 0 || systemON_Control == 3 || systemON_Control == 4)
|
|
||||||
{
|
|
||||||
strcpy(s_strUIMessage,"系统已就绪!");
|
strcpy(s_strUIMessage,"系统已就绪!");
|
||||||
messageTimeCounter = 0;
|
messageTimeCounter = 0;
|
||||||
messageTimespan = 1000;
|
messageTimespan = 1000;
|
||||||
|
|
||||||
systemON_Control = 1;//ximeaAirborneSystem系统一启动就会发送此信息 → 代表采集系统就绪;
|
systemON_Control = 1;//ximeaAirborneSystem系统一启动就会发送此信息 → 代表采集系统就绪;
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
@ -682,6 +678,35 @@ static T_DjiReturnCode PsdkTestWidget_SetWidgetValue_StartRecord(E_DjiWidgetType
|
|||||||
|
|
||||||
switch (index)
|
switch (index)
|
||||||
{
|
{
|
||||||
|
case 4:
|
||||||
|
if (value==0)//等待指令
|
||||||
|
{
|
||||||
|
}
|
||||||
|
if (value==1)
|
||||||
|
{
|
||||||
|
system("reboot");
|
||||||
|
}
|
||||||
|
else if (value==2)
|
||||||
|
{
|
||||||
|
system("shutdown now");
|
||||||
|
}
|
||||||
|
else if (value==3)
|
||||||
|
{
|
||||||
|
system("/home/300tc/projects/udpClient/udpClient 127.0.0.1 9,1");
|
||||||
|
}
|
||||||
|
else if (value==4)
|
||||||
|
{
|
||||||
|
system("/home/300tc/projects/udpClient/udpClient 127.0.0.1 9,0");
|
||||||
|
}
|
||||||
|
else if (value==5)
|
||||||
|
{
|
||||||
|
strcpy(s_strUIMessage,"系统正在更新,稍后会自动重启!");
|
||||||
|
messageTimeCounter = 0;
|
||||||
|
messageTimespan = 10000;
|
||||||
|
|
||||||
|
system("/home/pi/tc_ShellScripts/update0.sh &> /media/nvme/300TC/update/log");
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 5://系统启动关闭
|
case 5://系统启动关闭
|
||||||
if (value==0)//系统关闭
|
if (value==0)//系统关闭
|
||||||
{
|
{
|
||||||
@ -893,35 +918,6 @@ static T_DjiReturnCode PsdkTestWidget_SetWidgetValue_StartRecord(E_DjiWidgetType
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
if (value==0)//等待指令
|
|
||||||
{
|
|
||||||
}
|
|
||||||
if (value==1)
|
|
||||||
{
|
|
||||||
system("reboot");
|
|
||||||
}
|
|
||||||
else if (value==2)
|
|
||||||
{
|
|
||||||
system("shutdown now");
|
|
||||||
}
|
|
||||||
else if (value==3)
|
|
||||||
{
|
|
||||||
system("/home/300tc/projects/udpClient/udpClient 127.0.0.1 9,1");
|
|
||||||
}
|
|
||||||
else if (value==4)
|
|
||||||
{
|
|
||||||
system("/home/300tc/projects/udpClient/udpClient 127.0.0.1 9,0");
|
|
||||||
}
|
|
||||||
else if (value==5)
|
|
||||||
{
|
|
||||||
strcpy(s_strUIMessage,"系统正在更新,稍后会自动重启!");
|
|
||||||
messageTimeCounter = 0;
|
|
||||||
messageTimespan = 10000;
|
|
||||||
|
|
||||||
system("/home/pi/tc_ShellScripts/update0.sh &> /media/nvme/300TC/update/log");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 11:
|
|
||||||
if (value==0)//等待指令
|
if (value==0)//等待指令
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -1021,7 +1017,7 @@ static void extractSpectralBinAndBandnumber(bool isModifyBin)
|
|||||||
pclose(fp);
|
pclose(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
s_widgetValueList[11] = spectralBin;
|
s_widgetValueList[10] = spectralBin;
|
||||||
|
|
||||||
if (!isModifyBin)
|
if (!isModifyBin)
|
||||||
{
|
{
|
||||||
|
@ -16,6 +16,31 @@
|
|||||||
},
|
},
|
||||||
"config_interface": {
|
"config_interface": {
|
||||||
"widget_list": [
|
"widget_list": [
|
||||||
|
{
|
||||||
|
"widget_index": 4,
|
||||||
|
"widget_type": "list",
|
||||||
|
"widget_name": "高级指令",
|
||||||
|
"list_item": [
|
||||||
|
{
|
||||||
|
"item_name": "其他"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_name": "重启"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_name": "关机"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_name": "测试采集"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_name": "停止采集"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_name": "更新"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"widget_index": 5,
|
"widget_index": 5,
|
||||||
"widget_type": "switch",
|
"widget_type": "switch",
|
||||||
@ -46,31 +71,6 @@
|
|||||||
{
|
{
|
||||||
"widget_index": 10,
|
"widget_index": 10,
|
||||||
"widget_type": "list",
|
"widget_type": "list",
|
||||||
"widget_name": "系统指令",
|
|
||||||
"list_item": [
|
|
||||||
{
|
|
||||||
"item_name": "其他"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_name": "重启"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_name": "关机"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_name": "测试采集"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_name": "停止采集"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_name": "更新"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"widget_index": 11,
|
|
||||||
"widget_type": "list",
|
|
||||||
"widget_name": "bin",
|
"widget_name": "bin",
|
||||||
"list_item": [
|
"list_item": [
|
||||||
{
|
{
|
||||||
|
@ -16,6 +16,31 @@
|
|||||||
},
|
},
|
||||||
"config_interface": {
|
"config_interface": {
|
||||||
"widget_list": [
|
"widget_list": [
|
||||||
|
{
|
||||||
|
"widget_index": 4,
|
||||||
|
"widget_type": "list",
|
||||||
|
"widget_name": "高级指令",
|
||||||
|
"list_item": [
|
||||||
|
{
|
||||||
|
"item_name": "其他"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_name": "重启"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_name": "关机"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_name": "测试采集"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_name": "停止采集"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_name": "更新"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"widget_index": 5,
|
"widget_index": 5,
|
||||||
"widget_type": "switch",
|
"widget_type": "switch",
|
||||||
@ -46,31 +71,6 @@
|
|||||||
{
|
{
|
||||||
"widget_index": 10,
|
"widget_index": 10,
|
||||||
"widget_type": "list",
|
"widget_type": "list",
|
||||||
"widget_name": "系统指令",
|
|
||||||
"list_item": [
|
|
||||||
{
|
|
||||||
"item_name": "其他"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_name": "重启"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_name": "关机"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_name": "测试采集"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_name": "停止采集"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_name": "更新"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"widget_index": 11,
|
|
||||||
"widget_type": "list",
|
|
||||||
"widget_name": "bin",
|
"widget_name": "bin",
|
||||||
"list_item": [
|
"list_item": [
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user