Commit Graph

1193 Commits

Author SHA1 Message Date
tridge60@gmail.com 6b0c938176 CLI: make it possible to completely disable the CLI
set CLI_ENABLED to DISABLED for no CLI. This saves a lot of memory

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2895 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:34:05 +00:00
tridge60@gmail.com e6d9a6921a HIL: don't access dcm functions in HIL mode
the dcm is not valid in HIL_MODE_ATTITUDE

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2894 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:33:53 +00:00
tridge60@gmail.com 863e77677e HIL: enable reception of GPS and ATTITUDE via MAVLink
this allows us to get GPS position and ATTITUDE in HIL_MODE_ATTITUDE

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2893 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:33:42 +00:00
tridge60@gmail.com 93a8deac7d HIL: send location information
we don't send MSG_LOCATION in HIL mode during GPS updates, as we don't
call the GPS update routines, so we need to send MSG_LOCATION as part
of the Position stream

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2892 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:33:33 +00:00
tridge60@gmail.com aff9e9a831 HIL: when in HIL_MODE_ATTITUDE, we get altitude from gps setHIL
we need to skip the barometer and sonar calls

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2891 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:33:17 +00:00
tridge60@gmail.com eb2a6403e0 don't force config in default APM_Config.h
defaults for these are already in config.h, but protected with #ifndef
wrappers. The #ifndef wrappers are useful to allow users to have
makefile targets for different configs, so you can (for example), do
"make heli" with a local makefile

This makes it easier for developers to ensure that all configs build
correctly

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2890 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:33:09 +00:00
tridge60@gmail.com df6a1b51f3 make a lot more functions and variables static
this saves about 1k of code space through better compiler optimisation

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2889 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:32:00 +00:00
tridge60@gmail.com 0b1262a685 make main variables and functions static
this makes most of the variables and functions in the main
ArduCopterMega.pde code static, which allows the compiler to optimise
better, and exposes unused variables as compiler warnings

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2888 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:31:46 +00:00
tridge60@gmail.com f9105a056e logging: moved the default log_bitmask calculation to compile time
this saves a little bit of code by moving the calculation of the
default log bitmask to compile time from runtime

(merge from APM)

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2887 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:31:17 +00:00
tridge60@gmail.com 8a7466d1a2 make it possible to completely disable logging
set LOGGING_ENABLED  to DISABLED to disable all logging. This saves
about 10k of flash when disabled.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2886 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:31:07 +00:00
tridge60@gmail.com fdf090b471 allow flight modes to be setup over MAVLink
this adopts the same method of setting up flight modes over MAVLink as
APM now has

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2885 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:30:53 +00:00
tridge60@gmail.com 855b88852e fixed a bunch of compiler warnings
mostly signed/unsigned warnings

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2884 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:30:21 +00:00
mich146@hotmail.com 8aad21fcc8 add level command via mavlink, and fix fall through
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2877 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 00:14:50 +00:00
jasonshort b6db64f9be 2.0.36
Added Yaw control when descending in Alt hold
lowered kP & kD for Alt hold a tad
Adjusted RTL behavior to do speed control up to 4m to home, then go into Loiter
Fixed issue with AUTO not getting proper input.
Added Limit to high side of motors

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2874 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-16 23:08:07 +00:00
jasonshort df26281296 2.0.36
Added Yaw control when descending in Alt hold
lowered kP & kD for Alt hold a tad
Adjusted RTL behavior to do speed control up to 4m to home, then go into Loiter
Fixed issue with AUTO not getting proper input.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2873 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-16 22:32:54 +00:00
jasonshort af8afecbb8 2.0.36
Added Yaw control when descending in Alt hold
lowered kP & kD for Alt hold a tad
Adjusted RTL behavior to do speed control up to 4m to home, then go into Loiter


