Commit Graph

50 Commits

Author SHA1 Message Date
Peter Barker 5b793252ed Copter: stop disarming as part of running rtl as mission item
Fixed #6324

Note that the land-as-mission-item code is duplicated from the
rtl-as-mode code but omits the disarm part, so doesn't suffer from the
same bug.
2017-11-06 19:07:28 +00:00
Randy Mackay c1433e0220 Copter: minor comment and formatting fixes
no functional change
2017-07-12 13:27:45 +09:00
Randy Mackay 4c9e118ceb Copter: set_auto_yaw_look_at_heading takes bool for relative angle arg
No functional change
2017-07-12 13:27:45 +09:00
Randy Mackay 9b05f1d9c7 Copter: add auto-yaw-rate and replace guided_angle_state.use_yaw_rate
We use the auto_yaw_mode in auto and guided modes to allow various yaw behaviours
This commit adds a new AUTO_YAW_RATE control to the mode and uses it within guided mode.
This new RATE control is not currently used within auto mode because there is no way (yet) for a mission command to specify a desired rate.
2017-07-12 13:27:45 +09:00
Peter Barker f60389d4aa Copter: use send_text method on the GCS singleton 2017-07-09 17:17:29 -04:00
Randy Mackay aab27d8d0e Copter: auto loiter initialisation simplified
The simpler set_wp_destination can be used instead of set_wp_origin_and_destination
2017-04-28 09:10:02 +09:00
Randy Mackay ebbfa9391d Copter: remove comments from package place 2017-01-18 09:35:47 +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
Dr.-Ing. Amilcar Do Carmo Lucas 8419045aea Spell in comments 2017-01-06 10:57:39 -08:00
Pierre Kancir f2ea388a69 Copter: control_auto remove misplaced parenthesis 2016-12-05 10:59:45 -08:00
Peter Barker 289aba4350 Copter: support for NAV_CMD_PLACE 2016-12-02 12:52:53 +11:00
Randy Mackay 9426b0b366 Copter: set land_complete to false during auto takeoff
This resolves an issue in very high powered copters that could fly a mission while "landed" which could lead to a crash during the final stage of RTL
2016-12-01 12:10:32 +09: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
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
murata 57c61ace62 Copter: To remove a break after the return statement. 2016-10-08 13:55:18 -03: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
mirkix e3934fac80 ArduCopter: Delete (wrong) filename out of header 2016-07-25 17:13:41 -03:00
Jonathan Challinger e22220ab62 Copter: refactor landing to reduce duplication, use vertical vel ff 2016-07-12 18:40:25 +09: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
Jonathan Challinger 91a5b26725 Copter: use simplified precland interface 2016-07-04 16:57:06 +09:00
Derek Ma 7fddf20f0b Copter: enable precision landing in auto mode 2016-07-04 16:57:06 +09:00
Leonard Hall 7d54c268f6 Copter: consolidate input_euler_angle calls to use smoothing gain
Previously we had _smooth and non-smooth methods in the attitude
controller but as part of the move to quaternions these have been replaced
by a single call which always takes a smoothing gain
2016-06-24 17:17:17 +09:00
Randy Mackay 70463dc572 Copter: auto_spline_start handles triggers terrain failsafe
Also immediately exit auto_wp_start on terrain failsafe
2016-05-21 10:36:53 +09:00
Randy Mackay a9d16f3373 Copter: move auto's take-off check to beginning of auto_init
This ensures there are no side-effects of a failed switch to AUTO like stopping the vehicle or affecting the yaw mode
2016-05-19 19:43:24 +09:00
Niti Rohilla 26e41fee7a Copter: prevent Auto tipovers caused by missing takeoff command 2016-05-19 19:43:19 +09:00
dgrat 41661f815f AP_Math: Replace the pythagorous* functions with a variadic template
The new function can deal with a variable number of function parameters.
Additionally, I renamed the functions to norm(), because this is the
standard name used in several other projects.
2016-05-10 11:41:26 -03:00
skyscraper 6f200fa923 ArduCopter: Fix up after refactoring RC_Channel class
Further to refactor of RC_Channel class which included
adding get_xx set_xx methods, change reads and writes to the public members
to calls to  get and set functionsss

old public member(int16_t)   get function -> int16_t     set function (int16_t)
(expression where c is an object of type RC_Channel)
c.radio_in                     c.get_radio_in()           c.set_radio_in(v)
c.control_in                   c.get_control_in()         c.set_control_in(v)
c.servo_out                    c.get_servo_out()          c.set_servo_out(v)
c.pwm_out                      c.get_pwm_out()            // use existing
c.radio_out                    c.get_radio_out()          c.set_radio_out(v)
c.radio_max                    c.get_radio_max()          c.set_radio_max(v)
c.radio_min                    c.get_radio_min()          c.set_radio_min(v)
c.radio_trim                   c.get_radio_trim()         c.set_radio_trim(v);

