Commit Graph

38 Commits

Author SHA1 Message Date
Peter Barker d87986ecdd Copter: move set_throttle_takeoff implementation into Mode
No callers except the mode objects, so move it.
2020-08-05 08:23:03 +09:00
Randy Mackay 90883624bc Copter: fix use of wp-navmin-alt 2020-03-11 10:39:18 +09:00
Bogdan Grigoruta 5183703243 Copter: move Mode::auto_takeoff_run to takeoff.cpp 2019-11-18 09:14:08 +09:00
Randy Mackay 5276e67cec Copter: minor format fix for takeoff.cpp 2019-11-11 17:19:28 +09:00
Peter Barker 676d75c391 Copter: correct namespacing of Copter modes
This makes us look like Rover and Plane in terms of namespacing for the
Mode classes, and removes a wart where we #include mode.h in the middle
of the Mode class.

This was done mechanically for the most part.

I've had to remove the convenience reference for ap as part of this.
2019-06-11 09:18:22 +09:00
Peter Barker 3c436b30f0 Copter: have takeoff.start() handle clearing i terms and setting land-complete 2019-05-15 18:24:26 +10:00
Pierre Kancir caf925eda5 Copter: factorize arm or land check 2019-04-16 10:17:47 +09:00
Peter Barker 46a6f45e4a Copter: adjust for desired spool state and spool state renames 2019-04-14 12:18:03 +09:00
bnsgeyer d949c80d54 Copter: tradheli replaces rotor_runup_complete with spool state 2019-04-08 09:42:21 +09:00
bnsgeyer 3869507839 Copter: Tradheli- removes suppression of hover_trim_roll on auto takeoff 2019-03-29 13:13:55 +11:00
Peter Barker 281dbfcef8 Copter: support send_extended_sys_state 2019-03-12 09:16:13 +09:00
Randy Mackay 717fb4d823 Copter: integrate AC_WPNav::get_speed rename to get_default_speed 2019-01-31 19:34:32 +09:00
Peter Barker 22f7f29045 Copter: move all of waypoint-takeoff into Mode namespace 2018-07-27 13:08:27 +10:00
Peter Barker ff17c78c67 Copter: create Copter::Mode::_TakeOff subobject from takeoff_state 2018-06-26 09:11:21 +09:00
Peter Barker 7883582c65 Copter: move takeoff state into Mode class 2018-06-26 09:11:21 +09:00
Peter Barker 597e876953 Copter: clean up do_user_takeoff 2018-06-26 09:11:21 +09:00
Peter Barker cff1969a29 Copter: make do_user_takeoff a member of Mode 2018-06-26 09:11:21 +09:00
Peter Barker cb26ff64b3 Copter: current_mode_has_user_takeoff -> Mode::has_user_takeoff 2018-06-26 09:11:21 +09:00
Leonard Hall 9544b1763b Copter: replace smoothing gain with AC_AttitudeControl::set_input_tc 2018-03-16 13:50:57 +09:00
Peter Barker b8c432b1a1 Copter: add option to disable GUIDED flight mode
Saves about 6kB of flash
2018-02-27 07:43:13 +09:00
Andrew Tridgell f442b91ea5 Copter: added FLOWHOLD flight mode
This flight mode allows for position hold with optical flow without
needing a rangefinder for height. It can estimate its height from the
flow data and IMU
2018-02-08 17:36:33 +11:00
Randy Mackay 2d23e1f7c7 Copter: rename flightmode_ objects to mode_ 2017-12-12 10:39:26 +09:00
Peter Barker 2db09ba0f7 Copter: FlightMode - convert GUIDED flight mode 2017-12-06 08:24:24 +09:00
ChrisBird caaeae3d0a Copter: Separate max ascent and descent speeds
Added equivalent parameters to WPNAV_SPEED_UP and WPNAV_SPEED_DN

New parameters named:
PILOT_SPEED_UP (technically renamed PILOT_VELZ_MAX)
PILOT_SPEED_DN

Removed parameter PILOT_VELZ_MAX (technically renamed to PILOT_SPEED_UP).

Flight Modes impacted:
ALTHOLD
AUTOTUNE
CIRCLE
LOITER
POSHOLD
SPORT
TAKEOFF

Update a section in GUIDED mode but I don't think it is ever used but update just in case.

It will use the PILOT_SPEED_UP for ascending max velocity.  For down it will check if
it is 0, if so then it will PILOT_SPEED_UP instead, if non zero it will use PILOT_SPEED_DN.
This retains current behavior and gives the flexibility to change it if desired.
2017-11-09 09:03:54 +09:00
Andrew Tridgell 0f6d0c5ba9 Copter: combined tri, single, coax and multicopter into a single build
this allows copter to be just 2 builds, one for heli, and one for
everything else
2017-01-12 17:39:37 +11:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02: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
Andrew Tridgell 3a8ed06267 Copter: added TKOFF_NAV_ALT parameter
this adds TKOFF_NAV_ALT which controls the altitude above takeoff that
navigation can begin. It is meant for unstable vehicles such as helis
to prevent blade strike during initial takeoff.

This also adds a new parameter class ParametersG2 which can hold 64
parameters. This is to avoid running out of parameters in the first
256 block
2016-07-07 14:21:47 +09:00
Randy Mackay 267c1c3934 Copter: guided mode handles terrain alt 2016-04-30 10:33:01 +09:00
Jonathan Challinger a0ce8af633 Copter: use enum type for control_mode 2016-04-14 12:24:04 +09:00
Lucas De Marchi 2591261af6 Global: rename min and max macros to uppercase
The problem with using min() and max() is that they conflict with some
C++ headers. Name the macros in uppercase instead. We may go case by
case later converting them to be typesafe.

Changes generated with:

	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)max(/\1MAX(/g'
	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)min(/\1MIN(/g'
2015-12-01 16:28:09 -02:00
Randy Mackay 420b1ca715 Copter: minor comment and order change to takeoff
No functional change
2015-11-04 20:49:25 +09:00
Jonathan Challinger 082c1f77fb Copter: soften takeoff 2015-11-04 20:49:22 +09:00
Randy Mackay f3770432f9 Copter: fix do_user_takeoff indentation
No functional change
2015-07-14 20:16:57 +09:00
Robert Lefebvre bc6deb5575 Copter: Tradheli Mavlink Takeoff to fail if rotor not spinning. 2015-07-14 20:13:46 +09:00
Randy Mackay 89345bad7a Copter: clarify takeoff_timer_start alt units
No functional change
2015-06-22 13:24:01 +09:00
Andrew Tridgell 278883c521 Copter: finished conversion to .cpp files
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2015-05-30 15:21:19 +09:00
Andrew Tridgell 356ece3402 Copter: rename .pde files to .cpp files 2015-05-30 15:21:15 +09:00