git-svn-id: https://arducopter.googlecode.com/svn/trunk@2872 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-16 22:12:52 +00:00
jasonshort 05c058148b tweaked WP speed so long distances wont blow up equation.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2871 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-16 22:02:47 +00:00
jasonshort 59023505f9 Added in limit for alt hold to prevent I term run up.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2870 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-16 21:53:47 +00:00
jphelirc 24abae3c6d ESC setup notes
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2847 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-14 02:52:08 +00:00
jasonshort f46647d8b8 minor cosmetics
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2846 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-14 02:01:51 +00:00
tridge60@gmail.com 48f010f80c compass: fixed a compiler warning
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2844 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-13 09:10:24 +00:00
tridge60@gmail.com a9278b6fcd build: added EXTRAFLAGS to make rules
this allows you to create a local makefile like this:

 include Makefile

 hil:
	make -f Makefile EXTRAFLAGS="-DHIL_MODE=HIL_MODE_ATTITUDE -DSERIAL3_BAUD=115200"

and then use 'make hil'

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2843 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-13 09:07:09 +00:00
jasonshort b7b0212506 Cleaned up or reverse code.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2842 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-13 05:54:40 +00:00
jasonshort 100e3bac60 2.0.35
Added camera reversing parameters in AP_Var
Added RTL Throttle Hold set/check
Added dynamic speed control to slow down as you reach waypoints and RTL Home
upped Yaw Dead zone slightly.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2841 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-12 20:04:15 +00:00
jasonshort bdcd0e2e37 Added Scaling to yaw response on Auto, RTL, and Guided modes
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2837 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-11 00:54:00 +00:00
jasonshort 35bf288abd New PIDs - I rewrote the control laws from scratch to add a PI Rate function. The end result should fly nearly identically to the current version. The nice detail is that we can use NG PID values for easy transition!
Before: ->  After
Stabilize P –> Stabilize P (Use NG values, or 8.3 x the older AC2 value)
Stabilize I –> Stabilize I (Stays same value)
Stabilize D –> Rate P (Stays same value)
–> Rate I (new)
 
Added a new value – an I term for rate. The old stabilization routines did not use this term. Please refer to the config.h file to read more about the new PIDs.
Added framework for using DCM corrected Accelerometer rates. Code is commented out for now.
Added set home at Arming.
Crosstrack is now a full PID loop, rather than just a P gain for more control. 
Throttle now slews when switching out of Alt hold or Auto modes for less jarring transitions
Sonar and Baro PIDs are now combined into a throttle PID Yaw control is completely re-written.
Added Octa_Quad support - Max



git-svn-id: https://arducopter.googlecode.com/svn/trunk@2836 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-11 00:47:08 +00:00
tridge60@gmail.com 165643c307 fixed 5843 detection code
we were looking for the wrong regA value

Thanks to Chris for the debugging help! (and happy birthday!)

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2828 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-09 22:27:15 +00:00
tridge60@gmail.com 7b803a9e1a compass: added error checking on I2C transactions
this adds error checking to all operations on the compass, to ensure
that we don't accept invalid data

This also fixes the calibration values for the 5883L to match the
recommended values in the spec

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2815 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-09 12:10:00 +00:00
tridge60@gmail.com 488a2805f7 mavlink: fixed a signed/unsigned warning
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2814 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-09 12:09:50 +00:00
jasonshort a16b00b5bf Added heavily filtered Accelerometer values for experimentation.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2779 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-08 03:58:19 +00:00
jasonshort 5e163c6052 added ki_Yaw private variable and accessors.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2778 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-08 03:57:12 +00:00
jasonshort 0d31d9be10 Added a limit to the atan function to calc the heading. Just trying to avoid, bad values screwing up the DCM. - Jason
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2777 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-08 03:56:04 +00:00
jasonshort 38cf90ae58 AC 2.0.33 Beta
Slighted tuned down D term in Loiter PIDs after testing, tuned up P slightly
fixed alt hold bug cause when gaining 3D lock in alt hold.
Mavlink now reports correct throttle scaling value in mavlink


git-svn-id: https://arducopter.googlecode.com/svn/trunk@2746 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-04 06:40:37 +00:00
jasonshort 659b520912 AC 2.0.33 Beta
Slighted tuned down D term in Loiter PIDs after testing, tuned up P slightly
fixed alt hold bug cause when gaining 3D lock in alt hold.
Mavlink now reports correct throttle scaling value in mavlink


