Commit Graph

330 Commits

Author SHA1 Message Date
Andrew Tridgell 2e57c62ebb AP_Motors: fix for HAL_SITL rename 2015-05-05 09:45:55 +10:00
Randy Mackay b223e90ef6 AP_Motors: fix example sketches 2015-05-01 20:58:20 +09:00
Randy Mackay 0acc06d713 AP_Motors: minor comment for interlock 2015-05-01 14:30:45 +09:00
Robert Lefebvre 1a482de5e2 AP_MotorsHeli: Overload output_armed_zero_throttle 2015-05-01 14:30:25 +09:00
Robert Lefebvre 6bdace30d2 AP_Motors: Add throttle interlock functionality
AP_MotorsMatrix's output_armed_zero_throttle uses output_min default from base class
2015-05-01 14:30:24 +09:00
Jonathan Challinger 348001e786 AP_Motors: add get_throttle_warn function 2015-05-01 12:56:11 +09:00
Randy Mackay bae1722946 AP_Motors: get_compensation_gain gets div-by-zero check 2015-04-29 14:36:22 +09:00
Jonathan Challinger 41ae7207c7 AP_Motors: scale roll/pitch/yaw gain for air density 2015-04-29 14:36:15 +09:00
Jonathan Challinger e2ba351149 AP_Motors: refactor apply_thrust_curve_and_volt_scaling 2015-04-29 14:36:12 +09:00
Jonathan Challinger a07b322d31 AP_Motors: set_throttle takes a float 2015-04-24 16:30:45 +09:00
Tom Pittenger a5ffadf201 AP_Motors: fix compile warnings re float constants 2015-04-24 14:04:00 +09:00
Jonathan Challinger 4993fd4d71 AP_Motors: use new lowpass filter 2015-04-17 10:46:47 +09:00
Jonathan Challinger e80776f1f5 AP_Motors: remove MOT_THR_FILT parameter and add interface to configure filter 2015-04-16 21:00:01 +09:00
Jonathan Challinger 8e442675a7 AP_Motors: introduce set_stabilize(bool), specifies whether torque demands should be output 2015-04-16 20:59:40 +09:00
Jonathan Challinger bc2afb31dd AP_Motors: virtual not necessary in child class 2015-04-16 20:59:37 +09:00
Jonathan Challinger a2c69fe90d AP_Motors: add optional motor output throttle filter 2015-04-16 20:59:31 +09:00
Leonard Hall 88be3d67e7 AP_Motors: add get for throttle comp 2015-04-16 13:29:50 +09:00
Leonard Hall 791fbcf9b3 AP_Motors_Class: time constants of throttle comp 2015-04-16 13:29:46 +09:00
Andrzej Zaborowski 132cdc4916 Motors: Use _motor_to_channel_map in tricopter consistently.
In AP_MotorsTri.cpp the AP_MOTORS_MOT_1, _2 and _4 constants are
always mapped to actual output channels through _motor_to_channel_map
while the _CH_TRI_YAW is not, but there were a few inconsistencies
in this that could lead to things like PWM min and max values being
set on wrong channels.

