Commit Graph

143 Commits

Author SHA1 Message Date
Peter Hall 46714d69a5 AP_Mission: add get id functions for scripting 2020-02-27 18:07:31 -07:00
Gone4Dirt d813a70c8d AP_Mission: Added force resume for when MIS_RESTART=1 2020-02-25 10:05:12 +11:00
Gone4Dirt 44718cd00f AP_Mission: Check if failsafes should interupt landing approach 2020-02-18 21:03:29 +11:00
Andrew Tridgell 5ae6ad2a59 AP_Mission: make all semaphores recursive
the cost is very similar and this prevents an easy coding error which
can occur on less used code paths
2020-01-19 20:19:30 +11:00
Peter Barker 405bf0ce7f AP_Mission: adjust for new vehicle base class 2019-10-08 11:26:04 +11:00
Peter Barker a7c5f5a6c8 AP_Mission: break out a convert_MISSION_ITEM_to_MISSION_ITEM_INT method
AP_Mission: remove unused mission_cmd_to_mavlink

AP_Mission: eliminate mavlink_to_mission_cmd (use mavlink_int_to_mission_cmd)
2019-05-22 08:53:45 +10:00
Peter Barker 9cd881b56c AP_Mission: move responsibility for parachute deployment up 2019-02-13 09:25:27 +09:00
Peter Barker 402be4eaca AP_Mission: const writing of commands to storage 2019-01-30 19:20:27 +09:00
Peter Barker b12dc3cde7 AP_Mission: adjust for Location_Class and Location unification 2019-01-16 11:45:29 +11:00
Peter Barker 1b2ac38691 AP_Mission: adjust for Location no longer being packed 2019-01-16 11:45:29 +11:00
Michael du Breuil fccf23dff2 AP_Mission: Add a helper to check if a mission contains an item 2019-01-08 10:39:50 +11:00
Michael du Breuil 670eaf8782 AP_Mission: Accept and store landing aborts in the mission 2018-12-15 09:03:25 +11:00
Peter Barker a9b94ae13d AP_Mission: use ahrs singleton 2018-11-08 10:01:16 +09:00
Peter Barker b1b5a7868d AP_Mission: handle common camera commands 2018-10-30 15:37:18 +11:00
Peter Barker 51d4b2da34 AP_Mission: move servorelayevents handling into AP_Mission 2018-10-30 15:37:18 +11:00
Peter Barker 182d3634aa AP_Mission: handle gripper mission items 2018-10-30 15:37:18 +11:00
Peter Barker 8ebec6a237 AP_Mission: create start_command and verify_command wrappers 2018-10-30 15:37:18 +11:00
Peter Barker 71bff63bff AP_Mission: remove erroneous comment about clear() 2018-09-04 10:32:26 +10:00
Peter Barker 16b49399db AP_Mission: add singleton 2018-09-04 10:32:26 +10:00
Michael du Breuil e878558d41 AP_Mission: Reduce the number of places _set_cmd is called from 2018-08-28 10:01:36 +10:00
Andrew Tridgell 0289ad03df AP_Mission: added semaphore for thread access 2018-08-25 15:44:36 +10:00
Michael du Breuil d5a4c6b5bc AP_Mission: Sanity check for NaN's and infinities 2018-04-26 14:48:14 -07:00
Andrew Tridgell a3e07f66a1 AP_Mission: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Peter Barker 30355fa6d8 AP_Mission: provide short description for mission item types 2017-11-27 10:28:24 +09:00
Randy Mackay 8b4345f29d AP_Mission: add winch support 2017-10-27 09:20:38 +09:00
Lucas De Marchi ef50783268 AP_Mission: add static create method 2017-09-26 03:01:21 +01:00
ChrisBird 46c982d64f AP_Mission: add OPTIONS parameter
First option added now is to clear the mission on reboot
Fixes #5743
2017-08-29 21:28:19 +01:00
Randy Mackay 638ba02d5f AP_Mission: add support for Set-Yaw-Speed command
This is initially only intended for use by Rover
2017-08-05 11:20:58 +09:00
Peter Barker 591bb32496 AP_Mission: correct off-by-one check when fetching mission items 2017-01-21 15:30:11 +09:00
Tom Pittenger 40777e9e74 AP_Mission: move jump_to_landing_sequence() to AP_Mission 2016-11-25 19:07:30 -08:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Andrew Tridgell 37f71bc6d6 AP_Mission: support DO_ENGINE_CONTROL 2016-07-25 10:06:03 +10: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 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
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
Lucas De Marchi 2790c16905 AP_Mission: replace header guard with pragma once 2016-03-16 18:40:42 +11:00
DonLakeFlyer 7cd3d8bfdc AP_Mission: better mission errors 2015-12-21 16:02:23 +11:00
Lucas De Marchi 3941bb7347 AP_Mission: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:12 +11: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
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
Andrew Tridgell 08acde2766 AP_Mission: added ALTITUDE_WAIT NAV command
used for HAB launch
2015-06-15 09:20:54 +10:00
Andrew Tridgell ec2d429513 AP_Mission: all vehicles now use functors 2015-06-01 15:18:31 +10:00
Andrew Tridgell e3f8e22fc6 AP_Mission: removed BUILD_DELEGATES code
no longer needed
2015-05-26 14:34:51 +10:00
Lucas De Marchi 384a3bfcc3 AP_Mission: allow to use functor 2015-05-26 13:46:50 +10:00
Andrew Tridgell e7ba2c8d93 AP_Mission: use APM_BUILD_DELEGATES 2015-05-21 07:48:51 +10:00
Andrew Tridgell 12cbf7888f AP_Mission: support member functions for rover 2015-05-21 07:48:46 +10:00
Randy Mackay dfadcad69d Mission: allow zoom_step to be negative 2015-04-29 14:36:25 +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
Randy Mackay a44b4b5e87 Mission: allow 15 do-jump commands on Pixhawk 2014-12-18 17:02:48 +09:00
Michael Day 83c2f497a3 AP_Mission: Change jump_to_landing_sequence to get_landing_sequence_start 2014-10-24 21:42:06 +11:00
Michael Day ea91f4d47b AP_Mission: Added support for MAV_CMD_DO_LAND_START 2014-10-20 08:36:19 +11:00
Randy Mackay be1621877f Mission: support GUIDED_ENABLE and GUIDED_LIMITS
This replaces the ardupilot only NAV_GUIDED command.
Also remove support for NAV_VELOCITY mission command which will be
replaced by SET_POSITION_TARGET non-mission command.
2014-10-13 21:40:23 +09:00
Randy Mackay 1ce8e453c2 Mission: add support for DO_GRIPPER 2014-09-17 21:14:17 +09:00
Andrew Tridgell 7a12ff0271 AP_Mission: convert to using StorageManager 2014-08-13 18:46:43 +10:00
Andrew Tridgell df55ae86c4 AP_Mission: added last_change_time_ms() call
will be used by terrain lib for scanning waypoints
2014-08-06 17:59:19 +10:00
Randy Mackay fe8a5be802 AP_Mission: support MAV_CMD_NAV_VELOCITY msg 2014-07-06 17:01:00 +09:00
Randy Mackay f4c9d58051 AP_Mission: add support for MAV_CMD_NAV_GUIDED 2014-07-06 17:00:26 +09:00
Randy Mackay 05f5164dfa Mission: rename AUTORESET to RESTART 2014-05-09 11:31:37 +09:00
Andrew Chapman 782fbe1ec5 AP_Mission: added reset() function 2014-04-29 11:46:06 +10:00
Andrew Chapman a80e72ff82 AP_Mission: added MIS_AUTORESTART parameter
- added MIS_AUTORESTART parameter, defaults to 0
- added start_or_resume() function to either start or resume a mission
based on that parameter value
2014-04-29 11:46:06 +10:00
Andrew Tridgell e10542dcae AP_Mission: added get_current_nav_index() function
this will return 0 when there is no current command, which is what is
expected in MAVLink when there is no mission

