Commit Graph

753 Commits

Author SHA1 Message Date
Peter Barker 35d8f11e46 AP_Motors: eliminate GCS_MAVLINK::send_statustext_all 2017-07-11 23:53:53 +01:00
Jacob Walser 20889ff8a9 APMotors6DOF: Add motor reverse parameters for motors 9-12
Fix overruns found in coverity 145496-99
2017-07-11 09:34:40 +09:00
Andrew Tridgell abd0831239 AP_Motors: changed BRUSHED16kHz to BRUSHED 2017-06-17 17:37:45 +10:00
Leonard Hall 9e86732edc AP_Motors: accept external battery resistance estimate 2017-06-06 14:57:04 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas 1b062d9d29 AP_Motors: Improve the PWM parameters descriptions 2017-06-06 11:06:26 +10:00
Jonathan Challinger 2e07f8824e AP_Motors: reserve parameter index 38 2017-06-06 08:45:37 +09:00
murata 66fc49889b AP_Motors: add dodeca-hexa 2017-05-27 14:21:13 +09:00
Randy Mackay d00725b2ed AP_Motors: rc_write handles motors 9 to 12 2017-05-27 14:21:13 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas 9d9ebc91cd AP_Motors: Use SI units conventions in parameter units
Follow the rules from:
http://physics.nist.gov/cuu/Units/units.html
http://physics.nist.gov/cuu/Units/outside.html
and
http://physics.nist.gov/cuu/Units/checklist.html
one further constrain is that only printable (7bit) ASCII characters are allowed
2017-05-17 18:07:25 +10:00
murata 46cba2c970 libraries: Delete the setting value for specific editor. 2017-05-11 13:18:41 -07:00
murata 10c446f69d AP_Motors: Fit the indent column to the coding style. 2017-05-11 13:18:41 -07:00
Sriram Sami 379005ebc7 AP_Motors: Fix comment on expected variable range
the move_actuators function in AP_MotorsHeli_Dual previously
indicated incorrect ranges for its input variables.
2017-05-09 17:41:26 +09:00
Andrew Tridgell 46d9a1dcb5 AP_Motors: fixed tricopter tail servo in fwd flight
in quadplane forward flight the with tilt-tricopter tail servo needs to
be at its trim position. Thanks to Marco for noticing this.
2017-05-09 08:59:00 +09:00
Andrew Tridgell bdc4320fe8 AP_Motors: added MOT_BOOST_SCALE
this is to support boost motors for copters, such as having a petrol
motor for extra lift on a multicopter

