Leonard Hall
49819d822f
AP_MotorsMulticopter: add get_hover_throttle_as_high_end_pct
...
Returns hover throttle as a number from 0 to 1 in the range from throttle_min to throttle_max
9 years ago
Leonard Hall
3854f2eda7
AP_MotorsMulticopter: rename _throttle_thr_mix_desired to _throttle_rpy_mix_desired
...
No functional change
Also rename _throttle_thr_mix to _throttle_rpy_mix
9 years ago
Leonard Hall
65bbc23a08
AP_MotorsMulticopter: apply_thrust_curve_and_volt_scaling in 0 to 1 range
...
existing equivalent pwm function becomes apply_thrust_curve_and_volt_scaling_pwm
9 years ago
Leonard Hall
cb39f8aab7
AP_MotorsMuticopter: calc_thrust_to_pwm converts thrust in 0 to 1 range to pwm
...
pwm output is always between throttle min and throttle max
9 years ago
Jonathan Challinger
9a09a86bb8
AP_Motors: add AP_MOTORS_DENSITY_COMP_DISABLED option
9 years ago
Andrew Tridgell
d31ba2b380
AP_Motors: added rc_write function
...
this is intended to make remapping motors and rescaling output easier
9 years ago
Lucas De Marchi
2591261af6
Global: rename min and max macros to uppercase
...
The problem with using min() and max() is that they conflict with some
C++ headers. Name the macros in uppercase instead. We may go case by
case later converting them to be typesafe.
Changes generated with:
git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)max(/\1MAX(/g'
git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)min(/\1MIN(/g'
9 years ago
Lucas De Marchi
831d8acca5
Remove use of PROGMEM
...
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:
git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'
The 2 commands were done so we don't leave behind spurious spaces.
AVR-specific places were not changed.
9 years ago
Lucas De Marchi
f43f6c53f7
AP_Motors: Group writes to motors
...
Surround calls to rcout->write() with rcout->cork() and rcout->push().
If the RCOutput implementation allows the writes are grouped and only
sent together to the underlying hardware.
9 years ago
Lucas De Marchi
7ea141b774
AP_Motors_Multi: get rid of _motor_to_channel_map
9 years ago
Gustavo Jose de Sousa
1e619c6c59
AP_Motors: standardize inclusion of libaries headers
...
This commit changes the way libraries headers are included in source files:
- If the header is in the same directory the source belongs to, so the
notation '#include ""' is used with the path relative to the directory
containing the source.
- If the header is outside the directory containing the source, then we use
the notation '#include <>' with the path relative to libraries folder.
Some of the advantages of such approach:
- Only one search path for libraries headers.
- OSs like Windows may have a better lookup time.
10 years ago
Randy Mackay
f009c2ddb9
Motors_Multicopter: add MOT_THR_MIX_MAX parameter
...
Allows controlling the prioritisation of throttle vs attitude control
during active flight
10 years ago
Leonard Hall
1a583c5382
AP_Motors: calc_roll_pwm based on throttle pwm range
10 years ago
Randy Mackay
5032cf9fbc
Copter: init multicopter flags
...
Resolves coverity warning
Also fixed indentation
10 years ago
Randy Mackay
e31f2d26c4
MotorsMulticopter: move get_hover_throttle_as_pwm to protected
...
No functional change
10 years ago
Randy Mackay
4d1dfd94f5
AP_MotorsMulticopter: multicopter features moved in from parent
...
Also rename from multirotor to multicopter
10 years ago
Robert Lefebvre
61d6c5aa1d
AP_Motors: Creation of AP_Motors_Multirotor class
10 years ago
Robert Lefebvre
11214b3414
AP_Motors: move constraints to set_throttle
10 years ago
Randy Mackay
2849430341
AP_Motors: init flags
...
resolves coverity issue
10 years ago
Randy Mackay
71e4bccecb
AP_Motors: init members in constructor
...
Also add f to end of float constants
10 years ago
Robert Lefebvre
b8181b6b90
AP_Motors: RCMAP fix
...
Remove all RC Input channels passed as reference into AP_Motors. All input handling self-contained inside AP_Motors.
Rework Tricopter to use internal servo calcs.
10 years ago
Jonathan Challinger
28731d2bdc
AP_Motors: add throttle filter input constraint from -100 to 1100
10 years ago
Leonard Hall
0f894ac1a8
AP_Motors: Rename and move Throttle Mix / Comp
10 years ago
Robert Lefebvre
6bdace30d2
AP_Motors: Add throttle interlock functionality
...
AP_MotorsMatrix's output_armed_zero_throttle uses output_min default from base class
10 years ago
Randy Mackay
bae1722946
AP_Motors: get_compensation_gain gets div-by-zero check
10 years ago
Jonathan Challinger
41ae7207c7
AP_Motors: scale roll/pitch/yaw gain for air density
10 years ago
Jonathan Challinger
e2ba351149
AP_Motors: refactor apply_thrust_curve_and_volt_scaling
10 years ago
Tom Pittenger
a5ffadf201
AP_Motors: fix compile warnings re float constants
10 years ago
Jonathan Challinger
4993fd4d71
AP_Motors: use new lowpass filter
10 years ago
Jonathan Challinger
e80776f1f5
AP_Motors: remove MOT_THR_FILT parameter and add interface to configure filter
10 years ago
Jonathan Challinger
8e442675a7
AP_Motors: introduce set_stabilize(bool), specifies whether torque demands should be output
10 years ago
Jonathan Challinger
a2c69fe90d
AP_Motors: add optional motor output throttle filter
10 years ago
Leonard Hall
791fbcf9b3
AP_Motors_Class: time constants of throttle comp
10 years ago
Jonathan Challinger
1828515b3b
AP_Motors: bug fix to _batt_voltage_filt
10 years ago
Randy Mackay
5e26450a6f
AP_Motors: make THR_LOW_COMP a variable instead of param
10 years ago
Leonard Hall
007c96a3d8
AP_Motors: Low throttle compensation setters
10 years ago
Leonard Hall
6275ee0289
AP_Motors: Check for battery voltage reading fail
10 years ago
Jonathan Challinger
d148039f65
AP_Motors: stricter batt_voltage misconfiguration check
10 years ago
Leonard Hall
cf8c211c35
Motors: fix thrust curve and add constraint
10 years ago
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
10 years ago
Randy Mackay
09d7cdbc23
Motors: batt_voltage_filt becomes filter object
10 years ago
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
10 years ago
Randy Mackay
1a9d3125ef
Motors: _hover_out to pct * 10 instead of pwm
10 years ago
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
10 years ago
Randy Mackay
2eaa4a8445
Motors: remove old throttle curve
10 years ago
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
10 years ago
Randy Mackay
77d4b3a2ae
Motors: add loop_rate to constructor
10 years ago
Leonard Hall
ec9d7dd99e
Motors: minor comment fixes
10 years ago
Leonard Hall
1d0ee68116
Motors: over current throttle limiting
10 years ago
Randy Mackay
f6523c0997
Motors: Add THR_LOW_CMP to adjust low throttle inputs affect on attitude control
10 years ago