(it prevents the text to speech announcing "65 thousand 6 hundred and
thirty five", which is quite annoying!)
2014-04-22 11:40:18 +10:00
Andrew Tridgell cc212be41e AP_Mission: added get_next_ground_course_cd() API
this gives the ground course of the next navigation leg, which can be
used to calculate the amount of steering required
2014-04-07 09:29:54 +10:00
Randy Mackay 93f8d53d1b Mission: make get_prev_nav_cmd_index const 2014-03-30 23:09:54 +09:00
Randy Mackay f2d9ad41aa Mission: minor comment update 2014-03-28 09:22:56 +09:00
Andrew Tridgell 3bdc22d672 AP_Mission: make p1 16 bit
this gives us a 16 bit value for extra data on a location, allowing
for an accurate angle in centi-degrees.

Also add validation of the size of the union arms in Content
2014-03-20 16:57:09 +11:00
Randy Mackay c520cb789c Mission: cmd field types to match mavlink commands
Split Set-Servo and Repeat-Servo command structures
Split Set-Relay and Repeat-Relay command structures
2014-03-19 12:14:22 +09:00
Randy Mackay c75560218d Mission: command specific structures 2014-03-19 12:12:51 +09:00
Randy Mackay ece02b0c9a Mission: get_prev_nav_cmd returns int16 2014-03-19 12:12:34 +09:00
Andrew Tridgell 107cc2c126 AP_Mission: added truncate() function
Used when loading a mission while flying

Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2014-03-19 12:12:21 +09:00
Randy Mackay 9e07070d86 Mission: pass eeprom start into constructor
This allows different storage locations for ArduCopter, Plane and Rover
2014-03-19 12:11:53 +09:00
Randy Mackay ddc4cd4f18 Mission: add init and check_eeprom_version methods 2014-03-19 12:11:46 +09:00
Randy Mackay df339c05fc Mission: num_commands returns uint16 2014-03-19 12:11:25 +09:00
Randy Mackay 8dd301b0c2 Mission: set_current_cmd to use uint16 2014-03-19 12:11:06 +09:00
Randy Mackay a6e422333e Mission: remove alt_in_cm from mavlink to cmd conversion 2014-03-19 12:11:01 +09:00
Randy Mackay 0dc3c9ab42 Mission: add p1 to command structure
mavlink_to_mission_cmd method extended to support plane including adding
parameter to allow the alt to be expressed in cm or meters
2014-03-19 12:10:45 +09:00
Randy Mackay 61cc5e6b72 Mission: add replace_cmd method 2014-03-19 12:10:40 +09:00
Randy Mackay 3cbbd4ebb9 Mission: add set current command method 2014-03-19 12:10:36 +09:00
Randy Mackay c7ffd2db90 Mission: reduce unnecessary search for do-commands
do_cmd_all_done flag is set after all do-commands are complete
2014-03-19 12:10:33 +09:00
Randy Mackay 0c92d60406 Mission: command index increase to int16
Once more eeprom space is allocated this will allow more than 255
commands
2014-03-19 12:10:31 +09:00
Randy Mackay 85b979ede9 Mission: support do-jump num_times is -1
do-jump loops forever when num times is set to -1
2014-03-19 12:10:29 +09:00
Randy Mackay f4d8ccc128 Mission: add mavlink to cmd conversion methods 2014-03-19 12:10:17 +09:00
Randy Mackay 87c7d19f83 AP_Mission: special handling for cmd 2014-03-19 12:10:14 +09:00
Randy Mackay e8db57ced3 AP_Mission: replace block read/write for eeprom
Also reserve command #0 for home position
2014-03-19 12:10:00 +09:00
Randy Mackay 84b3497a82 AP_Mission: fixes to protect against endless loops 2014-03-19 12:09:57 +09:00
Randy Mackay 6086bc14be AP_Mission: mostly working draft 2014-03-19 12:09:56 +09:00
Randy Mackay 4285eba297 AP_Mission: initial draft library 2014-03-19 12:09:54 +09:00