c.min_max_configured() // return true if min and max are configured

Because data members of RC_Channels are now private and so cannot be written directly
 some overloads are provided in the Plane classes to provide the old functionality

new overload Plane::stick_mix_channel(RC_Channel *channel)
which forwards to the previously existing
void stick_mix_channel(RC_Channel *channel, int16_t &servo_out);

new overload Plane::channel_output_mixer(Rc_Channel* , RC_Channel*)const
which forwards to
(uint8_t mixing_type, int16_t & chan1, int16_t & chan2)const;

Rename functions

 RC_Channel_aux::set_radio_trim(Aux_servo_function_t function)
    to RC_Channel_aux::set_trim_to_radio_in_for(Aux_servo_function_t function)

 RC_Channel_aux::set_servo_out(Aux_servo_function_t function, int16_t value)
    to RC_Channel_aux::set_servo_out_for(Aux_servo_function_t function, int16_t value)

 Rationale:

        RC_Channel is a complicated class, which combines
        several functionalities dealing with stick inputs
        in pwm and logical units, logical and actual actuator
        outputs, unit conversion etc, etc
        The intent of this PR is to clarify existing use of
        the class. At the basic level it should now be possible
        to grep all places where private variable is set by
        searching for the set_xx function.

        (The wider purpose is to provide a more generic and
        logically simpler method of output mixing. This is a small step)
2016-05-10 16:21:16 +10:00
Randy Mackay d455e2a33f Copter: fix auto-circle comment 2016-04-30 10:33:01 +09:00
Randy Mackay 3d31c3b936 Copter: log error if circle does not initialise correctly 2016-04-30 10:33:01 +09:00
Randy Mackay f8f6c135e9 Copter: rename set_alt to set_alt_cm in control_auto 2016-04-30 10:33:01 +09:00
Randy Mackay 9100cf605a Copter: auto can trigger terrain failsafe 2016-04-30 10:33:01 +09:00
Randy Mackay e8b14e59fc Copter: spline mission commands handle terrain altitudes 2016-04-30 10:33:01 +09:00
Randy Mackay 81d244c9bd Copter: do-circle accept terrain altitude 2016-04-30 10:33:01 +09:00
Randy Mackay 70630e9774 Copter: auto loiter handles terrain 2016-04-30 10:33:01 +09:00
Randy Mackay 06ee6a7bd4 Copter: auto takeoff accepts abs and terrain alts 2016-04-30 10:33:01 +09:00
Randy Mackay 9449776e3c Copter: straight line waypoints accept terrain
auto_wp_start calls AC_WPNav's new set_wp_destination which accepts a
Location class allow altitude to be set as above-terrain or even an
absolute altitude
2016-04-30 10:33:01 +09:00
Jonathan Challinger 1356deab8b Copter: add control_mode_reason 2016-04-14 12:24:04 +09:00
Randy Mackay 4f192d0bc7 Copter: auto uses AP_Motors set_desired_spool_state 2016-04-01 11:59:30 +09:00
Leonard Hall f221d4d757 Copter: auto sets desired spool state 2016-04-01 11:59:30 +09:00
Randy Mackay 2c5f9422d4 Copter: log event if pilot cancels land
Also add definition for throttle value that cancels land
2016-01-14 15:21:57 +09:00
Jonathan Challinger 8965185587 Copter: add "high throttle cancels landing" option 2016-01-14 15:21:54 +09:00
Jonathan Challinger 709fcf37cc Copter: call renamed functions in AC_AttitudeControl 2015-12-09 19:58:49 +09:00
Jonathan Challinger dfab21171b Copter: call renamed functions in AC_AttitudeControl 2015-12-09 19:58:37 +09:00
Jonathan Challinger 9d8b0f3d58 Copter: call renamed functions in AC_AttitudeControl 2015-12-09 19:58:30 +09:00
Randy Mackay 35a924703f Copter: change multirotor comments to multicopter
No functional change
2015-07-21 16:26:25 +09:00
Robert Lefebvre 24d0031389 Copter: replace slow_start() with full set_throttle_takeoff() function. 2015-07-14 20:17:15 +09:00
Robert Lefebvre 0a69c13b1d Copter: Fix helicopter ground stabilization in Auto, Brake, Circle, Guided, Land and RTL modes. 2015-07-14 20:17:14 +09:00
Jonathan Challinger fb82ac3eb3 Copter: rework land detector logic 2015-05-30 18:51:55 +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