From 5e49ead0d6b5980d90fbf5fad13423c689114b63 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Fri, 5 Apr 2019 10:03:58 -0700 Subject: [PATCH] Hack around ArduPilot problems with unsupported NaN in Loiter commands --- src/FirmwarePlugin/PX4/MavCmdInfoCommon.json | 33 ++++++++++++++++++++ src/MissionManager/MavCmdInfoCommon.json | 8 ++--- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/src/FirmwarePlugin/PX4/MavCmdInfoCommon.json b/src/FirmwarePlugin/PX4/MavCmdInfoCommon.json index 865726189..e8f236bbd 100644 --- a/src/FirmwarePlugin/PX4/MavCmdInfoCommon.json +++ b/src/FirmwarePlugin/PX4/MavCmdInfoCommon.json @@ -9,6 +9,39 @@ "comment": "MAV_CMD_NAV_WAYPOINT", "paramRemove": "2,3" }, + { + "id": 17, + "comment": "MAV_CMD_NAV_LOITER_UNLIM", + "param4": { + "label": "Heading", + "units": "radians", + "nanUnchanged": true, + "default": null, + "decimalPlaces": 2 + } + }, + { + "id": 18, + "comment": "MAV_CMD_NAV_LOITER_TURNS", + "param4": { + "label": "Heading", + "units": "radians", + "nanUnchanged": true, + "default": null, + "decimalPlaces": 2 + } + }, + { + "id": 19, + "comment": "MAV_CMD_NAV_LOITER_TIME", + "param4": { + "label": "Heading", + "units": "radians", + "nanUnchanged": true, + "default": null, + "decimalPlaces": 2 + } + }, { "id": 21, "comment": "MAV_CMD_NAV_LAND", diff --git a/src/MissionManager/MavCmdInfoCommon.json b/src/MissionManager/MavCmdInfoCommon.json index a6ce14e3b..93cf03214 100644 --- a/src/MissionManager/MavCmdInfoCommon.json +++ b/src/MissionManager/MavCmdInfoCommon.json @@ -75,8 +75,7 @@ "param4": { "label": "Heading", "units": "radians", - "nanUnchanged": true, - "default": null, + "default": 0, "decimalPlaces": 2 } }, @@ -102,8 +101,7 @@ "param4": { "label": "Heading", "units": "radians", - "nanUnchanged": true, - "default": null, + "default": 0, "decimalPlaces": 2 } }, @@ -130,7 +128,7 @@ "param4": { "label": "Heading", "units": "radians", - "nanUnchanged": true, + "default": 0, "decimalPlaces": 2 } }, -- 2.22.0