Commit Graph

2102 Commits

Author SHA1 Message Date
Randy Mackay ccaa7a52ef Copter: RTL bug fix to initial step is always a climb and not a descent
Also bug fix to hold yaw on take-off
2013-01-15 12:17:52 +09:00
Randy Mackay 2dab40abeb Copter: bug fix to altitude check of verify takeoff
set_next_WP function was not setting the alt_change_flag properly
2013-01-15 12:17:45 +09:00
Randy Mackay 148c227d73 Copter: update firmware version to rc5 2013-01-15 12:17:41 +09:00
Randy Mackay 04677bfb95 Copter: constrain auto roll and pitch to 45 degrees 2013-01-15 12:17:32 +09:00
Andrew Tridgell 56f22f9226 Copter: use common log reading function 2013-01-15 14:03:51 +11:00
jschall d6b3d370c3 Correct spelling of run_navigation_contollers 2013-01-14 16:45:15 -08:00
Randy Mackay 5418827f22 Copter: update parameter descriptions for FRAME and CH7_OPT 2013-01-14 15:49:26 +09:00
Randy Mackay 98f5e27dc3 Copter: small correction to RTL_ALT_FINAL param description 2013-01-14 15:21:19 +09: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
Randy Mackay df2137ed72 Copter: constrain loiter so that it never commands more than 45 degrees of lean in lat or lon directions 2013-01-14 13:34:19 +09:00
Randy Mackay fef7569dee Copter: added experimental LOITER_REPOSITIONING #define to config.h
APM_Config.h should be used to overriding the standard parameters but
they still require a definition in config.h or they will be undefined
when built by the mission planner.
2013-01-14 13:34:14 +09:00
Randy Mackay 76f032160c Copter: relax altitude check in verify_takeoff
Previously we checked if the alt > target_alt but because there is
little to no overshoot with the new accel based alt controller this
check was failing for some users.
2013-01-14 13:34:06 +09:00
Randy Mackay 8ac95d6034 ArduCopter: updated release notes for 2.9-rc4 2013-01-13 20:01:13 +11:00
Randy Mackay c1fa850d10 ArduCopter: update firmware version to 2.9-rc4 2013-01-13 20:01:09 +11:00
Randy Mackay c447b4b79b ArduCopter: move setting of land's yaw mode to the do_land function 2013-01-13 20:01:06 +11:00
Randy Mackay 08dc730d40 ArduCopter: bug fix to LAND flight mode not actually landing if initiated from failsafe
An hidden bit of failsafe functionality in the set_mode function was
switching the throttle mode back to THROTTLE_AUTO instead of
THROTTLE_LAND
2013-01-13 20:01:03 +11:00
Randy Mackay 175f69a64f ArduCopter: smooth throttle when switching from manual throttle to alt hold
new set_accel_throttle_I_from_pilot_throttle function copies the
difference between the pilot's throttle and hover throttle to the
accelerometer based throttle controller's I term.
2013-01-13 20:00:59 +11:00
Randy Mackay 9ad6f711f8 ArduCopter: replace FS_THR_RTL_MIN_DISTANCE with wp_radius
This effectively means that an RTL kicked off by a failsafe will
immediately switch to LAND mode only if within 2 meters.  Previously the
radius was much wider (15m).
2013-01-13 20:00:47 +11:00
Randy Mackay 19abdc3cd3 ArduCopter: update release notes for rc3 2013-01-13 20:00:43 +11:00
Randy Mackay 12f885c33c ArduCopter: disable ITERM logging by default
This message takes 1ms to write and we are running over our limits on
some loops.
2013-01-13 20:00:39 +11:00
Randy Mackay fbed8b8861 ArduCopter: alphabetized the contributors list
Jonathan Challinger added
2013-01-13 20:00:28 +11:00
Randy Mackay 5965914039 ArduCopter: increase firmware version to 2.9-rc3 2013-01-13 20:00:25 +11:00
Andrew Tridgell b0c710b67f Copter: move read_AHRS() before run_rate_controllers()
this ensures the rate controllers use the latest data
2013-01-13 20:00:14 +11:00
rmackay9 f25f1cb3bf ArduCopter: changed alt hold to use the sonar if enabled and healthy 2013-01-13 19:56:19 +11:00
rmackay9 21b6c78d12 ArduCopter: added get_throttle_althold_with_slew to allow slower altitude target changes
Improved surface tracking by using slewed althold controller
Reduced sonar mode filter to just 3 elements to reduce lag but at the possible consequence of allowing sonar noise to creep through for people with margin sonar set-ups.
2013-01-13 19:51:47 +11:00
Pat Hickey 164246c7d8 ArduCopter: better instructons for setup_motors cli test
* i just spent hours confused about this
2013-01-13 00:17:17 -08:00
Andrew Tridgell 72c8a14e76 Copter: fix trad heli log build 2013-01-13 17:57:47 +11:00
Andrew Tridgell 78fd5bb23f Copter: get rid of remaining Log.pde warnings 2013-01-13 17:53:39 +11:00
Andrew Tridgell 36e38eeef7 Copter: ensure ahrs.init() is called 2013-01-13 17:32:48 +11:00
Andrew Tridgell 3039c37f95 Copter: use macros from common header 2013-01-13 17:31:42 +11:00
Pat Hickey d7eeeab79e ArduCopter: fix new style Log.pde build for PX4.
randy - you should please review these changes to make sure you wanted
to have the int16_t type in all of these structs, or how you want to
convert all these other integer types to int16_t if you do need it that
way.
2013-01-12 13:11:25 -08: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
Randy Mackay 177da0ca74 ArduCopter: fixed minor bug in logging of parameter changes to dataflash
It is questionable whether we should even bother writing these to the
dataflash as there is no way to recognise which parameter has been
affectded
2013-01-13 00:15:34 +09:00
Randy Mackay b4bbae56c6 ArduCopter: reduce redundant event logging
We now only write state changes to the dataflash log when they have
changed.
Also replaced <tab> with <space> in AP_State.pde
2013-01-13 00:13:10 +09:00
Andrew Tridgell af478d52bc Copter: use the new logging methods for 2 packet types
the rest still need to be converted
2013-01-12 18:15:23 +11:00
Andrew Tridgell 0fe7901422 Copter: only print perf data when SCHED_DEBUG is non-zero 2013-01-12 12:06:40 +11:00
Andrew Tridgell dcb181d2d8 Copter: use new AP_Scheduler library 2013-01-12 12:02:57 +11:00
Andrew Tridgell 585459ece9 Copter: tweak the serial buffer sizes
we only need the large buffers for HIL
2013-01-11 10:31:55 +11:00
Andrew Tridgell 2e57720444 Copter: move memcheck_init() earlier in setup 2013-01-11 10:24:21 +11:00
Andrew Tridgell 21e979910f Copter: improved 'FRAME' docs 2013-01-10 15:44:13 +11:00
Pat Hickey 0ff6ed12b1 ArduCopter Makefile: Don't include targets.mk directly (included by apm.mk) 2013-01-09 13:15:38 -08:00
James Bielman 7374e5d84e ArduCopter: Use 16-bit arithmetic when comparing event tick counters.
- On the ARM, once the tick counter wrapped, we stopped running events
  because the wraparound case wasn't being handled correctly.  Make
  sure the comparison is 16 bits to prevent this.