The scaling factor allows the user to control how much of the lift is
generated from the booster and how much from the main multicopter
motors
2017-05-08 11:02:55 +10:00
Andrew Tridgell 1f847132d7 AP_Motors: setup limits flags for tailsitters 2017-05-07 09:10:44 +10:00
Andrew Tridgell 2c4975ba31 AP_Motors: removed cork/push from AP_Motors
should be done by vehicle code if needed, so that AUX servos are sent
at the same time
2017-05-01 14:32:18 +10:00
Andrew Tridgell 6f54eef857 AP_Motors: force roll motors to 0 in tailsitter when disarmed 2017-04-14 13:01:48 +10:00
Andrew Tridgell f571b34fd7 AP_Motors: setup RC speed for tailsitters 2017-04-11 17:34:40 +10:00
Andrew Tridgell 328541769d AP_Motors: allow control surfaces to move disarmed
allow tailsitter control surfaces to move in Q modes when shutdown
2017-04-11 17:34:40 +10:00
Sriram Sami 8bb052d019 AP_Motors: update descriptions for new parameters 2017-04-01 05:25:59 +11:00
Sriram Sami 1793bac8d4 AP_Motors: add parameters for HELI_DUAL
- add COL2_MIN/MID/MAX parameters that control limits of rear swashplate
- output collective_mid correctly for rear swashplate when servo is in manual mode
2017-04-01 05:25:59 +11:00
Andrew Tridgell 1ad5e1db4e AP_Motors: integrate AP_MotorsHeli_Dual
fixed issues with combining with Heli_Single
2017-03-25 16:22:10 +11:00
Fredrik Hedberg 998231ab0d AP_Motors: added AP_MotorsHeli_Dual
for tandem and transverse helis
2017-03-25 16:22:10 +11:00
Jacob Walser 507b461388 AP_Motors: Initialize throttle range directly
This was causing SITL to hang at boot when motors object is statically allocated.
2017-02-28 22:34:35 -08:00
Lucas De Marchi ade1876318 AP_Motors: tie esc scaling with set_throttle_range()
We need to update the esc scaling from inside the Motors library, that
has access to the MOT_PWM_[MIN|MAX] values. Otherwise even though the
AP_Motors library honors the value for calculations, the RCOutput
drivers that need the scaling to set the real HW scaling will not work.
Right now it scales the value using the throttle_channel's min/max, even
though AP_Motors may be passing values in other range.
2017-02-26 13:38:24 +11:00
Jacob Walser cde1452da3 AP_Motors: Use fabsf instead of fabs 2017-02-22 11:25:18 -08:00
Rustom Jehangir 237ba87ca4 AP_Motors: New AP_Motors6DOF used by Sub 2017-02-21 11:26:14 +11:00
Andrew Tridgell 83d055eceb AP_Motors: support twin-motor tailsitters
use differential thrust for roll
2017-02-18 17:26:43 +11:00
Andrew Tridgell ac2a9c4b4a AP_Motors: allow Copter to fly the tailsitter motors class 2017-02-18 17:26:43 +11:00
Andrew Tridgell 1a74b7fc0c AP_Motors: started on tailsitter support 2017-02-18 17:26:43 +11:00
Andrew Tridgell 108cbe1dab AP_Motors: mark tricopter yaw as tricopter only 2017-02-14 19:50:01 +11:00
Andrew Tridgell 2187417d74 AP_Motors: added MOT_SPOOL_TIME
this allows for quadplanes to have faster spoolup, which can help with
transitions
2017-02-14 09:23:17 +09:00
Randy Mackay 8b5aae37e0 AP_Motors: remove Hexa-H, change Octa-H factors
Octa-H is like an Quad-X but with each side having two additional motors placed between the front an back motors.
Octa-H is quite different from Quad-H.
2017-02-10 10:42:14 +09:00
Randy Mackay 872e0567be AP_Motors: add H frame support for hexa and octa 2017-02-09 12:37:14 +09:00
Randy Mackay a14265359f Copter: reduce default MOT_THST_HOVER to 0.35 2017-02-07 11:20:25 +09:00
Andrew Tridgell af44e9fdbd AP_Motors: added frame type 11 for Y6 to match FireFly6
using same motor output mapping as AvA
2017-02-06 16:18:58 +11:00
murata 92eb179acf AP_Motors: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Andrew Tridgell a6ecb94d24 AP_Motors: MotorsTri does not need its own var_info now 2017-01-20 12:05:09 +11:00
Andrew Tridgell 8e3bf71aa9 AP_Motors: allow single, tri and coax to be part of multicopter class 2017-01-12 17:39:37 +11:00
Andrew Tridgell 8799094278 AP_Motors: use SRV_Channel for tri tail servo 2017-01-12 17:39:37 +11:00
Andrew Tridgell 638f1364be AP_Motors: adapt to new RC_Channel API 2017-01-12 17:39:37 +11:00
Randy Mackay bdfb12123f AP_Motors: fix frame-type enum for Y6B
Also remove unused NEW_PLUS
2016-12-31 10:55:23 +09:00
Randy Mackay 037e411e35 AP_Motors: fix example sketch
Also minor formatting fix
Thanks to OXINARF for spotting this
2016-12-31 10:55:23 +09:00
Randy Mackay ffa6d1a5b9 AP_Motors: init fixes for frame_class, type and initialised_ok
Thanks to OXINARF for spotting these
2016-12-31 10:55:23 +09:00
Randy Mackay a276f5dc90 AP_Motors: fix example sketch 2016-12-31 10:55:23 +09:00
Randy Mackay 7be0f437a9 AP_Motors: consolidate matrix multicopters
AP_MOTORS_x_FRAME definitions moved to motor_frame_type enum
init function and now accepts frame-class and type to perform initial motor setup
set_frame_class_and_type allows real-time changing of motor setup
initialised_ok flag and accessor records whether setup was successful
2016-12-31 10:55:23 +09:00
Randy Mackay 41189758b8 AP_Motors: move some functions to protected
Also minor formatting fix
2016-12-31 10:55:23 +09:00
priseborough 509709ce9d AP_Motors: remove unused EKF1 include 2016-12-19 08:07:11 +11:00
Randy Mackay 2da7ea746b MotorsHeli: minor formatting updates 2016-12-14 13:21:59 +09:00
Leonard Hall a09d4db4fd AP_MotorsMulticopter: fix battery resistance calculation 2016-12-14 11:07:29 +09:00
Pierre Kancir 8ef5067e12 AP_Motors: MotorsHeli_Single utilize an explicit type cast to avoid the loss of a fractional part. 2016-12-06 06:25:15 -08:00
Andrew Tridgell 8468add63e AP_Motors: mark PWM_TYPE as reboot required 2016-11-30 10:53:26 +11:00
Andrew Tridgell ce517384e1 AP_Motors: support MODE_PWM_BRUSHED16KHZ 2016-11-30 10:53:26 +11:00
Jonathan Challinger 22517422f9 AP_Motors: add option to disable motor PWM output while disarmed 2016-11-21 10:49:21 +09:00
Peter Barker 06b616f761 AP_Motors: add missing parameter metadata 2016-10-27 09:15:03 -07: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
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