Return GCS waypoint in the case of waypoint 255 when GCS assist enabled#6086
Return GCS waypoint in the case of waypoint 255 when GCS assist enabled#6086digitalentity merged 8 commits intoiNavFlight:masterfrom
Conversation
For MSP query in the case of waypoint 255, in this commit the ground control station waypoint is returned, which is consistent with its waypoint set behavior. This is also the desired behavior to affirm users that the correct waypoint is loaded. If GCS assist mode is not enabled, the current position is returned to preserve compatibility.
|
This may break existing applications that depend on WP#255 being actual position of the aircraft. An API to get the actual aircraft position should be implemented - this is on my roadmap to allow externally controlled drones (codename "robot mode") |
Indeed there is great potential with robotic applications. For now, what do you think of the introduction of a new special waypoint 254 to confirm the GCS assist waypoint, leaving waypoint 255 as it is for compatibility? |
|
Makes sense. To keep things safe we should also add a build-time check that |
Assert that NAV_MAX_WAYPOINTS is less than 254
It is certainly an appropriate check. Once it is merged I can also edit the Wiki to mention the new special waypoint. |
Move max waypoint STATIC_ASSERT to navigation.c to ensure it is properly triggered
STATIC_ASSERT added and tested. |
Access current target position in any 3D-guided mode for waypoint 254
Waypoint 254 access in any 3D-guided mode
This is a pull request to fix issue #3810.
For MSP query in the case of waypoint 255, if GCS assist mode is not enabled, the current position is returned to preserve compatibility. With GCS assist mode enabled, in this commit the ground control station commanded waypoint is returned, which is consistent with waypoint 255 set behavior. This is also the desired behavior to affirm users that the correct waypoint from GCS is loaded.