git-svn-id: https://arducopter.googlecode.com/svn/trunk@2745 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-04 06:37:29 +00:00
deweibel@gmail.com 4015e7f91a Commit test - just adding an unneeded comment
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2740 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-03 19:39:55 +00:00
tridge60@gmail.com 90b0d769f8 compass: fixed normal operation mode change for 5883L
We need to set the right rates after config too. Thanks to Randy for
spotting this one

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2737 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-03 12:00:45 +00:00
tridge60@gmail.com d46536e142 compass: fixed output rate and averaging for 5883L
we need to setup the right output rate, or the compass gets very laggy

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2736 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-03 08:32:58 +00:00
deweibel@gmail.com 0df8daeaed Correct bug in CLI log "enable all" command.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2733 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-03 01:58:41 +00:00
jasonshort a7a4f999e3 AC 2.0.32 Beta
new Loiter PIDs
tuned down control on standard frame
shunk the mixing range for sonar from 3 meters to 2 meters
added framework for Guided mode - not tested!
removed pitch and roll deadzone
decoupled SIMPLE mode from LOITER PIDs
Synced Mavlink with APM
Logs report correct WP number now.
disabled Sonar spike filter.


git-svn-id: https://arducopter.googlecode.com/svn/trunk@2722 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-02 22:44:59 +00:00
tridge60@gmail.com 2605c4b4b2 AP_Compass: fixed calibration of 5883L compass
this fixes a compass initialisation bug where if the first value from
the compass isn't in the right range we would set bad calibration
scaling factors.

This also changes the maximum acceptable calibration values to 2000,
which is needed for the 5883 compass

pair-programmed-with: Randy Mackay

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2718 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-02 11:31:38 +00:00
tridge60@gmail.com c78da666ec AP_Compass: report compass initialisation failure
don't just put out rubbish values

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2717 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-02 11:31:27 +00:00
rmackay9@yahoo.com d310744bfc AP_Compass_test - added display to auto detected compass
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2716 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-01 16:26:27 +00:00
jasonshort cf0a068f7c Fixed bug in alt hold caused by false Sonar readings.
Reverted to prior Rangefinderlib in case that was causing bad sonar readings.
reduced crosstrack gains and max angle to avoid overshoots and oscillations.
added additional D gain to Loiter hold to prevent overshoots
added D gain to WP_nav to avoid speed oscillations
upped navigation speed to 6m/s from 4.5m/s


git-svn-id: https://arducopter.googlecode.com/svn/trunk@2710 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-01 00:19:10 +00:00
jasonshort 00222a2e20 temporally revert to prior version of Sonar class to narrow in on a bug.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2708 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-30 22:32:26 +00:00
rmackay9@yahoo.com 8ce403cbe4 AP_Compass - added auto detect of 5843 vs 5883L to AP_Compass_HMC5843 class
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2700 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-28 16:47:53 +00:00
rmackay9@yahoo.com da7a13128a AP_Compass - added auto detect of 5843 vs 5883L to AP_Compass_HMC5843 class
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2699 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-28 16:30:42 +00:00
jasonshort 203bc4643d clean up to work better with the Mission planner and enable Camera control.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2697 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-28 06:31:18 +00:00
jasonshort 09c02ed44f changed camera stabilization to 1 instead of ENABLED
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2696 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-27 19:57:40 +00:00
jasonshort f9c402f0f3 2.0.29
Fixed Mavlink issue
Added look at home option for SIMPLE mode. Off be default. Untested.
Upped performance of Yaw.


git-svn-id: https://arducopter.googlecode.com/svn/trunk@2695 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-27 17:01:53 +00:00
jasonshort 418a4b3903 removed redundant FP calcs for speed up.
added ability to alternate normalization and drift correction. Not fully implemented, needs further testing.


git-svn-id: https://arducopter.googlecode.com/svn/trunk@2691 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-26 22:54:08 +00:00