Commit Graph

4891 Commits

Author SHA1 Message Date
Andrew Tridgell c01a7718c1 Copter: fixed startup order of setting mavlink system ID 2016-10-17 09:19:08 +11:00
Andrew Tridgell 57830784e2 Copter: use handle_rc_bind 2016-10-15 21:42:38 +11:00
Andrew Tridgell 5a9276a5c4 Copter: added SYSID_ENFORCE parameter
allows enforcement of SYSID_MYGCS
2016-10-15 17:14:19 +11:00
Randy Mackay cb977bca6f Copter: 3.4-rc6 release notes 2016-10-15 12:27:04 +09:00
Randy Mackay 5894a54a16 Copter: althold uses current alt target if active
Previously we always reset the altitude target to the current altitude but this causes a jump if the vehicle is already in an alt-hold flight mode but has an altitude error
2016-10-15 11:29:10 +09:00
Leonard Hall fec24437f2 Copter: load accel throttle I term from attitude controller input
Previously we loaded up the I term from the pilot's input but a more reliable method is to get what was passed into the attitude controller.  In particular the addition of the acro-thr-mid parameter means the pilot's input must be interpreted differently for different flight modes.
2016-10-15 11:27:53 +09:00
Randy Mackay a124001b8b Copter: get_pilot_desired_throttle gets thr_mid argument default 2016-10-15 11:27:53 +09:00
Leonard Hall 5c47f3f9e5 Copter: add acro throttle and yaw expo and smoother manual pilot throttle 2016-10-15 11:27:53 +09:00
Randy Mackay 0aab175051 Copter: move proximity to g2 2016-10-14 14:02:29 +09:00
Randy Mackay fa36b563bc Copter: add advanced failsafe enable to APM_Config
No functional change
2016-10-14 14:00:59 +09:00
murata f705bd0d83 Copter: reduce intermediate storage of arming_check results 2016-10-14 11:39:18 +09:00
Jonathan Challinger 7cb9ad6e2b Copter: descend normally from 35cm 2016-10-14 10:46:11 +09:00
Jonathan Challinger f2ef8eec8c Copter: use velocity output from AC_PrecLand 2016-10-14 10:46:08 +09:00
Randy Mackay ccc99c772f Copter: remove union from aux_con for switch state 2016-10-14 10:31:05 +09:00
murata b23823a934 Copter: delete unused variable from aux switch structure 2016-10-14 10:30:41 +09:00
Andrew Tridgell ebbcabcb5f Copter: fixed comment 2016-10-14 11:40:09 +11:00
Randy Mackay 89c660eab5 Copter: add pre-arm check for proximity sensor 2016-10-13 20:21:07 +09:00
Randy Mackay 1665f4d416 Copter: report altitude and position control of new modes in sys-status message 2016-10-13 20:21:07 +09:00
Randy Mackay 4afa49eebe Copter: report proximity health in system-status 2016-10-13 20:21:07 +09:00
Randy Mackay a07ecfe2b3 Copter: log proximity sensor at 10hz
This is current in the Copter vehicle code but we can move to the dataflash library when other vehicles start using this type of sensor.  Until then adding it to common will just increase the dependencies unnecessarily for other vehicles.
2016-10-13 20:21:07 +09:00
Randy Mackay bba7369e9a Copter: pass AP_Proximity to AC_Avoid 2016-10-13 20:21:07 +09:00
Randy Mackay fcc2a1b378 Copter: integrate AP_Proximity into main vehicle 2016-10-13 20:21:07 +09:00
Randy Mackay 5f749a0597 Copter: add AP_Proximity to build 2016-10-13 20:21:07 +09:00
Andrew Tridgell 652b6b7564 Copter: deprecate RC_CHANNELS_RAW 2016-10-13 21:24:02 +11:00
Randy Mackay 26c3295042 Copter: ignore first ekf core switch
The ekf core is initialised to -1 but after initialisation changes to zero.  Ignore this first change.
2016-10-13 15:20:16 +09:00
murata f3a035694a Copter: fix ekf check to always call mode_requires_gps 2016-10-12 10:16:55 +09:00
Michael du Breuil ea45e5e6f1 Copter: Support GPS_RTCM_DATA 2016-10-11 11:00:36 +11:00
Randy Mackay 263f685683 Copter: ekf failsafe can trigger in LAND
Thanks to John Ingersoll for the report and detailed fix
Resolves issue #4827
2016-10-10 17:36:36 +09:00
Randy Mackay d74ae535d1 Copter: log EKF lane switch 2016-10-10 16:40:08 +09:00
Randy Mackay 35864c6226 Copter: move check_ekf_reset to ekf_check.cpp
No functional change
2016-10-10 16:40:08 +09:00
murata f135ca5ae7 Copter: reduce repeated string constants 2016-10-10 12:17:12 +09:00
Randy Mackay 3b6e56d1a0 Copter: minor formatting fixes
No functional change
2016-10-10 12:11:14 +09:00
murata 61fa73f25d Copter: remove return after the Switch statement 2016-10-10 12:07:24 +09:00
Randy Mackay 337461c16c Copter: pre-arm check of GPS configuration 2016-10-10 10:52:54 +09:00
murata 57c61ace62 Copter: To remove a break after the return statement. 2016-10-08 13:55:18 -03:00
murata 7148cc6239 Copter: Return value is changed to Enum Value. 2016-10-05 08:25:15 -03:00
murata 60137e0f0b Copter: replace if statement with switch statement 2016-10-05 16:32:57 +09:00
Jonathan Challinger a393bd26d7 Copter: add stick gesture to begin compass calibration 2016-10-05 16:29:02 +09:00
Lucas De Marchi b24d850695 ArduCopter: Fix use of logical op instead of bitwise op
../../ArduCopter/GCS_Mavlink.cpp: In member function 'void Copter::send_extended_status1(mavlink_channel_t)':
../../ArduCopter/GCS_Mavlink.cpp:281:37: error: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Werror=parentheses]
     uint32_t sensors_error_flags = !control_sensors_health & control_sensors_enabled & control_sensors_present;
                                     ^
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors

Thanks to Ralph Campbell <ralphcampbell1@gmail.com> for the bug report.
2016-09-29 11:36:23 -03:00
Pierre Kancir 6f79a8c37c Arducopter: simply invalid cmd msg 2016-09-27 07:45:48 -07:00
Pierre Kancir 94e42e870e ArduCopter: uniformize verify_command
Add better gcs message,
Add all handle message,
Reformate comments,

Fix do_roi comment
2016-09-27 07:45:48 -07:00
Tom Pittenger 748beb094d Copter: log to dataflash statustext messages from my_gcs 2016-09-26 00:13:30 -07:00
Randy Mackay 7091daa1cf Copter: remove out of date comment regarding autotune
no functional change
2016-09-23 20:48:03 +09:00
Peter Barker b81074d83a Copter: simplify auxsw duplicates check 2016-09-23 18:12:19 +09:00
floaledm 5910c94b65 Copter: change sensor health check to prevent false positive 2016-09-22 13:56:49 -05:00
John deVere d89b82b69f Copter: fixed parameter description typos 2016-09-14 14:05:47 -07:00
Randy Mackay 9b8b45b218 Copter: 3.4-rc5 release notes 2016-09-14 13:04:39 +09:00
Randy Mackay 9b1b18b15b Copter: add sprayer to aux switch options 2016-09-13 17:34:15 +09:00
Randy Mackay f37c17bd80 Copter: include spray in build by default 2016-09-13 15:16:13 +09:00
Randy Mackay a8f0291711 Copter: parameter conversion only for matrix multicopters
Single, Coax and Tri copter rate parameter conversions were incorrect
2016-09-13 09:44:38 +09:00
Andrew Tridgell d0dd10aeea Copter: added DEV_OPTIONS parameter
this is for little used options to allow standard firmware builds to
enable those options for development purposes

