Commit Graph

1850 Commits

Author SHA1 Message Date
rmackay9
bd0e018ca0 ArduCopter: restore auto-trim method but now use AHRS.add_trim 2013-01-02 09:20:08 +11:00
Craig@3DR
e350bfbba8 Removed 2 more degree symbols from comments 2013-01-02 09:20:08 +11:00
rmackay9
b786cf40f7 ArduCopter: change GPS dataflash message to output unfiltered gps lat and lon 2013-01-02 09:19:39 +11:00
rmackay9
d3cbf733ba ArduCopter: ensure RTL performs a land if a failsafe has been triggered 2013-01-02 09:19:39 +11:00
Robert Lefebvre
6e64b1b357 ACM: Precision Loiter RePositioning code.
Protected behind a #define
2013-01-02 09:19:39 +11:00
rmackay9
0fa6fdf407 ArduCopter: remove unused wait_for_yes function 2013-01-02 09:19:39 +11:00
rmackay9
e6519330f4 ArduCopter: remove unused rc_override variables to save 21 bytes 2013-01-02 09:19:17 +11:00
rmackay9
396024e802 ArduCopter: move scaleLongUp and scaleLongDown initialisation to init_home 2013-01-02 09:19:17 +11:00
rmackay9
7a5e4b8549 ArduCopter: stop unnecessary updates of target altitude and knock-on effect of too many EV message in dataflash log 2013-01-02 09:19:17 +11:00
rmackay9
1b5ff6aac6 ArduCopter: restore initial climb to RTL 2013-01-02 09:19:17 +11:00
rmackay9
52802cb29e ArduCopter: limit output throttle to 800 only for TRI which does not have the new stability patch 2013-01-02 09:19:17 +11:00
rmackay9
34e18ae12a ArduCopter: increase accel based throttle PIDs and add D term to rate based throttle 2013-01-02 09:19:17 +11:00
rmackay9
ac8af9a53f ArduCopter: Leonard Hall's changes to alt hold including adding low pass filter to climb rate
get_throttle_rate_stabilized changed to simply update the target altitude instead of talking directly to the rate controller.
get_throttle_althold changed to use sqrt of distance when calculating the desired rate towards the target altitude.
added reset of accel based throttle PID's I term.
unrelated small bug fix from Randy to allow CH6 tuning of throttle rate D term.
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
Robert Lefebvre
9605bd8ee1 ACM: Trying to set a default MPU6K filter rate of 10Hz for TradHeli. Doesn't Work. 2013-01-02 09:14:55 +11:00
rmackay9
d926360e81 ArduCopter: move gcs updates to run only when there are 4ms of spare time before the next 100hz iteration starts 2013-01-02 09:14:31 +11:00
rmackay9
881dae1e27 ArduCopter: remove throttle limit of 800 for quads, hexas and octacopters
Note: Y6 and OctaQuads still have the 800 limit because they do not have the latest stability patch
2013-01-02 09:13:42 +11:00
rmackay9
6da68c53a5 ArduCopter: bug fix so AP_Limits does not use up memory if it is disabled 2013-01-02 09:13:42 +11:00
rmackay9
d8e3d5c10c ArduCopter: allow RTL's yaw mode to be overridden with a #define in APM_Config.h 2013-01-02 09:12:40 +11:00
rmackay9
5633164fa0 ArduCopter: bug fix for compass.accumulate check in main loop (millis vs micros issue) 2013-01-02 09:12:40 +11:00
rmackay9
50d46898fb ArduCopter: allow GUIDED mode roll-pitch, yaw and throttle control modes to be overridden 2013-01-02 09:12:17 +11:00
rmackay9
ddc578fd18 ArduCopter: restore YAW to default AUTO_YAW mode instead of YAW_LOOK_AT_NEXT_WP mode 2013-01-02 09:12:17 +11:00
rmackay9
0ab82f8c4e ArduCopter: clear ahrs roll and pitch trims after an accel level command 2013-01-02 09:12:17 +11:00
rmackay9
7ea34d4fb7 ArduCopter: updated accel based throttle to use ahrs's get_accel_ef method
Also removed slow low pass filter meant to correct for accelerometer calibration.  This is no longer required now that we have the improved calibration method.
2013-01-02 09:11:25 +11:00
rmackay9
4dfe3a2d73 ArduCopter: remove weird character from navigation.pde 2013-01-02 09:11:25 +11:00
Robert Lefebvre
ab95f04a91 ACM: TradHeli
Change name of attitude rate feed-forward parameters.
2013-01-02 09:10:40 +11:00
rmackay9
8e032b89ee ArduCopter: create 2.9 branch and update firmware version 2013-01-02 09:10:40 +11:00
Andrew Tridgell
cf8e648558 CLI: fixed accel setup
disable mavlink callback in CLI
2012-12-24 08:51:33 +11:00
Andrew Tridgell
9931009db2 Math: use pythagorous2() in some more places 2012-12-20 15:16:18 +11:00
Andrew Tridgell
78d98023f4 Copter: remove use of 'byte' 2012-12-20 14:58:07 +11:00
Pat Hickey
1878290510 ArduCopter: fixes for AP_InertialSenor_UserInteract 2012-12-20 14:53:23 +11:00
Andrew Tridgell
3c0440b0b4 Math: use common degrees() and radians() functions 2012-12-20 14:53:22 +11:00
Andrew Tridgell
06357c40f2 Copter: use new functions 2012-12-20 14:53:22 +11:00
Pat Hickey
2ad4fed8cd Rover/Copter/Plane: change from vsnprintf to vsnprintf_P 2012-12-20 14:52:38 +11:00
Pat Hickey
54b98c0a7c ArduPlane: use hal's vsnprintf 2012-12-20 14:52:37 +11:00
Andrew Tridgell
a02f723f3a Copter: fixed HIL builds 2012-12-20 14:52:37 +11:00
Andrew Tridgell
2e8e84ba8b Copter: switch to using targets.mk 2012-12-20 14:52:36 +11:00
Pat Hickey
eb530b86e8 move Arduino.mk to /mk/Arduino.mk 2012-12-20 14:52:35 +11:00
Andrew Tridgell
9e986801c9 Copter: fixed SITL for ArduCopter 2012-12-20 14:52:34 +11:00
Andrew Tridgell
08b1c2d590 Copter: fixed GPS init 2012-12-20 14:52:33 +11:00
Pat Hickey
9a28ed2df6 ArduCopter: refactor Makefile targets in terms of Arduino.mk targets 2012-12-20 14:52:31 +11:00
Andrew Tridgell
7d27e420ae AP_HAL: remove unnecessary Arduino.h includes 2012-12-20 14:52:30 +11:00
Pat Hickey
22ac39a4ef ArduCopter: disable and remove InertialNav defines from APM_Config
* We're not going to have the RAM available to support those in general release
2012-12-20 14:52:29 +11:00
Pat Hickey
d5d97be837 ArduCopter: add param loader properly implement parameters
* thanks tridge!
2012-12-20 14:52:29 +11:00
Pat Hickey
5e63491994 ArduCopter: fix issues with HAL/HIL mixup and baro/compass instances 2012-12-20 14:52:29 +11:00
Pat Hickey
21d0da84a6 ArduCopter: temporarily disable AP_Param::setup_sketch_results
* rebased away tridge's AP_Param changes as they seemed possibly buggy?
2012-12-20 14:52:29 +11:00
Pat Hickey
a0151aa66c ArduCopter: fix cliSerial null ptr, do AP_Param::setup_sketch_defaults
* plus make SITL DataFlash available.
2012-12-20 14:52:29 +11:00
Pat Hickey
1e48d0fc69 Makefile Targets rewritten to use per-target extension style 2012-12-20 14:52:29 +11:00
Pat Hickey
524e52f449 ArduCopter: changed makefile to inherit environments properly 2012-12-20 14:52:29 +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
Pat Hickey
ade7099d75 ArduCopter: add AP_HAL_MAIN 2012-12-20 14:52:28 +11:00
Pat Hickey
5bd7046a95 ArduCopter: sketch cpp builds! 2012-12-20 14:52:28 +11:00
Pat Hickey
8b49208771 ArduCopter: some fixes 2012-12-20 14:52:28 +11:00
Pat Hickey
13c044ab3e ArduCopter: fixes to radio.pde 2012-12-20 14:52:28 +11:00
Pat Hickey
7af03127f6 ArduCopter: more work 2012-12-20 14:52:28 +11:00
Pat Hickey
b90889dd11 ArduCopter: add ArduPlane's compat.h & compat.pde 2012-12-20 14:52:28 +11:00
Pat Hickey
70f4739522 ArduCopter: more fixes 2012-12-20 14:52:28 +11:00
Pat Hickey
4b84e99f85 remove dumb user hooks comments 2012-12-20 14:52:28 +11:00
Pat Hickey
901c692ee3 arducopter: type fix 2012-12-20 14:52:28 +11:00
Pat Hickey
f281d9265e ArduCopter: reworked sonar analog source creation 2012-12-20 14:52:28 +11:00
Pat Hickey
d9e0bbbbab ArduCopter: first pass at AP_HAL porting
* changed all the byte types to uint8_t
* fixed up much of the serial stuff
2012-12-20 14:52:27 +11:00
Pat Hickey
b7a7eceef8 ArduCopter: add nocore.inoflag and Arduino.h 2012-12-20 14:51:40 +11:00
Pat Hickey
ada10f6eb2 ArduCopter: change comment references to AP_Var to AP_Param
* jsut to clean up the grep for "AP_Var"
2012-12-20 14:51:31 +11:00
Pat Hickey
a4f1f6a5db AP_Progmem: fix dependencies for all sketches touched by AP_HAL_AVR 2012-12-20 14:51:28 +11:00
Pat Hickey
3f1d9d7f69 AP_Param: #include <AP_Param.h> fixups for libraries & sketches
* I mostly went through with grep and added an #include <AP_Param.h> below
  every #include <AP_Common.h>. Not all of these example sketches might
  strictly need AP_Param.
