From 5bcb37d27e60dde4c604fbcdc9fdaeec6d4db309 Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Sat, 18 Jul 2020 14:35:28 -0700 Subject: [PATCH] Cleanup/fix command json hierarchy --- .../APM/APM-MavCmdInfoCommon.json | 30 ------ .../APM/APM-MavCmdInfoFixedWing.json | 22 ----- .../APM/APM-MavCmdInfoMultiRotor.json | 22 +---- .../PX4/PX4-MavCmdInfoCommon.json | 11 +-- .../PX4/PX4-MavCmdInfoFixedWing.json | 6 +- .../PX4/PX4-MavCmdInfoMultiRotor.json | 24 ----- src/MissionManager/MavCmdInfoCommon.json | 91 +++++++++++++------ src/MissionManager/MavCmdInfoFixedWing.json | 22 ----- src/MissionManager/MavCmdInfoMultiRotor.json | 26 +++++- 9 files changed, 94 insertions(+), 160 deletions(-) diff --git a/src/FirmwarePlugin/APM/APM-MavCmdInfoCommon.json b/src/FirmwarePlugin/APM/APM-MavCmdInfoCommon.json index aee59c1ad..b106da049 100644 --- a/src/FirmwarePlugin/APM/APM-MavCmdInfoCommon.json +++ b/src/FirmwarePlugin/APM/APM-MavCmdInfoCommon.json @@ -9,36 +9,6 @@ "comment": "MAV_CMD_NAV_WAYPOINT", "paramRemove": "2" }, - { - "id": 17, - "comment": "MAV_CMD_NAV_LOITER_UNLIM", - "param4": { - "label": "Heading", - "units": "radians", - "default": 0, - "decimalPlaces": 2 - } - }, - { - "id": 18, - "comment": "MAV_CMD_NAV_LOITER_TURNS", - "param4": { - "label": "Heading", - "units": "radians", - "default": 0, - "decimalPlaces": 2 - } - }, - { - "id": 19, - "comment": "MAV_CMD_NAV_LOITER_TIME", - "param4": { - "label": "Heading", - "units": "radians", - "default": 0, - "decimalPlaces": 2 - } - }, { "id": 22, "comment": "MAV_CMD_NAV_TAKEOFF", diff --git a/src/FirmwarePlugin/APM/APM-MavCmdInfoFixedWing.json b/src/FirmwarePlugin/APM/APM-MavCmdInfoFixedWing.json index d647b6654..e58ec8133 100644 --- a/src/FirmwarePlugin/APM/APM-MavCmdInfoFixedWing.json +++ b/src/FirmwarePlugin/APM/APM-MavCmdInfoFixedWing.json @@ -9,28 +9,6 @@ "comment": "MAV_CMD_NAV_WAYPOINT", "paramRemove": "1,3,4" }, - { - "id": 18, - "comment": "MAV_CMD_NAV_LOITER_TURNS", - "param4": { - "label": "Exit loiter from", - "enumStrings": "Center,Tangent", - "enumValues": "0,1", - "default": 1, - "decimalPlaces": 0 - } - }, - { - "id": 19, - "comment": "MAV_CMD_NAV_LOITER_TIME", - "param4": { - "label": "Exit loiter from", - "enumStrings": "Center,Tangent", - "enumValues": "0,1", - "default": 1, - "decimalPlaces": 0 - } - }, { "id": 21, "comment": "MAV_CMD_NAV_LAND", diff --git a/src/FirmwarePlugin/APM/APM-MavCmdInfoMultiRotor.json b/src/FirmwarePlugin/APM/APM-MavCmdInfoMultiRotor.json index 2170b7038..4dbac31a4 100644 --- a/src/FirmwarePlugin/APM/APM-MavCmdInfoMultiRotor.json +++ b/src/FirmwarePlugin/APM/APM-MavCmdInfoMultiRotor.json @@ -7,22 +7,7 @@ { "id": 16, "comment": "MAV_CMD_NAV_WAYPOINT", - "paramRemove": "2,3,4" - }, - { - "id": 17, - "comment": "MAV_CMD_NAV_LOITER_UNLIM", - "paramRemove": "3" - }, - { - "id": 18, - "comment": "MAV_CMD_NAV_LOITER_TURNS", - "paramRemove": "4" - }, - { - "id": 19, - "comment": "MAV_CMD_NAV_LOITER_TIME", - "paramRemove": "4" + "paramRemove": "3,4" }, { "id": 21, @@ -33,11 +18,6 @@ "id": 22, "comment": "MAV_CMD_NAV_TAKEOFF", "paramRemove": "1,2,3,4" - }, - { - "id": 31, - "comment": "MAV_CMD_NAV_LOITER_TO_ALT", - "paramRemove": "4" } ] } diff --git a/src/FirmwarePlugin/PX4/PX4-MavCmdInfoCommon.json b/src/FirmwarePlugin/PX4/PX4-MavCmdInfoCommon.json index 3182be6fb..85c015aa0 100644 --- a/src/FirmwarePlugin/PX4/PX4-MavCmdInfoCommon.json +++ b/src/FirmwarePlugin/PX4/PX4-MavCmdInfoCommon.json @@ -1,7 +1,7 @@ { - "comment": "PX4 Pro, Any Vehicle", - "version": 1, - "fileType": "MavCmdInfo", + "comment": "PX4 Pro, Any Vehicle", + "version": 1, + "fileType": "MavCmdInfo", "mavCmdInfo": [ { @@ -14,11 +14,6 @@ "comment": "MAV_CMD_NAV_LAND", "paramRemove": "1" }, - { - "id": 201, - "comment": "MAV_CMD_DO_SET_ROI", - "paramRemove": "1,2,3" - }, { "id": 2500, "comment": "MAV_CMD_VIDEO_START_CAPTURE", diff --git a/src/FirmwarePlugin/PX4/PX4-MavCmdInfoFixedWing.json b/src/FirmwarePlugin/PX4/PX4-MavCmdInfoFixedWing.json index 836056d92..d3f6acc97 100644 --- a/src/FirmwarePlugin/PX4/PX4-MavCmdInfoFixedWing.json +++ b/src/FirmwarePlugin/PX4/PX4-MavCmdInfoFixedWing.json @@ -1,7 +1,7 @@ { - "comment": "PX4 Pro, Fixed Wing", - "version": 1, - "fileType": "MavCmdInfo", + "comment": "PX4 Pro, Fixed Wing", + "version": 1, + "fileType": "MavCmdInfo", "mavCmdInfo": [ ] diff --git a/src/FirmwarePlugin/PX4/PX4-MavCmdInfoMultiRotor.json b/src/FirmwarePlugin/PX4/PX4-MavCmdInfoMultiRotor.json index cc37c64f9..3d595e8d4 100644 --- a/src/FirmwarePlugin/PX4/PX4-MavCmdInfoMultiRotor.json +++ b/src/FirmwarePlugin/PX4/PX4-MavCmdInfoMultiRotor.json @@ -4,29 +4,5 @@ "fileType": "MavCmdInfo", "mavCmdInfo": [ - { - "id": 17, - "comment": "MAV_CMD_NAV_LOITER_UNLIM", - "description": "Travel to a position and Loiter indefinitely.", - "paramRemove": "3" - }, - { - "id": 18, - "comment": "MAV_CMD_NAV_LOITER_TURNS", - "description": "Travel to a position and Loiter for a number of turns.", - "paramRemove": "3" - }, - { - "id": 19, - "comment": "MAV_CMD_NAV_LOITER_TIME", - "description": "Travel to a position and Loiter for an amount of time.", - "paramRemove": "3" - }, - { - "id": 22, - "comment": "MAV_CMD_NAV_TAKEOFF", - "paramRemove": "1", - "description": "Hover straight up to specified altitude. Then travel to specified position." - } ] } diff --git a/src/MissionManager/MavCmdInfoCommon.json b/src/MissionManager/MavCmdInfoCommon.json index 8cee9f19b..4db5411bb 100644 --- a/src/MissionManager/MavCmdInfoCommon.json +++ b/src/MissionManager/MavCmdInfoCommon.json @@ -41,11 +41,11 @@ "param2": { "label": "Acceptance", "units": "m", - "default": 3, + "default": 0, "decimalPlaces": 2 }, "param3": { - "label": "PassThru", + "label": "Pass Radius", "units": "m", "default": 0, "decimalPlaces": 2 @@ -62,7 +62,7 @@ "id": 17, "rawName": "MAV_CMD_NAV_LOITER_UNLIM", "friendlyName": "Loiter", - "description": "Travel to a position and Loiter around the specified radius indefinitely.", + "description": "Travel to a position and Loiter around the specified position indefinitely.", "specifiesCoordinate": true, "friendlyEdit": true, "category": "Loiter", @@ -84,7 +84,7 @@ "id": 18, "rawName": "MAV_CMD_NAV_LOITER_TURNS", "friendlyName": "Loiter (turns)", - "description": "Travel to a position and Loiter around the specified radius for a number of turns.", + "description": "Travel to a position and Loiter around the specified position for a number of turns.", "specifiesCoordinate": true, "friendlyEdit": true, "category": "Loiter", @@ -93,6 +93,13 @@ "default": 1, "decimalPlaces": 0 }, + "param2": { + "label": "Leave Loiter", + "enumStrings": "Direction of next waypoint,Any direction", + "enumValues": "1,0", + "default": 1, + "decimalPlaces": 0 + }, "param3": { "label": "Radius", "units": "m", @@ -100,27 +107,34 @@ "decimalPlaces": 2 }, "param4": { - "label": "Yaw", - "units": "deg", - "nanUnchanged": true, - "default": null, - "decimalPlaces": 2 + "label": "Exit loiter from", + "enumStrings": "Center,Tangent", + "enumValues": "0,1", + "default": 1, + "decimalPlaces": 0 } }, { "id": 19, "rawName": "MAV_CMD_NAV_LOITER_TIME", "friendlyName": "Loiter (time)", - "description": "Travel to a position and Loiter around the specified radius for an amount of time.", + "description": "Travel to a position and Loiter around the specified position for an amount of time.", "specifiesCoordinate": true, "friendlyEdit": true, "category": "Loiter", "param1": { - "label": "Hold", + "label": "Loiter Time", "units": "secs", "default": 30, "decimalPlaces": 0 }, + "param2": { + "label": "Leave Loiter", + "enumStrings": "Direction of next waypoint,Current direction", + "enumValues": "1,0", + "default": 1, + "decimalPlaces": 0 + }, "param3": { "label": "Radius", "units": "m", @@ -128,11 +142,11 @@ "decimalPlaces": 2 }, "param4": { - "label": "Yaw", - "units": "deg", - "nanUnchanged": true, - "default": null, - "decimalPlaces": 2 + "label": "Exit loiter from", + "enumStrings": "Center,Tangent", + "enumValues": "0,1", + "default": 1, + "decimalPlaces": 0 } }, { @@ -158,6 +172,14 @@ "default": 0, "decimalPlaces": 2 }, + "param2": { + "label": "Precision Land", + "units": "m", + "enumStrings": "Disabled,Opportunistic,Required", + "enumValues": "0,1,2", + "default": 0, + "decimalPlaces": 2 + }, "param4": { "label": "Yaw", "units": "deg", @@ -218,10 +240,10 @@ "friendlyEdit": true, "category": "Loiter", "param1": { - "label": "Heading wait", - "enumStrings": "False,True", - "enumValues": "0,1", - "default": 0, + "label": "Leave Loiter", + "enumStrings": "Direction of next waypoint,Any direction", + "enumValues": "1,0", + "default": 1, "decimalPlaces": 0 }, "param2": { @@ -294,6 +316,14 @@ "isTakeoffCommand": true, "friendlyEdit": true, "category": "Basic", + "param2": { + "label": "Transition Heading", + "units": "m", + "enumStrings": "Default,Next waypoint,Takeoff,Specified,Any", + "enumValues": "0,1,2,3,4", + "default": 0, + "decimalPlaces": 0 + }, "param4": { "label": "Yaw", "units": "deg", @@ -311,6 +341,13 @@ "isLandCommand": true, "friendlyEdit": true, "category": "Basic", + "param3": { + "label": "Approach Alt", + "units": "m", + "nanUnchanged": true, + "default": null, + "decimalPlaces": 2 + }, "param4": { "label": "Yaw", "units": "deg", @@ -326,7 +363,7 @@ "description": "Enable/Disabled guided mode.", "param1": { "label": "Enable", - "enumStrings": "Disable,Enable", + "enumStrings": "On,Off", "enumValues": "0,1", "default": 1, "decimalPlaces": 0 @@ -367,14 +404,14 @@ "friendlyEdit": true, "category": "Basic", "param1": { - "label": "Hold", + "label": "Delay", "units": "secs", "default": 30, "decimalPlaces": 0 } }, { - "id": 113, + "id": 113, "rawName": "MAV_CMD_CONDITION_CHANGE_ALT", "description": "Delay the mission until the specified altitide is reached.", "friendlyName": "Wait for altitude", @@ -405,10 +442,10 @@ "id": 115, "rawName": "MAV_CMD_CONDITION_YAW", "friendlyName": "Wait for Yaw", - "description": "Delay the mission until the specified yaw is reached.", + "description": "Delay the mission until the specified heading is reached.", "category": "Conditionals", "param1": { - "label": "Yaw", + "label": "Heading", "units": "deg", "default": 0, "decimalPlaces": 1 @@ -1071,7 +1108,7 @@ }, { "id": 2800, "rawName": "MAV_CMD_PANORAMA_CREATE", "friendlyName": "Create panorama" }, { - "id": 3000, + "id": 3000, "rawName": "MAV_CMD_DO_VTOL_TRANSITION", "friendlyName": "VTOL Transition", "description": "Perform flight mode transition.", @@ -1079,7 +1116,7 @@ "param1": { "label": "Mode", "default": 3, - "enumStrings": "Hover Mode,Plane Mode", + "enumStrings": "Multi Rotor,Fixed Wing", "enumValues": "3,4" } }, diff --git a/src/MissionManager/MavCmdInfoFixedWing.json b/src/MissionManager/MavCmdInfoFixedWing.json index 8d0c406d2..a1535265f 100644 --- a/src/MissionManager/MavCmdInfoFixedWing.json +++ b/src/MissionManager/MavCmdInfoFixedWing.json @@ -14,28 +14,6 @@ "comment": "MAV_CMD_NAV_LOITER_UNLIM", "paramRemove": "4" }, - { - "id": 18, - "comment": "MAV_CMD_NAV_LOITER_TURNS", - "param4": { - "label": "Exit loiter from", - "enumStrings": "Center,Tangent", - "enumValues": "0,1", - "default": 1, - "decimalPlaces": 0 - } - }, - { - "id": 19, - "comment": "MAV_CMD_NAV_LOITER_TIME", - "param4": { - "label": "Exit loiter from", - "enumStrings": "Center,Tangent", - "enumValues": "0,1", - "default": 1, - "decimalPlaces": 0 - } - }, { "id": 21, "comment": "MAV_CMD_NAV_LAND", diff --git a/src/MissionManager/MavCmdInfoMultiRotor.json b/src/MissionManager/MavCmdInfoMultiRotor.json index da324399d..b2f360786 100644 --- a/src/MissionManager/MavCmdInfoMultiRotor.json +++ b/src/MissionManager/MavCmdInfoMultiRotor.json @@ -1,8 +1,28 @@ { - "comment": "Any Firmware, Multi Rotor", - "version": 1, - "fileType": "MavCmdInfo", + "comment": "Any Firmware, Multi Rotor", + "version": 1, + "fileType": "MavCmdInfo", "mavCmdInfo": [ + { + "id": 17, + "comment": "MAV_CMD_NAV_LOITER_UNLIM", + "paramRemove": "3" + }, + { + "id": 19, + "comment": "MAV_CMD_NAV_LOITER_TIME", + "paramRemove": "2,3,4" + }, + { + "id": 22, + "comment": "MAV_CMD_NAV_TAKEOFF", + "paramRemove": "1" + }, + { + "id": 31, + "comment": "MAV_CMD_NAV_LOITER_TO_ALT", + "paramRemove": "1,2,4" + } ] } -- 2.22.0