It looks like all in all _motor_to_channel_map being in PROGMEM
probably doesn't help save memory and I'm not sure how useful it is
in the first place but regardless the usage should be consistent.
2015-04-09 11:43:22 +09:00
Jonathan Challinger 1828515b3b AP_Motors: bug fix to _batt_voltage_filt 2015-04-01 10:15:06 -07:00
Jonathan Challinger 89cdd02f58 AP_Motors: remove duplicate get_throttle function 2015-04-01 10:15:05 -07:00
Jonathan Challinger 0e53c0a892 AP_Motors: make output_armed() and output_disarmed() pure virtual 2015-04-01 10:14:38 -07:00
Randy Mackay 385b3744ea MotorTri: check servo_out above min_throttle 2015-03-16 14:49:38 +09:00
Randy Mackay f9e29a7f77 MotorSingle: check servo_out above min_throttle
We need to recalc radio_out or the motors could fall below min throttle
2015-03-16 14:49:37 +09:00
Randy Mackay 8de5d16f96 MotorCoax: check servo_out above min_throttle
We need to recalc radio_out or the motors could fall below min throttle
2015-03-16 14:49:35 +09:00
Leonard Hall 31a55b2bd6 MotorsMatrix: fix div by zero by ensuring throttle is above min 2015-03-16 14:49:31 +09:00
Randy Mackay 5e26450a6f AP_Motors: make THR_LOW_COMP a variable instead of param 2015-03-10 12:20:27 +09:00
Leonard Hall 007c96a3d8 AP_Motors: Low throttle compensation setters 2015-03-10 12:20:21 +09:00
Leonard Hall 6275ee0289 AP_Motors: Check for battery voltage reading fail 2015-03-10 12:20:19 +09:00
Leonard Hall 3ad9b1a06b AP_MotorsMatrix: remove incorrect throttle limit flag 2015-03-06 14:02:55 +09:00
Jonathan Challinger d148039f65 AP_Motors: stricter batt_voltage misconfiguration check 2015-03-06 14:02:49 +09:00
Leonard Hall 11a19803e0 Motors: add accessors for motor logging
accessor include get_roll, get_pitch, get_yaw, throttle input
2015-03-06 14:01:58 +09:00
Randy Mackay f5f7cd540f Motors: fix example sketches 2015-03-03 21:39:24 +09:00
Leonard Hall cf8c211c35 Motors: fix thrust curve and add constraint 2015-03-03 15:49:07 +09:00
Leonard Hall 3e960dfc3b Motors: add get_voltage_comp_gain
This clarifies that lift_max is the inverse of the battery voltage gain
compensation
2015-03-03 15:49:04 +09:00
Leonard Hall 997c6f0868 Motors: move battery resistance calcs to parent
Moving from MotorsMatrix to parent Motors class allows these to be used
from other frame types
Also initialise battery resistance
2015-03-03 15:49:02 +09:00
Randy Mackay 09d7cdbc23 Motors: batt_voltage_filt becomes filter object 2015-03-03 15:49:00 +09:00
Leonard Hall 529c6fed3a Motors: move over current throttle limiting to parent
Moving from MotorsMatrix to parent Motors class allows this to be used
from other frame types
2015-03-03 15:48:54 +09:00
Randy Mackay 812473fd9a MotorsMatrix: use get_hover_throttle_as_pwm 2015-03-03 15:48:52 +09:00
Randy Mackay 1a9d3125ef Motors: _hover_out to pct * 10 instead of pwm 2015-03-03 15:48:50 +09:00
Leonard Hall 6b7bdf64bd Motors: move batt voltage lift_max calcs to parent
Moving from MotorsMatrix to parent Motors class allows them to be used
by other frame types
Also added sanity check of batt_voltage_min
2015-03-03 15:48:48 +09:00
Randy Mackay c549b58eb7 MotorsMatrix: remove check of throttle_curve_enabled 2015-03-03 15:48:46 +09:00
Randy Mackay 5fb3de48ee MotorsTri, Single, Coax: use new thrust curve 2015-03-03 15:48:44 +09:00
Randy Mackay 2eaa4a8445 Motors: remove old throttle curve 2015-03-03 15:48:42 +09:00
Leonard Hall 751dbb7df7 Motors: move thrust curve and volt scaling to parent
Moving from MotorsMatrix to Motors allows it to be used from other frames
2015-03-03 15:48:41 +09:00
Randy Mackay 80b498f598 Motors: add loop_rate to test sketch 2015-03-03 15:48:39 +09:00
Randy Mackay 7ab76dbd0e Motors: add loop_rate to constructor for all frames 2015-03-03 15:48:34 +09:00
Randy Mackay 77d4b3a2ae Motors: add loop_rate to constructor 2015-03-03 15:48:32 +09:00
Leonard Hall ec9d7dd99e Motors: minor comment fixes 2015-03-03 15:48:30 +09:00
Leonard Hall 1d0ee68116 Motors: over current throttle limiting 2015-03-03 15:48:28 +09:00
Randy Mackay f6523c0997 Motors: Add THR_LOW_CMP to adjust low throttle inputs affect on attitude control 2015-03-03 15:48:21 +09:00
Leonard Hall 83e3e2fec2 Motors: thrust curve and voltage scaling for matrix supported frames 2015-03-03 15:48:19 +09:00
Leonard Hall 5b0bd49ff2 Motors: configurable yaw headroom for matrix frames 2015-03-03 15:48:15 +09:00
Randy Mackay 3550e52560 MotorsTri: add 80% throttle limit
This limit was moved from the main copter flight code to the motors
library in order that the throttle_upper flag could be set properly.
2015-02-02 22:31:06 +09:00
Randy Mackay 38702a7e23 Motors: fix example sketch 2015-01-28 17:15:45 +09:00
Robert Lefebvre a2958e2ffd AP_MotorsSingle: Fix parameter comments. 2014-11-08 10:18:03 +09:00
Randy Mackay 677f6cce7f AP_Motors: reduce slow-start increment for fast CPUs 2014-10-18 20:54:08 +09:00
Randy Mackay 6690aff305 AC_Motors: param description addition 2014-10-14 12:43:22 +09:00
Randy Mackay 793ed20534 CoaxCopter: set throttle upper and lower flags 2014-10-04 23:49:19 +09:00
Randy Mackay 57f6d0ff60 SingleCopter: set throttle upper and lower flags 2014-10-04 23:49:16 +09:00
Randy Mackay 85fb4b122a MotorsMatrix: _min_throttle interpreted as 0 ~ 1000 range for throttle_lower flag
Also trigger throttle_upper flag when throttle in reaches 1000
2014-10-04 23:49:14 +09:00
Randy Mackay 91e5201439 Tri: _min_throttle interpreted as 0~1000 range for throttle_lower flag
limit.throttle_lower flag becomes true when the throttle passed into the
motors lib (which is in the 0 ~ 1000 range) is below _min throttle.
This makes the interpretation of the THR_MIN parameter consistent
between the main code (which uses 0 ~ 1000 range) and the motors lib
(which previously used the RC3_MIN ~ RC3_MAX range).
The remaining problem however is that the output of the motors continues
to use THR_MIN as if it were a pwm.  I don't believe this is a dangerous
problem however.
2014-10-04 23:49:11 +09:00
Jason Short b57539a9ad AP_Motors: throttle_pass_through accepts pwm 2014-09-19 22:21:45 +09:00
NullVoxPopuli c672b3e324 Copter: Added support for V-Shaped and A-Shaped VTail Quadcopter frames
Signed-off-by: NullVoxPopuli <LPSego3+dev@gmail.com>
2014-08-18 14:31:01 +09:00
Randy Mackay 9b9f6cd47a AC_MotorsHeli: init member to resolve compiler warning 2014-08-14 11:27:33 +09:00
Andrew Tridgell 2e83555892 AP_Motors: fixed example build 2014-08-13 21:48:35 +10:00
Randy Mackay 5596001d39 AC_Motors: make get_throttle_out const 2014-08-04 21:04:09 +09:00
Randy Mackay b665ebd7a0 MotorsMatrix: implement get_motor_mask 2014-07-26 16:33:24 +09:00
Randy Mackay d73605ece8 MotorsCoax: implement get_motor_mask 2014-07-26 16:33:22 +09:00
Randy Mackay 72c3e9cc72 TradHeli: implement get_motor_mask 2014-07-26 16:33:20 +09:00
Randy Mackay 6d99524e56 MotorsSingle: implement get_motor_mask 2014-07-26 16:33:18 +09:00
Randy Mackay 6ae855c1cf MotorsTri: implement get_motor_mask 2014-07-26 16:33:16 +09:00
Randy Mackay 7749bfe82c Motors: add get_motor_mask method
This returns a bitmask of output channels that are used by the motors
library.  This allows removing the chance of a do-set-servo interfering
with a motor or control surface used to control the vehicle.
2014-07-26 16:33:14 +09:00
Andrew Tridgell d9f20c6785 AP_Motors: fixed example build 2014-07-25 17:54:51 +10:00
Randy Mackay 517732a34d AP_Motors: add get_throttle_out accessor 2014-07-18 11:39:27 +09:00
Andrew Tridgell e448168ba6 AP_Motors: fixed example build 2014-07-14 10:41:16 +10:00
bugobliterator e6f27c9fac AP_Motors_Time_test.pde: use hal.scheduler->micros instead of gettimeofday 2014-07-14 09:31:59 +10:00
bugobliterator fb7ca9bb3c AP_Motors:add AP_Motors_Time_test 2014-07-14 09:29:45 +10:00
Víctor Mayoral Vilches d43c1cc544 AP_Motors_test: Adapt to test bench available 2014-07-14 09:29:08 +10:00
Robert Lefebvre 92bdf24dba AP_MotorsHeli: Add To-Do. Swash setup hasn't seemed to work right for a while, this might be why. Confirm later. 2014-07-13 17:11:22 +09:00
Robert Lefebvre 789b1018fc AP_MotorsHeli: Change set_delta_phase_angle so that it forces recalculation of collective factors. 2014-07-08 20:18:39 +09:00
Robert Lefebvre fd542e99d8 AP_MotorsHeli: Create Delta Phase Angle variable and method to set. Will be used by CCComp code. 2014-07-08 20:18:34 +09:00
Robert Lefebvre 0680b88abd AP_MotorsHeli: Add main loop rate time variable and method. Change RSC increment calc to account for loop rate time. 2014-07-08 20:18:20 +09:00
Robert Lefebvre 979abb9fbd TradHeli: Cause DDVP Tail Motor to stop immediately when Ch8 is 0. 2014-07-08 20:18:02 +09:00
Randy Mackay 5cc26569fc AP_Motors: fix example sketch 2014-04-29 20:46:34 +09:00
Randy Mackay 2be99d7a92 TriCopter: output_test for individual motors
Based on original work by Nils Hogberg
2014-04-29 11:41:16 +09:00
Randy Mackay 07766e55f9 SingleCopter: output_test for individual motors
Based on original work by Nils Hogberg
2014-04-29 11:41:14 +09:00
Randy Mackay 3610cfe24c TradHeli: output_test for individual motors
Based on original work by Nils Hogberg
2014-04-29 11:41:13 +09:00
Randy Mackay 8f74f5b3b0 CoaxCopter: output_test for individual motors
Based on original work by Nils Hogberg
2014-04-29 11:41:12 +09:00
Randy Mackay d63d82ec17 MotorMatrix: output_test for individual motors
Based on original work by Nils Hogberg
2014-04-29 11:41:10 +09:00
Vizual54 11d02ea5d2 AP_Motors: output_test for individual motors
Modified and integrated by Randy Mackay
2014-04-29 11:36:58 +09:00
L. Preston Sego III 3ecdc4b741 Copter: Add support for V-Tail Quads 2014-04-14 14:54:02 +09:00
Randy Mackay b78e59ea30 AP_Motors: add stability patch test to example sketch 2014-04-09 21:21:29 +09:00
Jonathan Challinger 9959a44453 AP_Motors: properly constrain thr_adj_max 2014-04-07 14:14:32 +09:00
Andrew Tridgell efdb678e00 AP_Motors: fixed example build 2014-04-07 11:55:56 +10:00
Andrew Tridgell 866e32f059 AP_Motors: removed unused variable 2014-02-26 09:40:39 +11:00
Randy Mackay d761ddd4af AP_Motors: fix example sketch 2014-02-15 06:09:08 +11:00
Randy Mackay 8d6eb1eceb MotorsMatrix: motor_to_channel_map moved to progmem 2014-02-15 05:27:50 +11:00
Randy Mackay 134289af38 TradHeli: motor_to_channel_map moved to progmem 2014-02-15 05:27:50 +11:00
Randy Mackay 1bee56877c CoaxCopter: motor_to_channel_map moved to progmem 2014-02-15 05:27:50 +11:00