2013-01-09 11:19:52 -08:00
James Bielman 7827a4a54a ArduCopter: Add AP_HAL_SMACCM support.
- Added default configuration to "config.h".
- Added main function to run under FreeRTOS with HWF4.
2013-01-09 11:19:51 -08: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 e575c5eba0 Copter: read baro at 50Hz 2013-01-09 23:46:05 +11:00
Andrew Tridgell 269804e866 Copter: use barometer.accumulate()
this gives us more consistent timing and faster baro reads on APM1
2013-01-09 23:08:19 +11:00
Andrew Tridgell 91ad870f11 Copter: check bitmask in more logging functions 2013-01-09 23:06:40 +11:00
Andrew Tridgell a237b6cc7b Copter: update for new AP_Param API 2013-01-09 13:30:58 +11:00
Andrew Tridgell 860f4b2605 Copter: merge the latest 2.9 changes into master 2013-01-08 14:37:40 -08:00
Andrew Tridgell d11dde578f Copter: a useful bit of timing debug code
enable when looking at main loop timing
2013-01-07 11:07:44 +11:00
Andrew Tridgell 647b3b09b6 Copter: ensure we process deferred mavlink messages 2013-01-07 11:07:39 +11:00
Andrew Tridgell d952ccf968 Copter: added main_loop_ready() function
this tells us when the main loop is ready to run. MAVLink won't send a
message if the main loop could run.
2013-01-07 11:07:34 +11: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
James Bielman 264db3670e AP_Baro: Add CONFIG_MS5611_SERIAL option to choose between SPI and I2C.
- Update ArduCopter and ArduPlane modules to pass the correct serial
  driver to the MS5611 driver.