First option is for MAVLink based ADSB avoidance
2016-09-12 16:24:34 +10:00
Randy Mackay f22f10460a Copter: 3.4-rc4 release notes 2016-09-06 11:18:07 +09:00
floaledm 85a3fda879 Copter: removed reliance on home_distance and home_bearing which are only in copter 2016-09-06 11:42:33 +10:00
Leonard Hall 1f2d17e8e7 Copter: increase chance that parachute will deploy
Previously a single moment where the vehicle was within 30deg of the target could cause the parachute release counter to reset to zero.  This change makes the parachute release if it is spending at least half it's time with more than a 30degree angle error.
2016-09-06 09:43:31 +09:00
Michael du Breuil bec4bfa2ba Copter: Return RESULT_FAILED for GET_CMD_HOME if home is unset 2016-09-03 16:54:16 +09:00
Randy Mackay 4832ba4bf0 Copter: call attitude control parameter check 2016-09-02 09:27:17 +09:00
Randy Mackay 42cca17df4 Copter: update 3.4-rc3 release notes 2016-09-01 11:45:46 +09:00
Randy Mackay f6f3718e80 Copter: 3.4-rc3 release notes 2016-08-31 15:01:23 +09:00
Randy Mackay a8a31b1c24 Copter: fix health reporting to GCS for optical flow and precision landing
Includes slight restructuring to logic for other sensors but these should not have any functional effect
2016-08-31 13:59:16 +09:00
Randy Mackay cba480d02b Copter: add auto calibration to ESC_CAL parameter description
No functional change
2016-08-31 11:53:53 +09:00
Randy Mackay e17c8ac851 Copter: remove non-working reset-to-armed-yaw
Arguably we should make this work, but until that happens we should not present the option on the auxiliary switches
2016-08-29 16:34:24 +09:00
Randy Mackay eded2dee23 Copter: TELEM_DELAY parameter range to 30sec
No functional change
2016-08-29 15:29:05 +09:00
Andrew Tridgell d186e1c648 Copter: improve the reliability of ESC calibration with OneShot ESCs
run at higher rate and make sure we're always giving output
2016-08-29 15:52:21 +10:00
khancyr 733786830d Copter: config.h fix typo 2016-08-26 14:28:35 +09:00
khancyr 1a1c749501 Copter: fix typo in parameters.cpp 2016-08-26 14:28:35 +09:00
Andrew Tridgell f18e0dadc9 Copter: added optional AdvancedFailsafe for copter and heli 2016-08-25 14:14:18 +10:00
Grant Morphett 28552d5cc9 Copter: Supports COMMAND_INT in the code so added it to capabilites. 2016-08-25 12:56:32 +10:00
Andrew Tridgell ea7e62df17 Copter: use a constant string for frsky_telemetry init 2016-08-25 11:00:31 +10:00
floaledm 893614897e Copter: moved MAV_TYPE to Copter.h 2016-08-25 10:16:20 +10:00
Andrew Tridgell 96de005591 Copter: moved MAV_TYPE define to defines.h 2016-08-25 10:16:20 +10:00
Andrew Tridgell a14ff8ac77 Copter: fixes for Frsky_Telem API changes 2016-08-25 10:16:20 +10:00
Andrew Tridgell 0bcc9c4cb0 Copter: fix for AP_FrSky_Telem API change 2016-08-25 10:16:19 +10:00
floaledm baa3357b21 Copter: changed init for SPort passthrough protocol compatibility 2016-08-25 10:16:18 +10:00
floaledm 157db51b9d Copter: make control_sensor vars available outside of send_extended_status1 2016-08-25 10:16:18 +10:00
floaledm c0bd21d9f2 Copter: compatibility with revised AP_Frsky_Telem class 2016-08-25 10:16:18 +10:00
floaledm f73fa1fc80 Copter: removed frsky_telemetry_send scheduled task 2016-08-25 10:16:17 +10:00
murata 97613ef961 Copter: By multiple bit synthetic, can this method once access. 2016-08-24 11:30:23 -03:00
Gustavo Jose de Sousa b8e518a533 waf: use ap_library tool
That way we avoid recompiling source files that don't depend on vehicles.
Change notes:
- UTILITY_SOURCE_EXTS: moved to ap_library
- Task generators indexes: ap_library handles that now and in a better way
- Use of AP_STLIB_FEATURES: it doesn't make sense anymore, since the stlib
  taskgen has empty source list
- Flags and defines: passed down to ap_library through AP_LIBRARIES_OBJECTS_KW
- Set use='mavlink' in AP_LIBRARIES_OBJECTS_KW instead of calls to
  bld.ap_stlib().
