Commit Graph

483 Commits

Author SHA1 Message Date
Randy Mackay e081b9d1c7 Copter: home is set becomes three state 2015-02-12 15:00:50 +09:00
Randy Mackay 34503de18e Copter: integrate SerialManager
Remove serial0, serial1 baud and protocol parameters
Pass serial_manager to GCS, GPS, mount, FrSky_telem objects during init
call SerialManager init_console on startup
use SerialManager's set_block_writes_all
2015-01-29 14:05:14 +11:00
Robert Lefebvre 4b86a4aeec Arducopter: Change mode logging to use common-vehicle DataFlash library. 2015-01-21 14:37:20 +09:00
Robert Lefebvre 422970a1b1 Arducopter: Change compass logging to use common-vehicle DataFlash library. 2015-01-21 14:37:16 +09:00
Robert Lefebvre 1b152cf2bf ArduCopter: Change Current logging to use common-vehicle logging in DataFlash library. 2015-01-21 14:37:04 +09:00
Robert Lefebvre c9d5b6aa7f Arducopter: Change Attitude logging to use common-vehicle logging in DataFlash library. 2015-01-21 14:36:59 +09:00
Randy Mackay 80f59694d0 Copter: remove deprecated Guided-Spline
Guided-Spline has been replaced by Guided-PosVel
2015-01-07 14:03:50 +09:00
Jonathan Challinger bc29008233 Copter: add guided_posvel 2015-01-07 14:02:21 +09:00
Robert Lefebvre e10e020062 Copter: Add Landing Gear functionality to main code 2015-01-07 11:58:16 +09:00
Randy Mackay 67fdfffc2a Copter: remove OF_Loiter PIDs and tuning 2014-12-08 14:58:18 +09:00
Jonathan Challinger 387f3276cb Copter: handle SET_POSITION_TARGET mavlink messages 2014-11-17 14:38:55 -08:00
Jonathan Challinger 1b1327dc93 Copter: add Guided_Spline mode 2014-11-17 14:38:48 -08:00
Jonathan Challinger 80ba40d149 Copter: CPU failsafe logs an error 2014-11-08 11:27:16 +09:00
Jonathan Challinger d7d8330303 Copter: loiter copter without accepting user input at end of auto mission 2014-10-20 10:46:14 +09:00
Andrew Tridgell c3d839456b Copter: support logging while disarmed 2014-10-17 16:29:59 +09:00
Randy Mackay b9977a1115 Copter: add land_complete_maybe flag 2014-09-19 16:43:15 +09:00
Randy Mackay 3fa3cb6d65 Copter: remove EPM neutral from ch7/ch8 switch
The EPM library returns the pwm output sent to the EPM to the neutral
position automatically meaning an explicit ch7/ch8 setting is not
required
2014-09-17 21:13:45 +09:00
Randy Mackay 14d80910ec Copter: integrate EPM ver2 2014-09-17 21:13:35 +09:00
Jason Short 882edaf787 Copter: add pitch axis flipping
Added Pitch axis flipping. You must be pushing forward or back 3° to make it flip in Pitch axis or it will flip in the default roll axis.
Added some extra throttle control to maintain altitude
removed the CH7 ability to exit Flip mode. It will exit only if completing flip or user aborts with control sticks.
2014-08-23 23:40:07 +09:00
priseborough 162b824424 Copter : Distinguish between EKF and INAV errors 2014-08-18 14:17:50 +09:00
Randy Mackay 5b114dcad5 Copter: remove unused WP_OPTION definitions
This also kicks off the build for AC3.2-rc5
2014-08-16 12:18:48 +09:00
Andrew Tridgell e260f1c569 Copter: convert to using StorageManager 2014-08-13 18:46:44 +10:00
Randy Mackay 4723ed5e6e Copter: rename EKF check's error message to dataflash
It checks more than the compass so the old error message was misleading.
2014-08-09 15:48:42 +09:00
Randy Mackay 0518439841 Copter: move relay from ch6 to ch7/ch8 2014-08-09 13:37:12 +09:00
ggregory8 3832c46998 Copter: Add takeoff enum for guided_mode 2014-08-05 10:25:29 +09:00
Randy Mackay 8a07701d07 Copter: remove ch6 tuning of INAV_TC
Users normally never change these parameters and if by chance they do want
to, they can set them before flying
2014-08-01 15:14:42 +09:00
Andrew Tridgell 3ccac6736d Copter: rename TELEM2_PROTOCOL to SERIAL2_PROTOCOL
this matches SERIAL2_BAUD
2014-07-30 14:49:10 +10:00
Matthias Badaire 147e91877e Copter: Add SERIAL2_PROTOCOL for GCS and FRsky telemtry
this allows selection of protocol type on telem2. The default is
MAVLink, but can be selected as FrSky protocol
2014-07-29 17:08:19 -07:00
Randy Mackay 7cc1501dc6 Copter: integrate baro glitch protection 2014-07-28 22:16:20 +09:00
akdslr dc67058771 ArduCopter: Removed CONFIG_SONAR_SOURCE, SONAR_SOURCE_ADC, and SONAR_SOURCE_ANALOG_PIN since no longer used 2014-07-24 14:41:55 +10:00
Randy Mackay 7bda6cbadf Copter: integrate EKF check
Check runs at 10hz
Log ekf check failures and ekd failsafes
2014-07-22 23:13:25 +09:00
Andrew Tridgell 49954a3a61 Copter: use sensors from board subtypes 2014-07-14 09:44:35 +10:00
Randy Mackay 65e5367619 Copter: rename hybrid to poshold 2014-07-11 14:09:01 +09:00
svefro e892b4cd04 Copter: Ch7/8 option to retract mount
-Define AUX_SWITCH_RETRACT_MOUNT in defines.h
-Added 27=Retract Mount to Parameters.pde CH7 and CH8
-added int on CH7/8opt AUX_SWITCH_RETRACT_MOUNT
-Added Case #if Mount == ENABLE to set mount mode
made set_mode public in AP_Mount.h lib
2014-07-10 13:03:28 +09:00
Robert Lefebvre 1f422c86c1 Arducopter: Add independent rate roll and pitch P, I, D tuning options. Add rate feedforward tuning options for tradheli. 2014-07-08 20:18:08 +09:00
Randy Mackay f5640dadbf Copter: guided mode velocity controller 2014-07-06 17:01:08 +09:00
Randy Mackay fdc0ec837b Copter: add nav_guided suport to Auto mode 2014-07-06 17:00:31 +09:00
Andrew Tridgell 21b0b3bc15 Copter: log up to 3 mags 2014-07-04 12:07:59 +10:00
Randy Mackay 8c488ebd87 Copter: use common Log_Write_Camera
pair programmed with Craig Elder
2014-06-17 14:11:39 +10:00
Randy Mackay 810c87969c Copter: Ch7/8 switch to enable/disable feed forward and accel limiting 2014-06-10 20:03:04 +09:00
Andrew Chapman 3f0a52cb53 Copter: ch7/8 switch for auto pause/continue
- added new mode for CH7/CH8 (#24, auto mission reset)
- changed mission.start() to mission.start_or_resume() in auto_init()
2014-05-08 23:09:42 +09:00
Randy Mackay b5ed23f592 Copter: integrate skeleton Hybrid mode 2014-04-23 14:59:17 +09:00
Randy Mackay 7af5d4a8ce Copter: remove RALLY_WP_SIZE definition 2014-04-19 15:00:30 +09:00
Andrew Chapman fa3732ac6d Copter: integrate AP_Rally 2014-04-19 15:00:23 +09:00
Randy Mackay e6d2692eab Copter: Loiter_Turns moves to edge of circle if location provided 2014-04-16 16:28:08 +09:00
Emile Castelnuovo 9e31f032c2 Copter: added VRBRAIN board #includes and #defines 2014-04-08 16:19:20 +10:00
Randy Mackay 47c1cb8b99 Copter: log parachute events 2014-04-07 13:36:59 +09:00
Randy Mackay 340f3a7f9d Copter: ch7/ch8 parachute release 2014-04-07 13:36:47 +09:00
Andrew Tridgell 640b64f5e4 Copter: convert to new GPS API 2014-04-01 06:38:24 +11:00
Randy Mackay 0822adfb34 Copter: integrate spline navigation 2014-03-28 09:22:59 +09:00
Andrew Tridgell 11e5b95878 Copter: updates for GPS changes 2014-03-24 12:04:46 +11:00
Randy Mackay f3813593b7 Copter: use Dataflash lib's Log_Write_Cmd 2014-03-19 12:12:11 +09:00
Randy Mackay b587d0d597 Copter: pass eeprom start to Mission constructor 2014-03-19 12:11:56 +09:00
Randy Mackay f77b2af661 Copter: use common location options masks 2014-03-19 12:10:26 +09:00
Randy Mackay 37fe229ded Copter: remove unused definitions 2014-03-19 12:10:12 +09:00
Randy Mackay c56f521897 Copter: ch6 tuning of RC_FEEL_RP 2014-03-04 22:23:53 +09:00
Randy Mackay fdae812814 Copter: DO_SET_ROI persists across waypoints
Users should add a DO_SET_ROI command with zero lat, lon and alt to
restore the yaw control to the default control (which is normally
look-at-next-wp)
2014-02-18 21:36:02 +09:00
Randy Mackay 00913ffe1b Copter: throttle rate to simple P controller
Saves at least 15bytes of RAM
2014-02-16 13:35:40 +11:00
Randy Mackay 20989fd5e9 Copter: allow ch6 tuning of EKF 2014-02-15 05:48:20 +11:00
Andrew Tridgell a112694a50 Copter: added AUX switch option for enable/disable EKF 2014-02-15 05:48:17 +11:00
Andrew Tridgell 24f2ac20de Copter: removed HIL_MODE_ATTITUDE
this really can't work any more, as AHRS can't support it
2014-02-15 05:29:46 +11:00
Randy Mackay aa4c3eaffe Copter: resolve RTL state compiler warnings 2014-02-15 05:27:48 +11:00
Randy Mackay f46ff2b44e Copter: remove unused defines 2014-02-15 05:27:46 +11:00
Randy Mackay aec67cd3df Copter: integrate control_autotune 2014-02-15 05:27:44 +11:00
Randy Mackay d90d3d8dca Copter: integrate control_flip 2014-02-15 05:27:44 +11:00
Randy Mackay ef666c73ab Copter: remove Position mode 2014-02-15 05:27:42 +11:00
Randy Mackay 1457a9d31a Copter: auto_mode to global scope 2014-02-15 05:27:41 +11:00
Randy Mackay 689e92eb33 Copter: control_rtl 2014-02-15 05:27:39 +11:00
Randy Mackay 65f7bf92f4 Copter: replace yaw_mode with auto_yaw_mode 2014-02-15 05:27:37 +11:00
Randy Mackay 2219f21744 Copter: add RC_FEEL_RP parameter
Values from 0 ~ 100 control amount of filtering on roll and pitch input.
100 = no filter so crisp feel, 0 = a lot of filtering so very sluggish
response
2014-02-12 16:28:41 +09:00
Dneault f48e106271 Copter: add coax heli support
Motors should be attached to RCOutputs 1 and 2, Flaps should be connected
to RC outputs 3 and 4
2014-02-07 12:36:04 +09:00
Randy Mackay 214a859e97 Copter: remove unused RADX100 definition
The real purpose of this small change is to kick off the autobuilder for
the AC3.1.1 release.
2014-01-26 13:41:14 +09:00
Randy Mackay a45b9cbe9a Copter: remove unused RELAY_TOGGLE definition 2014-01-26 10:10:02 +09:00
Randy Mackay dee5fb212a Copter: remove dup definition of FRAME_ORIENTATION
Ideally the frame orientation parameter should be moved to the motors
class
2014-01-21 21:44:17 +09:00
Randy Mackay ae4f368f16 Copter: allow ch6 tuning of loiter speed 2014-01-15 15:22:52 +09:00
Randy Mackay a3527ade61 Copter: move EARTH_FRAME definition to defines.h
defines.h is for defining enumerations and other unchanging values while
config.h is for changeable values like parameter defaults, enabling or
disabling sensors.
2014-01-14 21:53:13 +09:00
Randy Mackay 66859686a0 Copter: remove some unused definitions 2014-01-14 21:21:54 +09:00
Randy Mackay 138c2803be Copter: combine NTUN and INAV dataflash msgs 2014-01-13 22:00:11 +09:00
Randy Mackay df9d1614e2 Copter: remove PID logging
Almost never used and eats up limited log description space
2014-01-13 17:23:39 +09:00
ctech4285 2b5d8aa5b7 Copter: integrate EPM library 2013-12-17 15:36:42 +09:00
Andrew Tridgell 9716e80e21 Copter: moved ap_message into GCS.h 2013-12-17 11:51:35 +11:00
Andrew Tridgell cc3ee2ec0c Copter: added dual compass logging when available 2013-12-10 13:31:42 +11:00
Randy Mackay cf0547e854 Copter: remove AN0~AN15 pin definitions 2013-12-06 10:28:28 +09:00
Randy Mackay e978a710cc Copter: remove PIEZO_PIN definition 2013-11-30 18:21:01 +09:00
Randy Mackay 7ef04bb73b Copter: rename nav_yaw to control_yaw 2013-11-27 22:48:20 +09:00
Randy Mackay 10d6a9a34e Copter: replace Log_Write_Motors with Log_Write_RCOU 2013-11-27 20:18:18 +09:00
Randy Mackay af657d58b9 Copter: RCIN dataflash logging 2013-11-27 16:46:25 +09:00
Randy Mackay 87127f0ab8 Copter: allow battery failsafe to trigger RTL 2013-11-16 14:46:57 +09:00
Randy Mackay bc1e06757b Copter: allow GPS failsafe to trigger AltHold
FS_GPS_ENABLE parameter accepts two new options, 2=AltHold,
3=LandEvenFromStabilize.
If set to 3 the GPS failsafe will trigger and LAND even from manual
flight modes like Stabilize and ACRO.  This is useful for users who want
to ensure their copters can never stray outside the circular fence (the
fence only triggers when it knows it is outside the bounds, and it can't
know this if it has no GPS)
2013-11-16 13:55:59 +09:00
Randy Mackay ae87759e6d TradHeli: add THROTTLE_MANUAL_HELI
Move check_dynamic_flight to run as scheduled task
2013-11-15 22:57:53 +09:00
Randy Mackay f0f6e85b39 Copter: ARMING_CHECK made into bitmask
Allows arming checks to be individually enabled or disabled for baro,
compass, GPS, INS, parameters, RC and board voltage
2013-11-15 17:13:56 +09:00
Jason Short 371dc8c616 Copter: Drift Mode
Changes Toy mode declarations to Drift mode.
Requires GPS, Mode 2 transmitter
Drift mode mixes Roll, Pitch and Yaw into a single stick on mode two transmitters.
2013-11-14 14:43:15 +09:00
Randy Mackay 06ce98a2f4 Copter: add SINGLE_FRAME definition 2013-11-12 23:40:32 +09:00
Jason Short 520a535c21 Copter: TOY mode updates 2013-11-02 21:34:48 +09:00
Randy Mackay 798c4e2278 Copter: more Ch7/Ch8 event logging
Additional event logging for SaveWP, Fence, Acro trainer, Save Trim
2013-11-01 11:53:16 +09:00
Randy Mackay 2326b2e5f5 Copter: crash checker
Crash is determined to have happened when the copter is 20deg more than
the ANGLE_MAX parameter continuously for more than 2 seconds
Not activated when in ACRO mode or while flipping
2013-10-29 22:15:12 +09:00
Andrew Tridgell 92bf4b9c89 Copter: added MAVLink SYSTEM_TIME message 2013-10-24 14:22:47 +11:00
Randy Mackay fb49cd82c1 Copter: add LAND to aux switch
Fix aux switch AUTO and RTL so they resets flight mode if still in those
modes when switch brought low
2013-10-22 13:13:36 +09:00
Randy Mackay 6c0cb5f84d AutoTune: bug fix and GCS messages 2013-10-19 21:54:18 +09:00
Randy Mackay 0cbedded0d Copter: autotune to use 2pos switch only
method of recording state also changed
other code clean-up
pair programmed withe Leonard
2013-10-18 13:57:50 +09:00
Randy Mackay 2e75d5dec3 Copter: autotune log when limits reached 2013-10-17 11:05:31 +09:00
Randy Mackay 7e657ce856 AutoTune: abandon tuning if rate P hits minimum
Fixes from Leonard
2013-10-09 13:35:43 +09:00
Andrew Tridgell 4b68dd48f7 Copter: use ins.wait_for_sample() for main loop
this takes advantage of the INS specific method to wait for a sample
2013-10-08 19:20:34 +11:00
Randy Mackay 31cea0140d Copter: Leonard's AutoTuning for Roll and Pitch 2013-10-04 15:50:47 +09:00
Randy Mackay dab4f032f9 Copter: integrate BattMonitor 2013-10-03 11:16:28 +09:00
Randy Mackay c3f7146f03 Copter: improve check of frame type to catch spelling errors 2013-09-27 14:35:16 +09:00
Randy Mackay a53d28e018 Copter: remove support for dmp ahrs 2013-09-27 10:42:49 +09:00
Randy Mackay 77b5cb5d3f Copter: correct typo in error #define 2013-09-24 21:45:52 +09:00
Randy Mackay c596b27719 Copter: add dataflash error for GPS glitch 2013-09-24 21:41:48 +09:00
Andrew Tridgell 3378c7901a Copter: added support for the flymaple board 2013-09-24 13:51:28 +10:00
Randy Mackay fd047cc968 Copter: AUTO ch7/ch8 option 2013-08-19 18:09:23 +09:00
Randy Mackay 3a5a15a15f Copter: allow CH6 tuning of sonar gain 2013-08-18 15:44:54 +09:00
Randy Mackay 69da4e99f8 Copter: add ch7/ch8 Auto and Land option
CH7/CH8 high initiates AUTO mode, low initiates Land.  Ideally high
would be a new take-off flight mode so this may need some rework.
2013-08-15 16:08:33 +09:00
Randy Mackay e1fe4946fb Copter: Sprayer enable added to CH7/CH8 switch 2013-08-05 21:12:29 +09:00
Randy Mackay 49dbdce89c Copter: split ACRO_P into ACRO_RP_P and ACRO_YAW_P 2013-08-05 21:05:00 +09:00
Randy Mackay 786d6824ae Copter: Acro Trainer added to Ch7/Ch8 switch 2013-08-05 21:04:55 +09:00
Randy Mackay 21e523b9ac Copter: Acro trainer separated into limited and leveled 2013-08-05 21:04:53 +09:00
Randy Mackay 39ab4f62ef Copter: add SPORT mode 2013-08-05 21:04:41 +09:00
Randy Mackay 2c48c20088 Copter: generalize 3 pos switch for all ch7/ch8 options 2013-07-29 16:28:04 +09:00
Olivier-ADLER 87d062905e Copter: 3 positions switch support for CH7 and CH8 - new 3 positions SIMPLE / SUPERSIMPLE mode
3 positions modes must use mode number >= 100
pre-arm check correction for CH7 - CH8 check
2013-07-29 15:12:10 +09:00
Randy Mackay c3daf78340 Copter: reset loiter target when landed 2013-07-28 18:18:41 +09:00
Randy Mackay c937fe45e1 Revert "Copter: Remove CH7 & CH8 Enable / Disable of GeoFence"
This reverts commit e25b8933f3.
2013-07-20 15:00:08 +09:00
Randy Mackay 7ea971d948 Copter: check set_mode for failure
Previously if set_mode failed it would return the copter to stabilize
mode.  With this commit set_mode returns a true/false indicating whether
it succeeded or not so the caller can make the decision as to the
appropriate response which could be to stay in the current flight mode
or try another flight mode.
2013-07-20 11:01:10 +09:00
Craig3DR e25b8933f3 Copter: Remove CH7 & CH8 Enable / Disable of GeoFence 2013-07-18 17:06:53 +09:00
Randy Mackay b3da8a462f Copter: CH6 tuning definition clean-up
Renamed and reorganised the CH6 #defines and parameter definitions
2013-06-29 23:51:43 -10:00
Randy Mackay 23ce35d292 Copter: remove unused NAV_WP_INAV #define 2013-06-01 18:21:28 +09:00
Randy Mackay 00bd1bf8ea Copter: RESETTOARMEDYAW order and comments
We should keep the order in the case statement the same as the #define
order.
2013-05-21 10:58:34 +09:00
Dr Gareth Owen e9d640ced8 added ch7 option to reset yaw back to what it was when quad was armed 2013-05-21 10:40:30 +09:00
Randy Mackay 4ad395e7be Copter: merge WPNAV into NTUN dataflash message 2013-05-19 22:53:35 +09:00
Randy Mackay 38239c652a Copter: ch8 aux switch
Ch8 can be used as an aux switch like ch7.  Has all the same options as
ch7 and there is a safety check to ensure both switches aren't set to
the same function so as to avoid interfering with each other
2013-05-17 14:42:28 +09:00
Randy Mackay 566daf883a Copter: remove unused MODE bit from LOG_BITMASK
We always log the mode so no need for this bit
2013-05-17 12:26:42 +09:00
Randy Mackay 33d1129904 Copter: remove unused TB_RATIO parameter 2013-05-14 16:56:55 +09:00
Randy Mackay e130c8041c Copter: remove unused event definitions 2013-05-13 18:07:44 +09:00
Randy Mackay bb7aec2600 Copter: log compass failur to dataflash 2013-05-13 18:01:30 +09:00
Randy Mackay ad656c7e8a Copter: allow lat/lon to be specified for land 2013-05-10 22:37:15 +09:00
Andrew Tridgell 95120ed43d Copter: use library gcs_severity 2013-05-09 09:28:49 +10:00
Randy Mackay bab9fa25e5 Copter: add GCS failsafe 2013-04-29 21:30:22 +09:00
Randy Mackay 58d1da2d80 Copter: integrate AC_Fence in place of limits
Lesser functionality than limits but saves more than 150 bytes and it
works
2013-04-27 11:14:07 +09:00
Randy Mackay a53e5f747b Copter: add fourth yaw behaviour, look-at-home
Added get_wp_yaw_mode to remove duplication of checks of the
WP_YAW_BEHAVIOR parameter
2013-04-20 15:36:24 +09:00
Andrew Tridgell 67484a2ea1 Copter: make copter code compatible with the new logging system
not fully converted yet
2013-04-20 13:52:36 +10:00
Randy Mackay 37abfdc65a Copter: make CIRCLE_RATE a tunable parameter
Also bug fix to check of how many time it has rotated during a loiter
turns mission command
2013-04-20 12:03:55 +09:00
Randy Mackay 0fc9c8739e Copter: add WP_YAW_BEHAVE parameter
Allows user to control whether nose points towards next waypoint and/or
home when RTLing.
Replaces YAW_OVR_BEHAVE which had a very similar purpose.  Almost nobody
ever knew about or used this parameter.
2013-04-18 15:30:18 +09:00
Randy Mackay 2b4a7d60a9 Copter: remove unused throttle modes
These were useful for testing the alt-hold when it was first introduced
but now they just add complexity
2013-04-17 22:14:22 +09:00
Randy Mackay b48864e1ad Copter: allow CH6 tuning of compass declination 2013-04-15 21:50:44 +09:00
Randy Mackay 629d23b7e2 Copter: remove WP_SPEED and WP_RADIUS parameters
AC_WPNav library has equivalent params with very similar names
2013-04-14 13:27:37 +09:00
Randy Mackay bffe4fa412 Copter: remove NAV_LAT and NAV_LON
Loiter and navigation controllers now combined
2013-04-14 12:09:45 +09:00
Randy Mackay 1ee825ee9a Copter: move alt and wp checking to AC_WPNAV
RTL fix so that if it starts rtl-ing from above 80m it returns home
while descending instead of descending at initial position.
add get and set_target_alt_for_reporting
2013-04-14 10:39:23 +09:00
Randy Mackay 1516972eaa Copter: add panorama to CIRCLE mode
Yaw will slowly rotate if CIRCLE_RADIUS is set to zero
Circle center is projected forward CIRCLE_RADIUS from current position
and heading
2013-04-14 10:38:01 +09:00
Randy Mackay 597a4b912a Copter: fix to allow building HIL_MODE_SENSORS 2013-03-18 13:41:52 +09:00
Randy Mackay f9539384a1 Copter: rename failsafe to failsafe_radio
Makes way for separation of failsafes for throttle, gps and gcs
2013-03-16 17:14:21 +09:00
Randy Mackay cb84ec9d9b Copter: add current based compass compensation 2013-03-03 23:02:36 +09:00
Andrew Tridgell c2fd1512ff Copter: use voltage_average() so as to avoid INPUT_VOLTS 2013-03-03 16:16:01 +11:00
Randy Mackay cbde042ec5 Copter: remove non-inav loiter and wp controllers
lon_speed, lat_speed changed to float
do_takeoff, do_land now set roll-pitch, yaw and nav modes specifically
removed fast_corners functionality (may need to be reimplemented with
new inertial nav controllers)
2013-02-24 14:41:52 +09:00
Randy Mackay 609676e26c Copter: add logging of compass values
Removed rarely used ITERM because we didn't have enough bits in the log
mask
2013-02-24 14:41:48 +09:00
Randy Mackay 1410063a14 Copter: new ROLL_PITCH_WP_INAV roll-pitch mode
small corrections to allow waypoints to work with new inertial nav wp
controller
2013-02-24 14:41:40 +09:00
Randy Mackay fcf102b2cf Copter: inertial nav waypoint controller
#define added to allow compile time selection of traditional or inav
based loiter and wp controllers
2013-02-24 14:41:09 +09:00
Randy Mackay ce370bab0c Copter: rename CUR and CURR to CURRENT for logging
Based on user complaint that enable/disable was using CUR while message
was appearing as CURR
2013-01-26 17:20:41 +09:00
Randy Mackay 0056bfadd7 Copter: rename ROLL_PITCH_LOITER
new name ROLL_PITCH_LOITER_INAV makes it more clear that it should only
be used with the new inertial nav loiter controllers
2013-01-25 23:27:31 +09:00
Randy Mackay aaecc25ac7 Copter: leonard's inav2
Moved loiter controller to navigation.pde
2013-01-25 15:16:35 +09:00
Randy Mackay fd02cfe706 Copter: added set_nav_mode to control initialisation of nav controllers
Renamed run_navigation_controllers() to run_autopilot()
Renamed update_nav_wp() to update_nav_mode()
Renamed wp_control to nav_mode to be more consistent with roll-pitch,
yaw and throttle controllers
2013-01-25 15:16:29 +09:00
Randy Mackay 9a09f086d2 Copter: Leonard Hall's inertial nav ver 2 2013-01-23 12:34:49 +09:00
rmackay9 ab1978ad50 Copter: Leonard Hall's inertial nav based loiter 2013-01-22 18:38:00 +09:00
Robert Lefebvre dde713aaa5 Arducopter: Backing out my changes for a new Loiter Repositioning mode. Leonard and Jonathan's work will trump this. 2013-01-20 21:32:00 +09:00
James Bielman 5631f865b2 Update floating point calculations to use floats instead of doubles.
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
2013-01-16 13:52:01 +11:00
Randy Mackay 8bbc93bb04 Copter: added CH7 switch to enabling/disable the sonar in flight
This indirectly switches surface tracking on/off which is useful to
avoid tracking the tops of uneven objects when far above the ground
2013-01-14 14:00:08 +09:00
rmackay9 f25f1cb3bf ArduCopter: changed alt hold to use the sonar if enabled and healthy 2013-01-13 19:56:19 +11:00
Randy Mackay 87627d883b ArduCopter: use new logging method for remaining packet types
Additional changes include renaming RAW dataflash type to IMU
2013-01-13 00:17:44 +09:00
James Bielman ab37f833db MS5611: Fix CONFIG_MS5611_SERIAL definitions.
- Make sure the values are defined as integers.  We were always using
  SPI rather than using I2C when desired.
2013-01-09 11:19:51 -08:00
Andrew Tridgell b079a96eaf Copter: removed GPS_STATUS message
this message is huge, and completely pointless now that we have
num_satellites in GPS_RAW_INT
2013-01-05 20:39:31 +11:00
Andrew Tridgell c48714be16 Copter: enabled PX4 sensors 2013-01-05 20:39:31 +11:00
rmackay9 2181ec2ab0 ArduCopter: log watchdog event to dataflash 2013-01-02 09:55:37 +11:00
rmackay9 672fdfbf71 ArduCopter: added ERR dataflash message
Failsafe events changed to errors so they are more obvious.
Errors recorded to dataflash for failure to init compass and optical flow sensor.
Errors recorded for pwm failure.
Resolved a compile error when dataflash logging is disabled.
2013-01-02 09:55:37 +11:00
rmackay9 677b38a48e ArduCopter: first implementation of surface tracking using sonar
Note: not yet enabled as part of any flight mode
2013-01-02 09:55:37 +11:00
rmackay9 68b62abd38 ArduCopter with the new Camera and Relay classes for APM1 and APM2.
All changes by Sandro Benigno
2013-01-02 09:55:37 +11:00
rmackay9 e77b54c7dc ArduCopter: bug fix to GUIDED mode. Now checks that desired altitude was reached before deciding the waypoint is complete. 2013-01-02 09:24:31 +11:00
Craig@3DR 0ed25cf719 Global change all references from
GPS_PROTOCOL_MTK16
to
GPS_PROTOCOL_MTK19
2013-01-02 09:24:31 +11:00
Jason Short 8b62c4630b ACM: Restore Multi-mode support 2013-01-02 09:20:08 +11:00
Robert Lefebvre 6e64b1b357 ACM: Precision Loiter RePositioning code.
Protected behind a #define
2013-01-02 09:19:39 +11:00
rmackay9 1b5ff6aac6 ArduCopter: restore initial climb to RTL 2013-01-02 09:19:17 +11:00
rmackay9 f4c50353b9 ArduCopter: allow tuning of the Throttle Rate D term 2013-01-02 09:16:48 +11:00
Andrew Tridgell 3c0440b0b4 Math: use common degrees() and radians() functions 2012-12-20 14:53:22 +11:00
Andrew Tridgell 9e986801c9 Copter: fixed SITL for ArduCopter 2012-12-20 14:52:34 +11:00
Pat Hickey d93d932831 ArduCopter: defines fixes
Conflicts:

	libraries/AP_Common/Arduino.mk
2012-12-20 14:52:28 +11:00
Pat Hickey 2aa4657315 ArduCopter: changes to use CONFIG_HIL_BOARD 2012-12-20 14:52:28 +11:00
rmackay9 56ceb230cb ArduCopter: add YAW_OVR_BEHAVE to allow control of when autopilot takes back control of yaw after pilot overrides it during a mission 2012-12-09 18:04:31 +09:00
rmackay9 0f7bb79d89 ArduCopter: add comments to tuning parameters.
Use RC_CHANNEL types as defined by RC_Channel library.
Remove unused definitions.
2012-12-09 16:44:42 +09:00
rmackay9 9dd978576b ArduCopter: auto yaw changes to allow pilot override of yaw during missions
Added set_yaw_mode to better control of yaw controller changes and variable initialisation.
Replaced AUTO_YAW mode with separate yaw controllers YAW_LOOK_AT_NEXT_WP, YAW_LOOK_AT_LOCATION, YAW_LOOK_AT_HEADING.
Pilot manual override of yaw causes yaw to change to YAW_HOLD (i.e. manual yaw) until next waypoint is reached.
Added get_yaw_slew function to control how quickly autopilot turns copter
Changed YAW_LOOK_AHEAD to use GPS heading and moved to new get_look_ahead_yaw function in Attitude.pde
Renamed variables: target_bearing->wp_bearing, original_target_bearing->original_wp_bearing.
Removed auto_yaw_tracking and auto_yaw variables and update_auto_yaw function as they are no longer needed.
Simplified MAV_CMD_CONDITION_YAW handling (do_yaw).  We lose ability to control direction of turn and ability to do long panorama shots but it now works between waypoints and save 20bytes.
2012-12-08 14:23:32 +09:00
rmackay9 68ca123224 ArduCopter: remove some unused #defines 2012-12-07 15:17:35 +09:00
rmackay9 3a90fc77f9 ArduCopter: add dataflash logging of camera events 2012-12-07 00:57:08 +09:00
rmackay9 4ca27defb3 ArduCopter: update comments related to CH7 switch options 2012-12-06 17:40:36 +09:00
rmackay9 a5bb54e36e ArduCopter: RTL clean-up and slightly improved landing sensor
Consolidated RTL state to be captured by rtl_state variable.
Combined update_RTL_Nav and verify_RTL functions which performed the same function but one was for missions, the other for the RTL flight mode.
Renamed some RTL parameters and global variables to have RTL at the front.
Landing detector now checks accel-throttle's I term and/or a very low throttle value
2012-12-06 10:31:52 +09:00
rmackay9 d7f76ebd87 ArduCopter: add tuning of throttle rate controller's I term (THROTTLE_KI) 2012-12-06 10:31:25 +09:00
rmackay9 7b4ed2d227 ArduCopter: restored landing detector to landing throttle mode.
Added LAND_SPEED parameter to control the rate of descent for the last 10m of a landing.
Added CH6 tuning for accel based throttle controller.
2012-12-06 10:31:20 +09:00
rmackay9 3cbef57c64 ArduCopter: first merge of leonard's accel based altitude controller plus other changes from Randy
Changes include:
New low-level get_throttle_accel function takes target acceleration and compares vs earth-frame Z accelerometer values to produce output to motors.
Higher level throttle controllers modified to call new get_throttle_accel controller
Throttle_rate_stabilized controller added which maintains a desired climb/descent rate
Throttle_land controller added - descends using normal auto throttle controller to 10m then descends at 50cm/s
Multiple throttle modes added including landing mode
Land flight mode no longer needs GPS
Throttle cruise maintenance moved to update_throttle_cruise function
2012-12-06 10:30:49 +09:00
Robert Lefebvre 6b8c39dd10 ACM: Creating Yaw_Look_Ahead yaw mode.
This function is not fully tested yet.
2012-11-26 21:37:13 -05:00
Andrew Tridgell bcf740a82f ACM: support 16 character parameter names 2012-11-20 21:38:58 +11:00
Jason Short d2a5928c06 Ap state updates 2012-11-09 22:15:15 -08:00
rmackay9 1f801714e8 ArduCopter: incorporate new version of inertial navigation
Moved several navigation functions from ArduCopter.pde to navigation.pde
2012-11-07 19:21:31 +09:00
rmackay9 a1b4ec6d0e ArduCopter: move to use new INS library instead of IMU library 2012-11-07 19:21:09 +09:00
Andrew Tridgell 9592be5af7 ACM: saved some more memory for strings 2012-10-22 18:57:08 +11:00
Robert Lefebvre 592f4040fd Changed RLT Yaw Mode for TradHeli. Also a few comment cleanups. 2012-10-18 16:39:05 -04:00
rmackay9 95763e610b ArduCopter: allow DMP to run in parallel with DCM
Parallel DMP can be enabled by #define SECONDARY_DMP_ENABLED in APM_Config.h
New DMP dataflash log type added to allow easy comparison with DCM
2012-09-30 00:25:40 +09:00
rmackay9 bae53807b2 ArduCopter: tiny formatting change in defines.h 2012-09-27 17:40:54 +09:00
Jason Short 34e07c826f ACM : Added centralized Iterm logging at a lower rate. Logs all iterms. 2012-09-10 20:26:48 -07:00
uncrustify b9ba41c12a uncrustify ArduCopter/defines.h 2012-08-21 18:57:21 -07:00
Jason Short 11b7475ff9 ACM : Added CH7 multimode triggers, split Toy mode into two 2012-08-11 22:37:26 -07:00
Jason Short 07bd1940e7 ACM Defines.h -added Toy mixer enums 2012-08-09 16:59:43 -07:00
rmackay9 014f5aae99 ArduCopter: added DMP_ENABLE #define and CH6 tuning value for AHRS_KP 2012-07-28 14:21:07 +09:00
Andreas M. Antonopoulos c73f7ef3ab AP_Limits library, provides modular "limits" such as altitude and geo-fencing. 2012-07-14 19:26:17 -07:00
Jason Short ab564b8a86 defines.h
removed Approach mode enumeration
2012-07-01 13:40:11 -07:00
Jason Short 0011190880 defines.h: Toy Mode defines for flight modes 2012-06-29 21:20:28 -07:00
Jason Short 5e4d28baf0 Added Toy mode to navigation 2012-06-29 21:20:27 -07:00
Jason Short 807c4ced34 Added Toy Mode defines 2012-06-25 23:08:25 -07:00
Robert Lefebvre 30e55533dc Change to increase Parameter space as we have run out.
This will decrease the max number of waypoints from 186
to 169.
2012-05-30 20:41:53 -04:00
Robert Lefebvre a285e2779f CopterLEDS changes for APM2 2012-05-15 10:07:03 -04:00
Andrew Tridgell 4fee26437b MAVLink: make ACM build with MAVLink 1.0 possible in arduino GUI 2012-04-24 22:24:58 +10:00
Adam M Rivera 97040a7b3a Merge branch 'master' of https://code.google.com/p/ardupilot-mega into auto-approach 2012-04-23 00:03:37 -05:00
rmackay9 c993049c48 ArduCopter - combined CH6_DAMP and CH6_STABILIZE_KD tuning parameters to avoid confusion 2012-04-21 23:24:57 +09:00
Adam M Rivera a3842734a9 Planner/defines.h: Updated the enumeration value for APPROACH so as not to disturb the order of the universe. 2012-04-18 10:32:01 -05:00
Adam M Rivera f9affb3295 Merge branch 'master' of https://code.google.com/p/ardupilot-mega into auto-approach
Conflicts:
	ArduCopter/Parameters.h
2012-04-16 10:23:01 -05:00
rmackay9 870b5e5f75 ArduCopter - CH6 Tuning - added AHRS_YAW_KP parameter as 30. Now you can easily set the amount that the mag is used to correct the gyro based yaw estimate in the DCM 2012-04-16 23:47:57 +09:00
Adam M Rivera 83fe6733d4 Defines: Added new control mode (APPROACH). 2012-04-15 16:52:32 -05:00
rmackay9 d70f5da5e0 ArduCopter - LEDS - define pins to be used for COPTER_LEDS.
Code by Robert Lefebvre
2012-04-12 22:55:36 +09:00
rmackay9 0efb0e5b4d ArduCopter - added CH6_STABILIZE_KD tuning value 2012-03-29 21:09:41 +09:00
rmackay9 599cea21bb Added multiple new tuning parameters to the inflight channel 6 tuning feature:
#define CH6_YAW_KI 24
        #define CH6_ACRO_KP 25
        #define CH6_YAW_RATE_KD 26
        #define CH6_LOITER_KI 27
        #define CH6_LOITER_RATE_KI 28
2012-03-28 23:58:58 +09:00
rmackay9 1f4cfb9333 ArduCopter - added PID log type. Implemented for Yaw stabilize and rate controllers. 2012-03-25 16:09:08 +09:00
Andrew Tridgell 547b4ed55b AHRS: adapt ArduCopter for new AHRS framework 2012-03-19 17:29:02 +11:00
Jason Short cb8729109c ACM: Added Loiter_D for tuning as #23 2012-03-10 14:17:16 -08:00
Andrew Tridgell 9a06d35772 make 'ENABLE' and 'ENABLED' mean the same things
users get this wrong far too often!
2012-03-10 10:34:33 +11:00
Andrew Tridgell 2596acc8eb ACM: removed incorrect mode definition 2012-03-10 10:34:30 +11:00
Andrew Tridgell a0ce202d87 ACM: added SIMSTATE, DCM and HWSTATUS messages to ACM 2012-03-10 10:34:27 +11:00
Jason Short 0ce0c7c262 Added Loiter_rate_tuning 2012-02-26 11:33:36 -08:00
Andrew Tridgell 6929226b96 ACM: expanded EEPROM parameter area by 256 bytes 2012-02-18 10:51:57 +11:00
Jason Short 0075901f77 upped rate loop to 250hz 2012-02-17 15:23:59 -08:00
Andrew Tridgell 617082769a go back to 1024 bytes for variables in EEPROM 2012-02-13 16:22:52 +11:00
Andrew Tridgell 16417b651e the ACM parameters have a max size of 1114 bytes
to ensure that all parameters can be saved, expand parameter area by
256 bytes
2012-02-13 16:22:52 +11:00
Pat Hickey 470fd8788e ArduCopter Channel Config: config vars for user override of MOT_n mapping
* config variable CONFIG_CHANNELS has possible values
  CHANNEL_CONFIG_DEFAULT or CHANNEL_CONFIG_CUSTOM
* config_channels.h only provides APM1/APM2 mapping when
  CONFIG_CHANNELS == CHANNEL_CONFIG_DEFAULT
2012-02-11 16:05:51 -08:00
Pat Hickey b245265669 Arducopter Frames: revert to old HEXA_FRAME and OCTA_FRAME defines.
* HEXA_X_FRAME and HEXA_PLUS_FRAME merged back into HEXA_FRAME
* OCTA_V_FRAME merged back into OCTA_FRAME
2012-01-31 18:18:13 -08:00
Pat Hickey 0e9294538b Add Max's changes for new MOT mappings. Defines new FRAME_CONFIG types.
* HEXA_FRAME has been eliminated and changed to HEXA_X_FRAME and
  HEXA_PLUS_FRAME
* OCTA_FRAME stays the same name for X and +, but the V frame
  configuration requires new OCTA_V_FRAME name.
2012-01-31 18:18:13 -08:00
Jason Short f225efef9f tuning 2012-01-30 21:13:03 -08:00
Randy Mackay 122623f64b OpticalFlow - added OF_LOITER flightmode 2012-01-28 09:27:16 +09:00
Randy Mackay 2c906b7b27 OpticalFlow - replaced PI controller with PID controller.
Modified optical flow hold to use aggregated position instead of speed.
2012-01-25 21:55:14 +09:00
Michael Oborne 1bebb9452b AC sync battery code with arduplane 2012-01-21 06:29:09 +08:00
Doug Weibel ed9f7cb1b6 Update battery monitoring code for ArduCopter
Fixes compatibility for APM2.  Also a significant update to the battery monitoring code:  We previously had monitoring modes for individual cell voltages for 3 and 4 cell lipos.  These have been removed as they were never really supported (the cell voltages were computed but were not reported or recorded anywhere).  Also, some clean-up/prep work was done for supporting monitoring 2 separate battery packs.  The CLI battery and current monitoring tests were consolidated into 1 test.
changed
2012-01-15 17:10:02 -07:00
Jason Short dab4fb43d4 Added altitude change flags 2012-01-10 23:42:26 -08:00
Randy Mackay f68d23d91e ArduCopter - added ROLL_PITCH_STABLE_OF (i.e. Stabilised Roll/Pitch + adjustments based on optical flow)
Removed optical flow from regular loiter for now until it's tested.
2012-01-09 13:53:54 +09:00
Jason Short faa9dd43cf scaled to 0-1023 2012-01-06 21:43:37 -08:00
Jason Short b28ae04e0d Removed unused options 2012-01-04 09:28:36 -08:00
Jason Short 244ca98264 Added Dampening term for tuning 2011-12-29 23:02:02 -08:00
Jason Short ca8f71a705 used for testing 2011-12-23 14:42:50 -08:00