Commit Graph

23 Commits

Author SHA1 Message Date
Peter Barker d2b7749af3 Copter: AP_Stats flighttime 2016-10-29 14:53:25 +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
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
Leonard Hall 3b7658c502 Copter: land and crash detector use thrust angle error
The thrust angle error is the difference between our desired thrust vector
and the actual thrust vector

Also some changes to use definitions in place of constants in the checks
2016-06-24 17:17:18 +09:00
Leonard Hall e08e112c6d Copter: land detector sets att vs thr priority in att controllers 2016-06-18 11:55:49 +09:00
Andrew Tridgell 86d8450666 Copter: use loop rate for copter
this allows for SCHED_LOOP_RATE below 400 in SITL for copter
2016-06-17 15:01:18 +10:00
Randy Mackay 0732ad3957 Copter: add comments to set_land_complete 2016-05-13 12:01:38 +09:00
Jonathan Challinger 747344a8ba Copter: add disarm on land detect option to PILOT_THR_BHV 2016-05-13 11:57:48 +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
Jonathan Challinger 709fcf37cc Copter: call renamed functions in AC_AttitudeControl 2015-12-09 19:58:49 +09:00
Leonard Hall 6b01c1117f Copter: keep thr-mix at min when landed 2015-09-07 18:10:25 +09:00
Randy Mackay 4cacff54b4 Copter: no update_throttle_thr_mix for TradHeli 2015-07-21 16:26:19 +09:00
Leonard Hall 911bee3518 Copter: set throttle_mix to min when disarmed 2015-06-19 15:46:11 +09:00
Randy Mackay 8cdfac8fcd Copter: remove baro and pilot thr from crash checks
Add acceleration < 3m/s/s check
Run crash and parachute checks at 400hz
2015-06-19 15:46:10 +09:00
Robert Lefebvre 3e2e0d07a4 Copter: THO Check Rotor Speed before declaring not landed. 2015-06-19 15:10:49 +09:00
Randy Mackay 42c202a08f Copter: move set_land_complete_maybe to landing_detector.cpp 2015-05-30 18:52:02 +09:00
Randy Mackay b139dfedae Copter: formatting minor fix to land-complete-maybe threshold 2015-05-30 18:51:59 +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