2012-12-20 14:51:19 +11:00
Jason Short
0419dc8dfd ACM: Simplified control mode code 2012-12-14 13:30:48 -08:00
Jason Short
19ae5c30eb ACM : Formatting 2012-12-13 20:12:39 -08:00
rmackay9
52177c63f7 ArduCopter: only attempt to change settings of optical flow sensor if it has been successfully initialised 2012-12-11 00:14:29 +09:00
rmackay9
af77425636 ArduCopter: fix Failed to Init Optflow message at startup 2012-12-11 00:09:45 +09:00
rmackay9
2f748f8382 ArduCopter: renamed BATT_FAILSAFE to FS_BATT_ENABLE 2012-12-10 23:47:14 +09:00
rmackay9
d31efebd44 ArduCopter: rename throttle failsafe parameters.
Switch to LAND flight mode if throttle failsafe triggers and we do not have a GPS.
THR_FAILSAFE renamed to FS_THR_ENABLE.
THR_FS_VALUE renamed to FS_THR_VALUE.
THR_FS_ACTION removed (action is now controlled by setting FS_THR parameter).
2012-12-10 23:38:43 +09:00
rmackay9
2f1b2b70e6 ArduCopter: added ACRO_TRAINER parameter to allow enabling/disabling the acro training function which will bring the roll back to within +- 45 degrees 2012-12-10 22:27:46 +09:00
rmackay9
dadad8677e ArduCopter: added descriptions for most parameters that did not have them
Renamed loiter_radius to circle_radius to better reflect it's purpose.
Removed some unused parameters including WP_MODE, WP_MUST_INDEX, LOG_LASTFILE, AXIS_P
2012-12-10 21:45:57 +09:00
rmackay9
f522ef078e ArduCopter: remove unused functions do_target_yaw, do_loiter_at_location, get_altitude_error and clear_new_altitude 2012-12-10 17:30:50 +09:00
rmackay9
047f848cc7 ArduCopter: remove ThirdOrderCompFilter from list of includes 2012-12-10 09:14:44 +09:00
rmackay9
154e3c33f7 ArduCopter, AP_InertialNav: consolidated ThirdOrderComplementaryFilter into AP_InertialNav to save about 200bytes of RAM 2012-12-10 00:43:11 +09:00
rmackay9
cfe2507c0b ArduCopter: reduce Rate Roll/Pitch P to 0.150 (was 0.175) and increase I to 0.1 (was 0.01) 2012-12-09 18:08:45 +09: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
9a05d3bd36 ArduCopter: add comments at the top of many navigation functions 2012-12-09 15:50:50 +09:00
rmackay9
8c2423f618 ArduCopter: code clean-up. Changed update_nav_wp to use a switch statement and relocated to navigation.pde 2012-12-09 15:24:19 +09:00
rmackay9
b36eb406d4 ArduCopter: allow alt hold to be engaged with alt < 1m because sometimes we get baro drift.
Also initialisation of target altitude is done in set_throttle_mode function.
2012-12-09 14:48:01 +09:00
rmackay9
b4e5176e2a ArduCopter, AP_InertialSensor: restore mpu6k sample rate to 200hz but keep default filtering at 42hz. 2012-12-09 14:27:33 +09:00
Robert Lefebvre
aa4d4f8c24 ACM: Adding Pre-Compiler Define for Stabilize Throttle Mode. 2012-12-08 20:41:05 -05:00
Robert Lefebvre
0eb57bf93d ACM: TradHeli
Fix to make update_throttle_cruise work with stab_throttle scaling.
2012-12-08 15:12:39 -05:00
Robert Lefebvre
1b97a92098 ACM: Code Cleanup 2012-12-08 14:49:38 -05:00
rmackay9
f98a807d36 ArduCopter: remove debug related to yaw mode used for alt hold 2012-12-08 14:24:50 +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
85c8bdce15 ArduCopter: removed unused and out-of-date #defines from APM_Config.h 2012-12-08 13:38:39 +09:00
rmackay9
68ca123224 ArduCopter: remove some unused #defines 2012-12-07 15:17:35 +09:00
rmackay9
99b32a39c4 ArduCopter: InertialNav time constant CH6 tuning changed to only update enabled axis 2012-12-07 13:01:40 +09:00
rmackay9
cca9f9dbce ArduCopter: do_set_servo fix to resolve -1 being assigned to uint8_t 2012-12-07 12:58:44 +09:00
rmackay9
3a90fc77f9 ArduCopter: add dataflash logging of camera events 2012-12-07 00:57:08 +09:00
rmackay9
d74cf54b5d ArduCopter: allow triggering of camera from a mission 2012-12-06 23:48:30 +09:00
rmackay9
d3de77f74c ArduCopter: fix do_set_servo so that it works again 2012-12-06 20:18:33 +09:00
rmackay9
653535b9a1 ArduCopter: added CH7 option to trigger camera
Restructured reading of channel 7 into a switch statement.
2012-12-06 17:47:01 +09:00
rmackay9
4ca27defb3 ArduCopter: update comments related to CH7 switch options 2012-12-06 17:40:36 +09:00
rmackay9
75401756f2 ArduCopter: maintain loiter control even below 1m while landing 2012-12-06 12:40:53 +09:00
rmackay9
2dd4694eef ArduCopter: adjusted pid_throttle_accel dt to 0.01 (100hz) 2012-12-06 10:32:12 +09:00