Commit Graph

647 Commits

Author SHA1 Message Date
Leonard Hall bead957a78 AP_MotorsMulticopter: limit hover throttle 2016-10-15 11:27:53 +09:00
Andrew Tridgell 7cd7f03d56 AP_Motors: fixed use of trim on heli servos
this was broken by the servo range 0 to 1 changes
2016-10-13 09:34:48 +11:00
Lucas De Marchi ae53920e5b build: don't build examples with old build system
We currently check examples are buildable with waf which doesn't need
the libraries to be specified in a make.inc file.  Having the makefiles
there is misleading since people try to build and realize the build is
broken.
2016-10-11 13:03:08 +11:00
Leonard Hall 0a56d69d54 AP_MotorsMulticopter: Use same throttle value used by motors 2016-10-10 16:40:08 +09:00
Randy Mackay b63666d188 AP_Motors: increase MOT_THST_HOVER parameter description range
No functional change
2016-09-07 15:28:49 +09:00
Randy Mackay 4858afae6c AP_Motors: param description update that MOT_SPIN_MIN should be higher than MOT_SPIN_ARM 2016-09-03 11:12:31 +09:00
Andrew Tridgell e9e3a3f491 AP_Motors: added get_pwm_type() 2016-08-29 15:52:21 +10:00
Andrew Tridgell 270fa95a8d AP_Morors: scale colyaw to match previous behaviour
this was missed in the motor scaling changes. Thanks to Rob for
noticing this.
2016-08-10 07:58:06 +10:00
Randy Mackay ad697243b3 AP_MotorsMulticopter: initialise some members
This resolves some Covarity warnings at the cost of a small amount of flash
2016-08-08 13:31:30 +09:00
Andrew Tridgell 66c4995c9d AP_Motors: added get_desired_spool_state() 2016-08-04 09:43:40 -07:00
Andrew Tridgell 11975223dd AP_Motors: added H_RSC_POWER_NEGC and H_RSC_SLEWRATE
this gives more control over throttle for petrol
helis. H_RSC_POWER_NEGC allows for a asymmetric V-curve, which allows
for less power being put into the head when landing or when sitting on
the ground. That can lead to significantly less vibration and chance
of ground oscillation. A heli not being flown with aerobatics does not
need to use high throttle at negative collective pitch.

