Commit Graph

157 Commits

Author SHA1 Message Date
Andrew Tridgell feaf9751cc AP_Mission: removed use of MAV_CMD_NAV_VELOCITY and MAV_CMD_NAV_GUIDED 2014-07-24 21:38:31 +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 2f7dee3ba5 AP_Mission: squeeze loiter turns radius into high byte of p1 2014-06-17 20:53:50 +10:00
Andrew Tridgell f0df912a11 AP_Mission: added support for MAV_CMD_DO_INVERTED_FLIGHT 2014-06-05 15:44:18 +10:00
Randy Mackay 05f5164dfa Mission: rename AUTORESET to RESTART 2014-05-09 11:31:37 +09:00
Andrew Tridgell 818e500509 AP_Mission: improve the AP_Mission docs
DisplayName isn't a description
2014-04-29 11:46:06 +10: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
Randy Mackay 5322093475 Mission: fix example sketch after GPS lib changes 2014-04-17 16:41:38 +09:00
Randy Mackay d8f9a1c6c6 Mission: add support for MAV_CMD_DO_PARACHUTE 2014-04-07 13:36:55 +09: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
Andrew Tridgell 31082f4ce2 AP_Mission: fixed a bug re-entering AUTO
this fixes a bug found by Marco where we would continue in CRUISE mode
with no waypoint if we re-entered AUTO after a mission reset
2014-03-31 06:18:07 +11:00
Randy Mackay 93f8d53d1b Mission: make get_prev_nav_cmd_index const 2014-03-30 23:09:54 +09:00
Randy Mackay ac339a0289 Mission: add decoding of NAV_SPLINE command 2014-03-28 09:23:30 +09:00
Randy Mackay f2d9ad41aa Mission: minor comment update 2014-03-28 09:22:56 +09:00
Andrew Tridgell 0af35bd636 AP_Mission: fixed some compiler warnings 2014-03-24 12:52:27 +11: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 37cff752c8 Mission: handle Loiter direction
loiter-unlimited, loiter-turns and loiter-time cms specify the turn
direction in Param3.  This is stored in the location's loiter_ccw flag.
Previously supported only in Plane, moving here allows us to share more
code with Plane, Copter, Rover.
2014-03-19 12:13:16 +09:00
Randy Mackay c75560218d Mission: command specific structures 2014-03-19 12:12:51 +09:00
Andrew Tridgell 3a6698f54b AP_Mission: fixed typo 2014-03-19 12:12:42 +09:00
Andrew Tridgell 3538621c48 AP_Mission: doc updates 2014-03-19 12:12:40 +09:00
Randy Mackay 48329c1bba Mission: bug fix for loading consecutive do-cmds
The verify step was not being run for the 2nd consecutive do-command in
a mission list
2014-03-19 12:12:37 +09:00
Randy Mackay ece02b0c9a Mission: get_prev_nav_cmd returns int16 2014-03-19 12:12:34 +09:00
Randy Mackay 266a1ce9af Mission: bug fix set_current_cmd
If mission had completed desired command index was ignored
2014-03-19 12:12:27 +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
Andrew Tridgell acdaf561c8 AP_Mission: fixed typo 2014-03-19 12:12:15 +09:00
Randy Mackay 8e117d29eb Mission: test exceeding command storage size 2014-03-19 12:11:55 +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 4c0a31a9dc Mission: init home to zero before writing to eeprom 2014-03-19 12:11:37 +09:00
Randy Mackay df339c05fc Mission: num_commands returns uint16 2014-03-19 12:11:25 +09:00
Randy Mackay e60865b715 Mission: example sketch test for set_current_cmd 2014-03-19 12:11:12 +09:00
Randy Mackay 512b378c4a Mission: allow set_current_cmd when mission is not running
Can now be run when mission is complete or stopped.  When mission is
resumed it will begin at the set command.  This command can be either a
nav or do command
2014-03-19 12:11:10 +09:00
Andrew Tridgell eaf34bba9a AP_Mission: fixed reset using set mission item to 0
this causes a mission reset
2014-03-19 12:11:07 +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 5dd86bd7d7 Mission: update example sketch for p1's move to cmd structure 2014-03-19 12:10:49 +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 4c0ae63169 Mission: example sketch test replace_cmd method 2014-03-19 12:10:42 +09:00
Randy Mackay 61cc5e6b72 Mission: add replace_cmd method 2014-03-19 12:10:40 +09:00
Randy Mackay ef21e32fbc Mission: example sketch tests set current command 2014-03-19 12:10:37 +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 c6c43847b6 Mission: example sketch tests set home command 2014-03-19 12:10:27 +09:00
Randy Mackay cc8554fa2b Mission: fix example sketch 2014-03-19 12:10:18 +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 fd009d0704 AP_Mission: tests added to example sketch 2014-03-19 12:09:59 +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