Commit Graph

107 Commits

Author SHA1 Message Date
Andrew Tridgell 37f71bc6d6 AP_Mission: support DO_ENGINE_CONTROL 2016-07-25 10:06:03 +10:00
Grant Morphett 4e8666cee9 AP_Mission: Adding new MAV_CMD_DO_SET_REVERSE for Rovers.
Rover now supports reverse via this MAV_CMD.
2016-07-17 08:15:33 +10:00
Tom Pittenger 41c9cace68 AP_Mission: mavlink parsing should use check_lat/lng functions 2016-06-06 13:08:37 -07:00
Michael du Breuil fb07b8c4cc Mission: fix bounds checking of MISSION_ITEM lat/lon 2016-06-06 10:08:45 -07:00
Randy Mackay 54731a139f AP_Mission: rename starts_with_takeoff_cmd 2016-05-19 19:43:22 +09:00
Niti Rohilla 9ec0000691 AP_Mission: add check_takeoff_cmd
This checks that the first command in the mission is a takeoff command which helps avoid mission setup errors in which users forget to start a mission with a takeoff command
2016-05-19 19:43:17 +09:00
Niti Rohilla d771017c25 AP_Mission: support MAV_CMD_NAV_DELAY command 2016-05-19 16:16:02 +09:00
Tom Pittenger 9073ac91ff AP_Mission: 2of3 add loiter_xtrack option flag for post-loiter navigation via param4
0 to crosstrack from center of waypoint, 1 to crosstrack from tangent exit location
2016-05-16 11:50:54 -07:00
Tom Pittenger f1186b8b5c AP_Mission: store previous nav cmd id 2016-05-13 17:22:03 -07:00
Ricardo de Almeida Gonzaga dfe38b61de AP_Mission: Fix typos 2016-05-13 19:20:06 -03:00
Michael Day 62a7074dd7 AP_Mission: Added mavlink_cmd_long_to_mission_cmd method. 2016-05-06 11:59:44 -07:00
Michael Oborne fb3fc118f1 AP_Mission: support MAVLINK_MSG_ID_MISSION_ITEM_INT 2016-05-01 07:13:23 +10:00
Michael du Breuil fff21a1db9 Mission: Remove support for CONDITION_CHANGE_ALT 2016-04-30 10:56:09 +09:00
Michael du Breuil 831ae72908 AP_Mission: Remove DO_SET_PARAMETER 2016-04-25 09:59:59 +09:00
Andrew Tridgell 3a5e4c80ca AP_Mission: support DO_VTOL_TRANSITION command
first 16 bit command ID
2016-04-23 21:03:46 +10:00
Andrew Tridgell 09c3c36c00 AP_Mission: allow for 16 bit command IDs
this uses command ID 0 to allow for 16 bit command IDs. When used it
limits the content to just 10 bytes.
2016-04-23 21:03:45 +10:00
Tom Pittenger 1c513a99a0 AP_Mission: removed LOITER_TO_ALT heading requirement param field
- and increased loiter radius max size (8bit to 16bit), it will soon always have heading requirement along with all loiter cmds
2016-03-02 08:48:24 -08:00
Tom Pittenger 068374658c AP_Mission: utilize radius for loiter commands 2016-02-29 06:43:19 -08:00
Andrew Tridgell ad59cb9f5c AP_Mission: support VTOL_TAKEOFF and VTOL_LAND 2016-01-09 07:38:53 +11:00
DonLakeFlyer 7cd3d8bfdc AP_Mission: better mission errors 2015-12-21 16:02:23 +11:00
Caio Marcelo de Oliveira Filho f20a4e413c AP_Mission: use millis/micros/panic functions 2015-11-20 12:32:03 +09:00
Lucas De Marchi 831d8acca5 Remove use of PROGMEM
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:

    git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
    git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'

The 2 commands were done so we don't leave behind spurious spaces.

AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Lucas De Marchi 2c38e31c93 Remove use of PSTR
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.

This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.

