Commit Graph

53 Commits

Author SHA1 Message Date
Leonard Hall fe68fe65e2 AP_Motors: Single and Coax fix flap gains 2016-07-01 12:45:14 +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 488f90b39d AP_Motors: add calc_spin_up_to_pwm to reduce repeated code 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
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 8d1f50e78f AP_Motors: rename get_pwm_min to get_pwm_output_min 2016-05-24 10:00:25 +09:00
Randy Mackay 49b14b3cb6 AP_Motors: add PWM_MIN, MAX
These parameters allow the motor PWM output range to be different from receiver's throttle input range
Also renamed throttle_pass_through to set_throttle_passthrough_for_esc_calibration and change the method's input to the 0 to 1 range instead of direct PWM value
2016-05-24 10:00:25 +09:00
Andrew Tridgell f2c63e24c5 AP_Motors: allow tricopter motor 7 to be moved to any output 2016-04-22 08:32:03 +10:00
Randy Mackay 8566a61660 AP_MotorsSingle: remove output_min
This is now implemented by parent AP_MotorsMulticopter
2016-04-01 11:59:30 +09:00
Leonard Hall 840e60c930 AP_MotorsSingle: fixes to stab patch
Fixes throttle_lower flag
Also some formatting changes
2016-04-01 11:59:30 +09:00
Randy Mackay af9b18329c AP_MotorsSingle: use calc_pwm_output_1to1 instead of local calc_pivot_radio_output 2016-04-01 11:59:30 +09:00
Leonard Hall b701c109cf AP_MotorsSingle: roll, pitch, yaw input in -1 to +1 range 2016-04-01 11:59:30 +09:00
Leonard Hall 5cd4b78918 AP_MotorsSingle: remove reverse parameters
No longer necessary because we can use individual servo reverse params
2016-04-01 11:59:30 +09:00
Leonard Hall 6264159f4d AP_MotorsSingle: move servo objects into Single class 2016-04-01 11:59:30 +09:00
Leonard Hall 21d304b86d AP_MotorsSingle: output_to_motors implements spool logic 2016-04-01 11:59:30 +09:00
Leonard Hall 24a100e429 AP_MotorsSingle: stability patch uses 0 to 1 range 2016-04-01 11:59:30 +09:00
Leonard Hall cffdced838 AP_MotorsSingle: support 4 servo outputs 2016-04-01 11:59:30 +09:00
Leonard Hall f53d6e95e8 AP_MotorsSingle: rename _rev_roll to _roll_reverse
Also rename _rev_pitch to _pitch_reverse and _rev_yaw to _yaw_reverse
2016-04-01 11:59:30 +09:00
Leonard Hall 4db73d86af AP_MotorsSingle: remove output_disarmed 2016-04-01 11:59:30 +09:00
Leonard Hall 46ab198ebc AP_MotorsSingle: remove output_armed_not_stabilizing 2016-04-01 11:59:30 +09:00
Andrew Tridgell 7c9ee9363b AP_Motors: added rc_map_mask() function 2016-01-06 22:09:40 +11:00
Andrew Tridgell dfccf8f713 AP_Motors: also wrap set_freq and enable_ch for motor mapping 2016-01-06 22:09:40 +11:00
Andrew Tridgell d31ba2b380 AP_Motors: added rc_write function
this is intended to make remapping motors and rescaling output easier
2016-01-04 16:56:54 +11:00
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'
2015-12-01 16:28:09 -02:00
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.
2015-10-30 14:35:16 +09:00
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.
2015-10-06 10:42:18 +11:00
Lucas De Marchi ec4ebfde83 AP_MotorsSingle: get rid of _motor_to_channel_map 2015-09-29 12:01:28 +09:00
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.
2015-08-11 16:38:19 +10:00
Randy Mackay f906934dfa AP_MotorsSingle: remove call to empty parent Init
Also rename uses of Multirotor to Multicopter
2015-07-21 16:25:45 +09:00
Robert Lefebvre 61d6c5aa1d AP_Motors: Creation of AP_Motors_Multirotor class 2015-07-21 16:24:38 +09:00
Randy Mackay 8a308205ce MotorsSingle: fix output_armed_stabilized min thr limit 2015-07-20 20:44:32 +09:00
Randy Mackay 78b49fb4c6 AP_MotorsSingle: resolve param conflict with TradHeli
Also rename servo reverse parameters to be consistent with tricopter
2015-05-25 22:13:45 +09:00
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.
2015-05-25 22:13:32 +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
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 5fb3de48ee MotorsTri, Single, Coax: use new thrust curve 2015-03-03 15:48:44 +09:00
Robert Lefebvre a2958e2ffd AP_MotorsSingle: Fix parameter comments. 2014-11-08 10:18:03 +09:00
Randy Mackay 57f6d0ff60 SingleCopter: set throttle upper and lower flags 2014-10-04 23:49:16 +09:00
Randy Mackay 6d99524e56 MotorsSingle: implement get_motor_mask 2014-07-26 16:33:18 +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 3fad8e3630 SingleCopter: motor_to_channel_map moved to progmem 2014-02-15 05:27:50 +11:00
Randy Mackay 01d30271d8 SingleCopter: use refs for all RC_Channels 2014-02-15 05:27:49 +11:00
Randy Mackay 2f3fc3a3ce Single: remove use of motor_out array
Also allow fins to move when throttle at zero
2014-02-15 05:27:48 +11:00
Randy Mackay 7c25247c87 Copter: disable aux channel 7 for SingleCopter
Move servo range setup to AP_MotorsSingle
2014-02-07 22:04:26 +09:00
Randy Mackay 652b4b4fe5 SingleCopter: motor test flaps servos in order 2013-11-27 22:33:00 +09:00
Randy Mackay ce045c77a4 Copter: remove unused variable from Single copter 2013-11-14 22:26:53 +09:00