Commit Graph

61 Commits

Author SHA1 Message Date
Leonard Hall 7369d18abf Copter: Force Flying check for Heli 2022-02-04 09:10:57 +09:00
Leonard Hall 23711b7b10 Copter: Add support for Force Flying 2022-02-04 09:10:57 +09:00
Josh Henderson 3107c42fca Copter: INAV rename for neu & cm/cms 2021-11-30 10:08:07 +11:00
Bill Geyer 8ef88fb98e Copter: add collective stick low flag to catch bad setups for land detector 2021-11-10 16:45:17 -05:00
Bill Geyer 3926b56df0 Copter: change method name to get_below_land_min_coll 2021-11-10 16:45:17 -05:00
Bill Geyer d0d6457b31 Copter: fix tradheli landing detector bug 2021-10-10 18:55:31 -04:00
Josh Henderson 46ec70f9fc Copter: use vector.xy().length() instead of norm(x,y) 2021-09-14 10:43:46 +10:00
Leonard Hall e294991b08 Copter: Fix before squash 2021-05-24 20:13:37 +10:00
Leonard Hall 4bae8f03a4 Copter: Use PosControl fixes 2021-05-24 20:13:37 +10:00
chobits 28fbc73fb6 Copter: fix build error when landinggear disabled 2021-04-06 17:04:34 +09:00
TunaLobster 1bda79dd72 ArduCopter: loosen motion based landing detection when WoW is present 2021-04-06 08:46:07 +09:00
TunaLobster 444b33b059 ArduCopter: add WoW to Copter landing check 2021-04-06 08:46:07 +09:00
Peter Barker d387ad9921 Copter: have allows_arming take a AP_Arming::Method rather than bool from_gcs
This API predates us having the arming methods being passed around.

This makes the calls look like Plane
2021-03-30 09:00:26 +09:00
Iampete1 447af29ef1 Copter: add yaw imbalance check 2021-03-02 09:35:06 +09:00
bnsgeyer c75848435e Copter: fix heli land detector and incoporate reset_I_smoothly 2020-12-21 23:33:48 -05:00
bnsgeyer 42b4fd6e0a Copter: change heli integrator management and add hover coll learning 2020-12-21 23:33:48 -05:00
Andy Piper 8d2f2443a2 Copter: add air mode aux function 2020-06-16 20:30:26 +10:00
Randy Mackay 64360f263c Copter: land detector allows larger lean angle request in land mode 2020-05-14 08:24:29 +09:00
Randy Mackay 7565e9d75d Copter: update_throttle_mix uses filtered accelerations 2020-02-25 16:52:40 +09:00
Randy Mackay 9a32b3bdd9 Copter: rename update_throttle_mix
was called update_throttle_thr_mix
also minor formatting fixes
2020-02-25 16:52:40 +09:00
Peter Barker ce5f23810b ArduCopter: log disarm method 2020-02-22 12:16:29 +11:00
Peter Hall 61810d69aa Copter: set_likely_flying in vehicle 2020-01-14 22:34:37 -07:00
Peter Barker e6c6189fe5 Copter: cope with change in namespace of LogEvent enum
Also move Acro Trainer types into an enum class as the global defines
interfere with the Event names.

Also eliminate the Log_Write_Event wrappers.
2019-11-05 08:19:26 +08:00
Leonard Hall e7f94fc810 Copter: limit ATC_MOT_MIX_MAX in case of a fly away 2019-10-31 12:23:48 +08:00
Leonard Hall 50a098c359 Copter: Standby functions 2019-10-17 14:57:18 +09:00
Peter Barker 6dce39cbe1 Copter: use AP_Arming methods to arm and disarm vehicle
Really just changing the namespace of init_arm_motors
2019-05-30 07:37:30 +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
Leonard Hall 54a59f581f Copter: add motor thrust lost check 2018-10-16 00:44:50 +09:00
night-ghost adcc309f15 Copter: allow AP_Stats to be optional 2018-03-02 07:23:35 +11:00
Peter Barker 996115c0d3 Copter: eliminate MAIN_LOOP_SECONDS macro 2018-01-20 15:35:58 +11:00
Randy Mackay b47d575f65 Copter: minor spelling fix
non-functional change
2018-01-12 16:51:25 +09:00
Peter Barker 7b637334f4 Copter: eliminate mode_has_manual_throttle 2017-12-06 10:09:58 +09:00
Peter Barker a4859e13c1 Copter: eliminate mode_allows_arming 2017-12-06 08:24:24 +09:00
Peter Barker 527a536b78 Copter: FlightMode - remove function parameters
Use current control_mode in place of parameters

Once conversion is complete these functions will disappear
2017-12-06 08:24:24 +09:00
Andrew Tridgell 9d7ed495da Copter: call set_likely_flying() 2017-06-20 09:44:44 +10:00
Leonard Hall 36b6218e31 Copter: integrate attitude control's set-throttle-mix-manual 2017-01-17 14:19:16 +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
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