2016-08-24 10:46:23 -03:00
Tom Pittenger e9d34c07d2 Copter: reduce scheduler max-time for avoid-adsb from 400 to 100 2016-08-17 22:38:54 -07:00
Tom Pittenger 5c1d49b985 Copter: add new avoidance recovery modes 2016-08-17 22:38:54 -07:00
Tom Pittenger a1bf791529 Copter: do not report collision warning when action is COLLISION_ACTION_NONE: 2016-08-17 22:38:54 -07:00
Tom Pittenger 06b64000e1 Copter: move mavlink msg handling into library 2016-08-16 16:33:36 -07:00
Tom Pittenger d04a5d58fd Copter: decode correct ADSB packet 2016-08-16 16:33:36 -07:00
Peter Barker f67d247a46 Copter: factor pre-arm checks, continue testing after a failure
The functional change here is that we continue to run later checks
when a check fails.

The user-visible effect of that is that your GCS will tell you about
all pre-arm failures, not just the first.

This makes things work a little more like Plane, in preparation for
using AP_Arming.
2016-08-16 11:37:18 -03:00
murata ec4c17e630 Copter: Delete a comparison that does not become a true forever. 2016-08-16 21:04:25 +09:00
Andrew Tridgell 06154fc4ab Copter: use rangefinder to prevent auto-disarm in the air
only consider the vehicle to be landed if either no rangefinder or
rangefinder shows an altitude below 2m
2016-08-16 15:14:10 +10:00
Andrew Tridgell e4564de837 Copter: fixed heli criterion for unsetting land_complete
in order to honor H_LAND_COL_MIN we need to check if we have reached
the throttle lower limit
2016-08-16 11:30:37 +10:00
Andrew Tridgell a67b9372fd Copter: check that climb rate is low in landing detector
this fixes an issue where a vehicle may still be descending rapidly
and trigger the landing detector. See the log for Robs heli.
2016-08-16 11:29:15 +10:00
Andrew Tridgell 3041a75798 Copter: limit attitude on landing using WP_NAVALT_MIN 2016-08-16 11:26:56 +10:00
Andrew Tridgell 89c10a2db9 Copter: rename WP_TKOFF_NAV_ALT to WP_NAVALT_MIN
this is in preparation for using the same parameter for landing as
well
2016-08-16 11:26:56 +10:00
Tom Pittenger dbdd86ad46 Copter: set SYS_STATUS and HB_Flag Guided bits when in AVOID_ADSB 2016-08-12 14:46:44 -07:00
Tom Pittenger 4cd66d54d1 Copter: fixed adsb pre-arm error text. "Arm" and "PreArm" were swapped 2016-08-12 12:56:44 -07:00
Jonathan Challinger 0051ecb288 Copter: fix LAND_SPEED_HIGH 2016-08-11 19:17:17 -07:00
Peter Barker 4371223738 Copter: add dataflash as a bit for the mavlink SYS_STATUS message 2016-08-11 17:48:44 -03:00
Andrew Tridgell ba7d0d6cd8 Copter: changed startup order
this allows BoardConfig to report errors in a way that allows for
BRD_TYPE to be changed by the user
2016-08-10 19:54:01 +10:00
murata 4eee3b1317 Copter: fix underflow in scheduler
If fast_loop method executed time is over MAIN_LOOP_MICROS,
scheduler.run method set value is  0.
2016-08-09 22:54:27 -03:00
Randy Mackay 0ed5665193 Copter: change parameter order of guided_set_angle
I thought it might be slightly better to put the optional parameters at the end
No functional change
2016-08-10 10:03:54 +09:00
Allan Matthew 6dd4e1a2aa Copter: accept yaw rate commands in Guided atttude controller 2016-08-10 10:03:37 +09:00
Randy Mackay 9842840346 Copter: GND_EFFECT_COMP parameter to enable ground effect compensation 2016-08-09 13:31:36 +09:00
Peter Barker 68630a86fe Copter: fix logging after log download
Downloading a log causes DataFlash to stop logging.