AVR-specific places were not changed.
2015-10-30 14:35:04 +09:00
Randy Mackay 756d564b7c Mission: sanity check command altitudes 2015-10-19 16:15:08 +09:00
Tom Pittenger cb20325593 AP_Mission: added flight stage FLIGHT_LAND_ABORT
- add get_prev_nav_cmd_with_wp_index(). This is different than get_prev_nav_cmd_index() in that it only stores the index if there is a valid lat/lng (+1 squashed commits)
- added mission item command to NAV_LAND which is the abort takeoff altitude. If 0 then use last takeoff if available, else use 50m
2015-09-09 09:04:24 +10:00
Tom Pittenger 1026e7df45 AP_Mission: updated comment
altitude and lat/lng are all used
2015-09-08 17:05:54 +10:00
Tom Pittenger 15b242832e AP_Mission: lat/lng == 0 bug fix
was using wrong logic to check for lat/lng == 0
2015-08-29 21:17:35 +10:00
Tom Pittenger 41508457e1 AP_Mission: add get_prev_nav_cmd_with_wp_index()
This is different than get_prev_nav_cmd_index() in that it only stores the index if there is a valid lat/lng
2015-08-29 21:17:35 +10:00
Randy Mackay 1271e531e2 Mission: sanity check location 2015-08-27 15:15:56 +09:00
Michael Day a5e1d8e902 AP_Mission: Give CONINTUE_AND_CHANGE_ALT a parameter: climb/descend
Param 1 denotes which direction the user expects the plane to
travel when changing altitude:

0 = no expectation, command completes when within 5 m of altitude.
1 = climb expected, command completes at or above altitude.
2 = descent expected, command completes at or below altitude.
2015-08-20 11:37:17 +10:00
Gustavo Jose de Sousa 34d1a29ec1 AP_Mission: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:19 +10:00
Randy Mackay 766ccea3be Mission: fix bug causing first do-cmd to be run many times
The symptom was that if the very first command in the mission was a
do-command, it would be run after every nav-command that didn't have
another do-command before it.
2015-07-17 12:15:08 +09:00
Randy Mackay 429346f4bc AP_Mission: add missing breaks to case statement 2015-07-17 12:15:06 +09:00
Tom Pittenger e6122d1a4e AP_Mission: ensure cache coherence on mission resume
- when resuming a mission we should read the value from storage of the same index to ensure we're not continuing an old cached version of the mission item.
- inherent problem: DO commands will continue and will be unaffected unless the new mission has a different DO_ command structure. If so, a set_current_cmd() or reset() should be issued by the GCS.
2015-06-25 10:21:06 +10:00
Andrew Tridgell 9bd8e215b2 AP_Mission: enable DO_AUTOTUNE_ENABLE 2015-06-15 09:20:54 +10:00
Andrew Tridgell 08acde2766 AP_Mission: added ALTITUDE_WAIT NAV command
used for HAB launch
2015-06-15 09:20:54 +10:00
Randy Mackay 9c28d61a5c Mission: protect against endless loops of do-commands 2015-06-01 18:11:54 +09:00
Tom Pittenger 79605de8f5 AP_Mission: replace fabs() with fabsf() 2015-05-09 09:57:27 +10:00
Michael Day 3d3267d472 AP_Mission: Now support mission item MAV_CMD_NAV_LOITER_TO_ALT 2015-04-25 09:12:16 +10:00
Randy Mackay 87e6452ee9 Mission: bug fix when jump target is zero
This would result in copter flying to a waypoint high above home
2015-04-21 20:42:49 +09:00
Randy Mackay 888c2289ce Mission: support do-digicam-control parameters 2015-04-20 13:50:01 +09:00
Randy Mackay f6021010c5 Mission: support do-mount-control 2015-03-21 21:52:19 +09:00
Andrew Tridgell 3d433d2106 AP_Mission: loop check is only needed in one place 2015-01-23 13:48:45 +11:00
Andrew Tridgell 540cadc086 AP_Mission: prevent infinite loop with linked jump commands
this prevents a "jump loop" from causing a firmware lockup. Thanks to
dellarb for reporting this!
2015-01-23 13:14:27 +11:00
Andrew Tridgell ede920f293 AP_Mission: ensure location options are zero at start of mavlink conversion 2014-12-03 18:29:43 +11:00
Michael Day b3e693daa4 AP_Mission: Support MAV_CMD_DO_FENCE_ENABLE as a mission item. 2014-11-25 13:02:47 +11:00
Michael Day b36c1b2c3d AP_Mission: support for MAV_CMD_CONTINUE_AND_CHANGE_ALT 2014-11-25 10:43:15 +11:00
Michael Day 83c2f497a3 AP_Mission: Change jump_to_landing_sequence to get_landing_sequence_start 2014-10-24 21:42:06 +11:00
Andrew Tridgell 15a661e17a AP_Mission: fixed logic in jump_to_landing_sequence()
see comments on drones-discuss
2014-10-20 08:36:20 +11:00
Andrew Tridgell 8c6b875dcc AP_Mission: avoid the AP_AHRS cast
get_position() is now const
2014-10-20 08:36:20 +11:00