Andrew Tridgell
7c9ee9363b
AP_Motors: added rc_map_mask() function
9 years ago
Andrew Tridgell
dfccf8f713
AP_Motors: also wrap set_freq and enable_ch for motor mapping
9 years ago
Andrew Tridgell
77af00c5e1
AP_Motors: allow arbitrary mapping of channels on multirotors
...
using RCn_FUNCTION with motor1, motor2 etc
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
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
1572c9d4f4
AP_MotorsMatrix: get rid of _motor_to_channel_map
10 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
112e934072
AP_MotorsMatrix: remove call to empty parent Init
...
Also rename uses of Multirotor to Multicopter
10 years ago
Randy Mackay
6bf6442396
MotorsMatrix; protect against divide by zero
...
This should never happen but just to be safe
10 years ago
Randy Mackay
e53c46bd8f
MotorsMatrix: fix output_armed_stabilized min thr limit
...
_min_throttle was being used as if it were in the 0 to 1000 range when
in fact it is in the pwm range. This meant the lower limit was too low.
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
Leonard Hall
0f894ac1a8
AP_Motors: Rename and move Throttle Mix / Comp
10 years ago
Jonathan Challinger
41ae7207c7
AP_Motors: scale roll/pitch/yaw gain for air density
10 years ago
Jonathan Challinger
8e442675a7
AP_Motors: introduce set_stabilize(bool), specifies whether torque demands should be output
10 years ago
Leonard Hall
31a55b2bd6
MotorsMatrix: fix div by zero by ensuring throttle is above min
10 years ago
Leonard Hall
3ad9b1a06b
AP_MotorsMatrix: remove incorrect throttle limit flag
10 years ago
Leonard Hall
3e960dfc3b
Motors: add get_voltage_comp_gain
...
This clarifies that lift_max is the inverse of the battery voltage gain
compensation
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
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
812473fd9a
MotorsMatrix: use get_hover_throttle_as_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
c549b58eb7
MotorsMatrix: remove check of throttle_curve_enabled
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
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
Leonard Hall
83e3e2fec2
Motors: thrust curve and voltage scaling for matrix supported frames
10 years ago
Leonard Hall
5b0bd49ff2
Motors: configurable yaw headroom for matrix frames
10 years ago
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
11 years ago
NullVoxPopuli
c672b3e324
Copter: Added support for V-Shaped and A-Shaped VTail Quadcopter frames
...
Signed-off-by: NullVoxPopuli <LPSego3+dev@gmail.com>
11 years ago
Randy Mackay
b665ebd7a0
MotorsMatrix: implement get_motor_mask
11 years ago
Randy Mackay
d63d82ec17
MotorMatrix: output_test for individual motors
...
Based on original work by Nils Hogberg
11 years ago
Jonathan Challinger
9959a44453
AP_Motors: properly constrain thr_adj_max
11 years ago
Randy Mackay
8d6eb1eceb
MotorsMatrix: motor_to_channel_map moved to progmem
11 years ago
Randy Mackay
cf1d6854b9
AP_MotorsMatrix: use ref for roll, pitch, yaw, thr channels
11 years ago
Randy Mackay
2c6470f87b
AP_MotorsMatrix: remove unused _num_motors
...
Saves 1 byte of RAM
11 years ago
Randy Mackay
32a0992985
MatrixMotors: motor_out array made local
11 years ago
Randy Mackay
14409ee20f
Copter: disable aux channels used for motors
11 years ago
Randy Mackay
851a538692
Copter: motor matrix comment change
11 years ago
Randy Mackay
943d7374f6
Copter: slow start motors from 0 to min throttle
11 years ago
Randy Mackay
62cb5c172b
Copter Motors: add slow start feature
...
Combined armed, frame orientation and slow_start into flags bitmask
Removed ability to set max throttle because it was never used
Re-ordered class variables
12 years ago
Andrew Tridgell
97b7130bb9
libraries: update license header to GPLv3
...
we switched to GPLv3 a long time ago, but neglected to update the
per-file license headers
12 years ago
Randy Mackay
fe412437c2
Copter: add flags for upper and lower throttle limits
...
Freeze desired altitude when motors hit a limit
12 years ago
Randy Mackay
f3a2db195e
Copter Motors: remove old style stability patch
12 years ago
Randy Mackay
43379f20c3
Copter Motors: replace limit bitmask with structure
12 years ago
Randy Mackay
336357fbaf
Copter: ensure _spin_when_armed is not higher than _min_throttle
12 years ago
Randy Mackay
6477c746cd
Copter: renamed MOT_UNSAFE_THR to MOT_SPIN_ARMED
...
Removed special purpose spin_unsafe function
renamed _throttle_unsafe to _spin_when_armed and changed to an AP_Int8
12 years ago
Jonathan Challinger
2725f219cb
Copter: Warn user with motors while copter is arming
12 years ago
Jonathan Challinger
ae2b1e3b7e
AP_Motors: Added MOT_UNSAFE_THR parameter - Throttle setting used to signal that the copter is armed or otherwise unsafe to approach
12 years ago