Restart logging when we are not downloading and start_logging is called.
2016-08-09 09:06:14 +09:00
Randy Mackay 728e8f8f56 Copter: land_state uses enum
This resolves a Covarity warning related to initialisation (that was not really a problem) but it is better form anyway
2016-08-08 13:31:29 +09:00
Randy Mackay 575795fa84 Copter: CTUN logging checks return value of height_above_terrain
This resolves a Covarity warning but it was actually safe before
No functional change
2016-08-08 13:31:27 +09:00
Randy Mackay 542677f1d5 Copter: land vertical control uses current_loc.alt instead of get_alt_cm
This resolves a warning from Covarity that we were not checking the return
value of Location_Class::get_alt_cm.  It was not actually a problem.
No functional change
2016-08-08 13:30:53 +09:00
Randy Mackay 3be76743bf Copter: precland checks get_alt_cm return value
This makes it easier for Covarity to recognise that we don't have an error by checking the return value of get_alt_cm
No functional change
2016-08-08 13:30:19 +09:00
Randy Mackay 83c3659acc Copter: report version print fix
Found by Covarity
2016-08-08 12:15:14 +09:00
Randy Mackay f4fee69f29 Copter: add div-by-zero check to get_pilot_desired_throttle
This divide by zero is only possible if there was a coding error in the setup of the throttle channel but added to make Covarity happy
2016-08-08 12:14:02 +09:00
Randy Mackay 8bb536b366 Copter: 3.4-rc2 release notes 2016-08-08 11:24:43 +09:00
Leonard Hall 3349e24492 Copter: fix autotune unit conversions for step sizes 2016-08-08 11:24:42 +09:00
Randy Mackay 5255f55cc3 Copter: add comments to RTL's compute return target 2016-08-06 14:01:39 +09:00
Randy Mackay 68d3655195 Copter: fix rtl's use of rally point alt
Thanks to OXINARF for spotting this
2016-08-06 14:01:38 +09:00
Randy Mackay 57977e2d76 Copter: ensure RTL to rally point does not breach the altitude fence
Previously we added the rally-point altitude to the calculated return altitude on the final line of this function meaning the fence's altitude check was not performed on the final value.  This change adds the rally-point altitude as the first step so it is included before the fence altitude check.
This change also converts the return alt to an alt-above-home so that it can correctly be compared to the fence (previously a terrain-altitude might have been compared to an alt-above home)
2016-08-06 14:01:31 +09:00
Francisco Ferreira 43ad1f372d Copter: change function from computing return altitude to computing return target
Also fix altitude for rally points
2016-08-06 13:50:53 +09:00
Francisco Ferreira e732cda577 Copter: when calculating RTL return alt use rtl_path directly
At the same time, fix bug: check return point for terrain and not origin twice
2016-08-06 13:50:50 +09:00
Randy Mackay 5b5385715e Copter: manual modes set_land_complete to false 2016-08-05 13:36:39 +09:00
Randy Mackay c3d71f733c Copter: remove get_takeoff_trigger_throttle
get_pilot_desired_climbrate can be used instead.
2016-08-05 12:40:37 +09:00
Randy Mackay ac4f36a992 Copter: remove LAND_REQUIRE_MIN_THROTTLE_TO_DISARM feature
This definition has been false for over a year and we have not heard of any users wanting to delay the disarming until the pilot's throttle goes to zero.  Removing this feature removes a small bit of complexity from the code.
2016-08-05 12:40:37 +09:00
Randy Mackay d1e257d5b6 Copter: remove unused get_throttle_pre_takeoff 2016-08-05 12:40:37 +09:00
Randy Mackay cb5d3238cb Copter: poshold provides throttle feedback from mid-stick when landed 2016-08-05 12:40:37 +09:00
Randy Mackay 6d9d3c1458 Copter: autotune provides throttle feedback from mid-stick when landed 2016-08-05 12:40:37 +09:00
Randy Mackay 88da5bd453 Copter: sport mode restructured to match althold and feedback from mid-stick
This modifies sport mode to be structured like althold and loiter flight modes so that ongoing maintenance of the modes is hopefully easier.
Also changes throttle feedback to occur from mid-stick
2016-08-05 12:40:37 +09:00
Randy Mackay 53f0216269 Copter: sport - fix call to relax_alt_hold_controller 2016-08-05 12:40:37 +09:00
Randy Mackay 5061b29031 Copter: poshold - fix call to relax_alt_hold_controller 2016-08-05 12:40:37 +09:00
Randy Mackay aa4661835e Copter: brake - fix call to relax_alt_hold_controller 2016-08-05 12:40:37 +09:00
Leonard Hall 5b277f4fb5 Copter: autotune - fix call to relax_alt_hold_controllers 2016-08-05 12:40:37 +09:00
Leonard Hall 205bac91a1 Copter: loiter spin-up to throttle min (and remove a state) 2016-08-05 12:40:37 +09:00
Leonard Hall d9deab9e8e Copter: AltHold pilot feedback only spins up to min throttle 2016-08-05 12:40:37 +09:00
Leonard Hall 22422bd7b3 Copter: autotune bug fix to autotune_updating_p_up_d_down
This resolves an issue in which the D term could be reduced far lower than
it should have been.
2016-08-04 21:46:30 +09:00
Jonathan Challinger 80f3541933 Copter: add configurable arming delay 2016-08-04 15:19:22 +09:00
Jonathan Challinger 4a6cc75ebb Copter: whitespace change 2016-08-04 15:17:38 +09:00
Randy Mackay 595aea236a Copter: consolidate throw mode state into structure 2016-08-02 20:25:52 +09:00
Randy Mackay 381397c7bd Copter: set throw mode stage on init 2016-08-02 20:25:52 +09:00
Randy Mackay 807e930251 Copter: throw uses motor spooling instead of interlock 2016-08-02 20:25:52 +09:00
Randy Mackay f4f13bbe6b Copter: add throw mode logging 2016-08-02 20:25:52 +09:00
Randy Mackay 8c5c8eec44 Copter: minor throw mode comment fix
No functional change
2016-08-02 20:25:52 +09:00
Randy Mackay 8e58ea9277 Copter: add throw mode defines for required speed
No functional change
2016-08-02 20:25:52 +09:00
chambana 25940c8e0f Copter: add THROW_TYPE and allow dropping vehicle to trigger motors 2016-08-02 20:25:52 +09:00
Randy Mackay f0f87a2f0c Copter: add throw_nextmode
vehicle switches to mode specified in THROW_NEXTMODE parameter after the
throw is completed.
2016-08-02 20:25:52 +09:00
Randy Mackay 64ac18da6c Copter: move throw state into structure
This makes it easier to add more state which is required for the follow throw_nextmode change
2016-08-02 20:25:52 +09:00
Randy Mackay 40db19549e Copter: allow taking off in Guided mode's attitude control sub mode 2016-08-02 18:26:05 +09:00
Randy Mackay 4e92f08bf1 Copter: only accept attitude targets in Guided mode 2016-08-02 18:26:04 +09:00
Randy Mackay 1161417d7f Copter: add GUIDED_NOGPS flight mode
This mode is a cut down version of Guided mode that only accepts attitude commands.
This mode does not require a GPS lock
2016-08-02 18:25:59 +09:00
Gustavo Jose de Sousa f2dec971e7 waf: add "ap_" prefix to keywords "libraries" and "vehicle"
As an effort to keep things specific to ardupilot API in the build system
consistent and easy way to identify.
2016-08-01 22:04:16 -03:00
Jonathan Challinger 2c41459fe9 Copter: loosen accelerometer consistency check in z-axis 2016-07-29 14:08:14 +09:00
murata b1f204e2a6 Copter: use constrain_float for target_roll assignment 2016-07-29 13:35:27 +09:00
Lucas De Marchi c0b49f6aeb ArduCopter: Remove i2c lockup count
This was returned only for a single bus and on all supported platforms
this is hardcoded to 0.
2016-07-28 18:03:09 -03:00
mirkix e3934fac80 ArduCopter: Delete (wrong) filename out of header 2016-07-25 17:13:41 -03:00
Randy Mackay 49674abb21 Copter: guided mode's velocity controller stops before fence 2016-07-25 20:24:37 +09:00
Randy Mackay 7a6e0a981b Copter: simplify guided mode's velocity controller's accel limit calcs 2016-07-25 20:24:37 +09:00
Randy Mackay dc52f3b2df Copter: guided mode applies acceleration limits to velocity controller 2016-07-25 20:24:37 +09:00
Randy Mackay 866487608e Copter: rename guided mode's posvel controller target variables
We will re-use these targets for the guided velocity controller
2016-07-25 20:24:37 +09:00