The H_RSC_SLEWRATE allows for a maximum throttle slew rate to be
set. Some petrol motors can cut if the throttle is moved too
quickly. We had this happen at a height of 6m when switching from
ALT_HOLD to STABILIZE mode. It also lowers the chance of the blades
skewing in their holders with the sudden change of power when the heli
is disarmed. In general it is a bad idea to do instantaneous large
movements of a IC engine throttle.
2016-07-03 18:29:05 +10:00
Andrew Tridgell bc7488e2f2 AP_Motors: fixed typos 2016-07-01 15:35:29 +10:00
Leonard Hall fe68fe65e2 AP_Motors: Single and Coax fix flap gains 2016-07-01 12:45:14 +09:00
Leonard Hall ba2382c409 AP_MotorsCoax: Fix servo 3 and 4 feed through sign 2016-06-20 09:45:17 +09:00
Andrew Tridgell 7a9b4c7572 AP_Motors: fixed motor load calculation
scale to 1.0 for max collective
2016-06-19 13:50:04 +10:00
Randy Mackay e185bab775 AP_MotorsMulticopter: add HOVER_LEARN option to learn but not save 2016-06-18 11:55:49 +09:00
Randy Mackay 23f8227e36 AP_Motors: bug fix to save params on disarm
Previously was saving during arming  as well as disarming.
Thanks to OXINARF for finding this!
2016-06-18 11:55:49 +09:00
Randy Mackay a2ffd9ec7d AP_MotorsMulticopter: fix comment for get_throttle_limit function 2016-06-18 11:55:49 +09:00
Randy Mackay a1b573ed0a AP_Motors: rename throttle_ave_max to throttle_avg_max 2016-06-18 11:55:49 +09:00
Randy Mackay ef106e4b0f AP_Motors: spool_mode moved out of flags struction
No functional change
2016-06-18 11:55:49 +09:00
Leonard Hall 8fff32bde3 AP_MotorsSingle: fix stability patch use of throttle_hover 2016-06-18 11:55:49 +09:00
Leonard Hall e0f9fc8e40 AP_MotorsSingle: rename rpy_scale, thrust_min_rpy variables
No functional change
2016-06-18 11:55:49 +09:00
Leonard Hall da05902805 AP_MotorsCoax: fix stability patch use of throttle_hover 2016-06-18 11:55:49 +09:00
Leonard Hall 9bc866e771 AP_MotorsCoax: rename rpy_scale internal variable
No functional change
2016-06-18 11:55:49 +09:00
Leonard Hall 8bdb906b2b AP_MotorsCoax: fixes negative thrust 2016-06-18 11:55:49 +09:00
Randy Mackay 71d1818103 AP_MotorsMulticopter: minor comment update 2016-06-18 11:55:49 +09:00
Randy Mackay 818965fa57 AP_MotorsMulticopter: output_to_motors and output_logic become protected 2016-06-18 11:55:49 +09:00
Leonard Hall 02881b59ff AP_MotorsMulti: float constants 2016-06-18 11:55:49 +09:00
Randy Mackay 79a73a5c2f AP_Motors: fix example sketch
No need to set throttle_mix nor throttle_min
2016-06-18 11:55:49 +09:00
Leonard Hall bee6c29b89 AP_MotorsMulticopter: current limit keeps battery from sagging below BAT_VOLT_MIN 2016-06-18 11:55:49 +09:00
Leonard Hall be25ac4acf AP_MotorsMulticopter: Add current limit time constant variable 2016-06-18 11:55:49 +09:00
Leonard Hall 7e0e0ca874 AP_MotorsMulticopter: battery voltage compensation improvements 2016-06-18 11:55:49 +09:00
Leonard Hall 0ee7b00b0b AP_MotorsMulticopter: rename _thrust_curve_min to spin_min 2016-06-18 11:55:49 +09:00
Leonard Hall 142a67bb6d AP_MotorsMulticopter: minor comment change 2016-06-18 11:55:49 +09:00
Leonard Hall 5cace33ca5 AP_MotorsMulticopter: SPIN_MIN replaces min_throttle 2016-06-18 11:55:49 +09:00
Leonard Hall 2c811364d3 AP_MotorsMulticopter: SPIN_ARM param replaces SPIN_ARMED 2016-06-18 11:55:49 +09:00
Leonard Hall 488f90b39d AP_Motors: add calc_spin_up_to_pwm to reduce repeated code 2016-06-18 11:55:49 +09:00
Randy Mackay 25778a24e2 AP_MotorsMulticopter: add HOVER_LEARN param 2016-06-18 11:55:49 +09:00
Leonard Hall 4f0db2bc36 AP_Motors: learned THST_HOVER replace THR_MID
This holds the estimated thrust required for the vehicle to hover
expressed as a number from 0 to 1.  0 will be equivalent to outputting
SPIN_MIN (which is a number from 0~1 but in the full output range) and 1 is equivalent to SPIN_MAX (also 0~1 but in the full output range)
2016-06-18 11:55:49 +09:00
Leonard Hall 5a8fc6283e AP_Motors: replace throttle_rpy_mix with throttle_avg
AC_AttitudeControl now calculates throttle vs attitude control
prioritisation and simply provides overall maximum throttle (aka
throttle_avg) to the motors library
2016-06-18 11:55:49 +09:00
Andrew Tridgell 255bda9f9c AP_Motors: allow setting of loop rate
this allows for SCHED_LOOP_RATE in copter
2016-06-17 15:01:18 +10:00
Leonard Hall b3fcab8044 AP_Motors: minor comment fix 2016-06-09 09:49:00 +09:00
Andrew Tridgell f58d837026 AP_Motors: fixed heli RSC output range and float conversion
adds H_RSC_PWM_MIN, H_RSC_PWM_MAX and H_RSC_PWM_REV
2016-06-04 18:33:36 +10:00
Leonard Hall a16018f9fe AP_Motors: Missed Single fix 2016-05-31 12:44:17 +10:00
Leonard Hall d67f83559c AP_Motors: Single and Coax Fixes 2016-05-29 16:12:29 +10:00
Randy Mackay 72b86a3f99 AP_Motors: remove unused stabilizing flag
Also initialise some members to resolve converity warnings
2016-05-28 15:45:29 +09:00
Andrew Tridgell a2ed8fb313 AP_Motors: prevent negative thrust
this prevents a sqrt of a negative number
2016-05-26 17:09:11 +10:00
Andrew Tridgell 6855899cbf AP_Motors: fixed servo constructor for coax 2016-05-26 16:41:16 +10:00
Andrew Tridgell 4e5e301c4e AP_Motors: fixed servo constructor for heli 2016-05-26 16:41:06 +10:00
Andrew Tridgell f9fb098222 AP_Motors: fixed channel output for SingleCopter 2016-05-26 16:26:43 +10:00