- Update barometer examples, assuming SPI.
2013-01-03 13:48:06 -08:00
rmackay9 ed79e8c954 ArduCopter: correct TRIM_THROTTLE parameter comments 2013-01-03 00:39:18 +09:00
rmackay9 861a66e26e ArduCopter: remove @brief from GCS_MAVLINK class's comments because they mess up the mission planner's parsing of parameter descriptions 2013-01-03 00:34:10 +09:00
rmackay9 ba8e9c8f9e ArduCopter: revert path for reading gcs parameter descriptions 2013-01-02 23:51:27 +09:00
rmackay9 d56e9cc701 ArduCopter: change path for GCS_Mavlink parameter descriptions 2013-01-02 23:42:05 +09:00
rmackay9 4ef7e7b1c6 ArduCopter: add parameter descriptions for GCS_Mavlink objects 2013-01-02 23:36:48 +09:00
Andrew Tridgell 94e3322e24 Copter: fixed build on px4 2013-01-02 22:09:02 +11:00
rmackay9 886329898c ArduCopter: minor fixup to a few parameter descriptions 2013-01-02 18:50:25 +09:00
rmackay9 ac028cca74 ArduCopter: remove spaces to allow MP to parse RC Channel parameter descriptions 2013-01-02 18:40:59 +09:00
rmackay9 42a5d183da ArduCopter: added parameter descriptions for optflow, throttle and loiter pid controllers 2013-01-02 18:32:11 +09:00
rmackay9 ffa923981c ArduCopter: added parameter description for navigation and some throttle controllers 2013-01-02 17:44:21 +09:00
rmackay9 4a975d35ce ArduCopter: add parameter descriptions for loiter's lat and lon rate controllers 2013-01-02 17:20:58 +09:00
rmackay9 c595a1e9a2 ArduCopter: updated parameters for roll, pitch and yaw rate controllers.
Also added reference to AP_Motors_Class.cpp so that parameter descriptions can be seen in mission planner.
2013-01-02 17:05:57 +09:00
Andrew Tridgell 374af1cd14 build: change from Arduino.mk to apm.mk 2013-01-02 17:29:37 +11:00
Andrew Tridgell e56a7eacec Copter: don't pass board version to motors 2013-01-02 15:28:34 +11:00
Andrew Tridgell 394dccf9a8 Copter: make config defaults match 2.9 2013-01-02 15:27:42 +11:00
Andrew Tridgell ead38f917f Copter: use GRAVITY_MSS 2013-01-02 14:45:08 +11:00
Robert Lefebvre b9594e7123 Parameters: Fixing a typo 2013-01-01 20:13:00 -05:00
Andrew Tridgell 4236b10edc Copter: fixed board ID string 2013-01-02 10:18:05 +11:00
Andrew Tridgell 17a63dc76a Copter: fixes for AP_HAL merge 2013-01-02 09:55:55 +11:00
Andrew Tridgell 51d987a890 Copter: removed unusued variable 2013-01-02 09:55:55 +11:00
rmackay9 9b2956b377 ArduCopter: increase throttle rate P to 6.0 (was 1.0) and alt hold P to 2.0 (was 1.0) 2013-01-02 09:55:37 +11:00
rmackay9 228ad2198f ArduCopter: update firmware version to 2.9-rc2 2013-01-02 09:55:37 +11:00
rmackay9 2181ec2ab0 ArduCopter: log watchdog event to dataflash 2013-01-02 09:55:37 +11:00
rmackay9 16f99ebcab ArduCopter: fix to sub system used to record failsafe in dataflash ERR message 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 92e271e517 AP_InertialNav: increase baro delay to 0.5 sec (was 0.2sec) to allow slower baro updates on APM1 2013-01-02 09:55:37 +11:00
rmackay9 d400e5040b ArduCopter: turn on INERTIAL_NAV_Z in the config.h file so that it takes effect when built for the mission planner 2013-01-02 09:55:37 +11:00
rmackay9 daac540e08 ArduCopter: get_throttle_althold - add check to avoid divide by zero 2013-01-02 09:55:37 +11:00
rmackay9 0decd870dc ArduCopter: inertial nav - only initialise horizontal position when home is initialised 2013-01-02 09:55:37 +11:00
rmackay9 4c14010029 ArduCopter: update release notes for 2.9-rc1 2013-01-02 09:55:37 +11:00
rmackay9 576af6d487 ArduCopter: bug fix to althold desired rate calculation. Fix from Jonathan. 2013-01-02 09:55:37 +11:00
rmackay9 02bf3ea027 ArduCopter: Battery failsafe triggers RTL only if we are more than 15m from home, otherwise it performs a LAND 2013-01-02 09:55:37 +11:00
rmackay9 ff40fa6aab ArduCopter: alt hold bug fix - should use 2x linear distance when calculating the desired rate
Bug fix from Leonard.
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 393c893cdb ArduCopter: bug fix (attempt #2) for accel based throttle controller
Thanks to Jonathan for this.
2013-01-02 09:25:58 +11:00
rmackay9 e583ade62d ArduCopter: bug fix to accel based throttle controller (was using m/s instead of cm/s) 2013-01-02 09:24:31 +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
rmackay9 e850ab7ccd ArduCopter: add AUTO_VELZ_MIN, AUTO_VELZ_MAX and PILOT_VELZ_MAX to allow better control of climb/descent rate in auto and manual throttle modes 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
rmackay9 5526ca204c ArduCopter: on throttle failsafe, only initiate RTL if we are at least 15m from home 2013-01-02 09:22:51 +11:00
rmackay9 466097b383 ArduCopter: use inertial nav for current altitude and climb rate 2013-01-02 09:22:51 +11:00
rmackay9 5ba363b007 ArduCopter: move gcs_check function (which sends to ground station) to run when 50hz loop is not running
Also removed redundant heartbeat message
2013-01-02 09:21:35 +11:00
rmackay9 331a73c4ac ArduCopter: remove duplicate (?) send of MSG_EXTENDED_STATUS1 2013-01-02 09:20:08 +11:00
rmackay9 6baddf4aee ArduCopter: remove unused variable last_5hz 2013-01-02 09:20:08 +11:00
rmackay9 1f5fdcdaa8 ArduCopter: remove unnecessary "Initialising APM message..." 2013-01-02 09:20:08 +11:00
Jason Short 8b62c4630b ACM: Restore Multi-mode support 2013-01-02 09:20:08 +11:00
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
rmackay9 269e02ee93 ArduCopter: bug fix - initialise inertial nav 2012-12-06 10:32:07 +09:00
rmackay9 8d682b9812 ArduCopter: disable INERTIAL_NAV_XY by default 2012-12-06 10:32:02 +09:00
rmackay9 39d524212f ArduCopter: allow accel based throttle controller to be enabled/disabled with the new THR_ACC_ENABLE parameter.
When disabled the original velocity based throttle controller is used.
2012-12-06 10:31:57 +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 6da07ef1d2 ArduCopter: increase CONTROL_SWITCH_COUNTER so that flight mode switch must be changed for at least 1/10th of a second 2012-12-06 10:31:46 +09:00
rmackay9 072ffec493 ArduCopter: allow INERTIAL_NAV to be enabled separately for horizontal and vertical position 2012-12-06 10:31:41 +09:00
rmackay9 aa5e7e63a0 ArduCopter: switch on INS in APM_Config.h (i.e. on by default for users uploading through Arduino IDE) 2012-12-06 10:31:36 +09:00
rmackay9 bdb47c449a ArduCopter: pass linear altitude error to throttle rate controllers.
Previously the requested rate used the square root of the altitude error.

Scale pilot's desired vertical rate and acceleration based on ACCELERATION_MAX_Z and VELOCITY_MAX_Z #defines
2012-12-06 10:31:31 +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 560bb1d738 ArduCopter: removed unused AUTO_THROTTLE_HOLD #define 2012-12-06 10:31:15 +09:00
rmackay9 7035529953 ArduCopter: remove unused get_desired_climb_rate function 2012-12-06 10:31:09 +09:00
rmackay9 a94826f182 ArduCopter: add set_throttle_mode to better control initialisation of variables 2012-12-06 10:31:04 +09:00
rmackay9 1036b35128 ArduCopter: added back in angle boost and recombined for heli and multicopter 2012-12-06 10:30:55 +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 8c18a60766 ACM: Small fix to Yaw Look Ahead 2012-12-04 14:50:14 -05:00
Robert Lefebvre 1d589c0b7d ACM: TradHeli
Fixes for Attitude rate controllers.
2012-12-04 14:42:04 -05:00
Robert Lefebvre 5723021be1 ACM: TradHeli
Creating Rate Feed-Forward Parameters
2012-12-04 13:47:38 -05:00
Robert Lefebvre 3e65dd3ded ACM: TradHeli APM_Config.h changes 2012-12-04 13:32:40 -05:00
Robert Lefebvre 315a7e8000 ACM: Yaw Look Ahead Changes 2012-12-04 13:26:41 -05:00
Robert Lefebvre 9130045298 ACM: Code Cleanup 2012-11-30 17:05:12 -05:00
rmackay9 8141f0b600 ArduCopter: bug fix - increase mpu6k sample rate to 100hz 2012-11-30 23:49:18 +09:00
Andrew Tridgell 6fbf5ec8f2 Copter: update ArduCopter for new ins interface 2012-11-30 07:15:18 +11:00
Michael Oborne 68aa5e4682 AC add ability to start new accel_scale via mavlink 2012-11-28 21:38:58 +08:00
Andrew Tridgell 2949d58b71 Copter: re-enable sending of GLOBAL_POSITION_INT message
this gives important raw GPS velocity information, plus relative and
absolute height
2012-11-28 11:26:19 +11:00
Robert Lefebvre 07d7d90882 ACM: TradHeli
Bringing in Low Pass Filter for Rate Controllers
2012-11-26 21:51:23 -05: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
Robert Lefebvre 3f0e8dd358 ACM: TradHeli
Bringing in Low Pas Filter
Commented out because it does not build.
Needs updates to Low Pass Filter Lib
2012-11-26 21:21:12 -05:00
Robert Lefebvre e8d619acad ACM: Begin creation of TradHeli rate control.
May affect Multi-Rotors.
2012-11-26 21:02:41 -05:00
Robert Lefebvre 6b1fee767a ACM: TradHeli
Creating Stab_Collective Function to allow for different collective ranges between Stabilize and other modes.
This makes for a smoother collective action in Stabilize mode with manual throttle, while still allowing full collective travel in Acro and other modes.
2012-11-26 19:37:20 -05:00
Robert Lefebvre 9e45e906fb ACM: TradHeli
Move some TradHeli #defines into one place in APM_Config to clean up config.h and defines.h
2012-11-26 19:09:55 -05:00
Robert Lefebvre b32d7c8b63 ACM: TradHeli
Prevent helis from arming while RSC control is switched on.
2012-11-26 19:03:28 -05:00
Robert Lefebvre 95eeda7cf7 ACM: TradHeli
Removing Angle Boost function.
Does not make sense for helis due to aerodynamics.  Can cause more problems than it solves.
2012-11-26 18:58:21 -05:00
Robert Lefebvre 8056b78c55 ACM: TradHeli
Remove Rate I-term reset when throttle stick is on the bottom.  This could be very bad for helis since it's plausible to use full downstick while flying.
There is obviously a risk here of building up a false I-term on the ground but this isn't a good solution for that anyway.
Also removed what appears to be some deadwood.
2012-11-26 18:49:24 -05:00
Robert Lefebvre 637c9a1a72 ACM: TradHeli
Removing this "throttle" output restriction for TradHelis.
2012-11-26 18:44:03 -05:00
Andrew Tridgell 5818aaad42 Copter: fixed build error
thanks to Marco for pointing this out
2012-11-24 20:39:35 +11:00
Andrew Tridgell f6ec932d63 Copter: added reboot in CLI and over MAVLink
useful for getting out of CLI
2012-11-24 18:20:37 +11:00
Andrew Tridgell cd07d965a7 Copter: ported RSSI_PIN option from ArduPlane
this is useful for OSD users
2012-11-22 20:59:33 +11:00
rmackay9 3372355e07 ArduCopter: remove commented out remnants of roll_scale_d and pitch_scale_d 2012-11-22 12:50:39 +09:00
rmackay9 eb6d8fca57 ArduCopter: added ReleaseNotes.txt 2012-11-22 09:51:04 +09:00
Robert Lefebvre 6ffc115236 Changes to get_throttle_rate()
Commented out a bit of code that is not used currently
Change the output constrains to #defines so they can be easily changed, particularly for use in TradHeli.
2012-11-21 17:11:38 -05:00
Andrew Tridgell dbdb3e1194 ACM: allow fetch of parameters by index
this makes it more efficient to re-fetch parameters that are missing
2012-11-22 00:16:57 +11:00
Andrew Tridgell bcae83c4f6 ACM: make it possible to run CLI on radio port in ArduCopter 2012-11-21 21:41:34 +11:00
Andrew Tridgell 704da2a5d9 MAVLink: make it possible to enter the CLI over the radio
this only works on the APM2, where UART0 is also the radio port
2012-11-21 14:11:05 +11:00
Michael Oborne a5e3ce4655 remove cli planner mode - no longer used 2012-11-21 07:45:45 +08:00
Michael Oborne 0c84b8abf1 fix unit max. and unit type 2012-11-21 07:42:53 +08:00
Andrew Tridgell bcf740a82f ACM: support 16 character parameter names 2012-11-20 21:38:58 +11:00
Andrew Tridgell c008ca7560 ACM: fixed documentation of disabling voltage/current pins for ArduCopter 2012-11-20 20:26:14 +11:00