Commit Graph

35 Commits

Author SHA1 Message Date
Randy Mackay 6807b961e2 AP_MotorsMulticopter: protect against div-by-zero if MOT_SPIN_ARMED is zero 2016-04-01 11:59:30 +09:00
Randy Mackay b4b33db79b AP_MotorsMulticopter: promote output_min from Matrix class 2016-04-01 11:59:30 +09:00
Randy Mackay e7ba5ae451 AP_MotorsMulticopter: fix get_hover_throttle_as_high_end_pct 2016-04-01 11:59:30 +09:00
Randy Mackay c41a5dc3bd AP_MotorsMulticopter: remove slow_start
This has been replaced with the spool logic feature
2016-04-01 11:59:30 +09:00
Randy Mackay 68a6408a23 AP_MotorsMulticopter: remove set_radio_passthrough
This has been moved up to the AP_Motors class
2016-04-01 11:59:30 +09:00
Randy Mackay 2716126e40 AP_MotorsMulticopter: use desired_spool from AP_Motors class 2016-04-01 11:59:30 +09:00
Leonard Hall 5841310ac7 AP_MotorsMulticopter: update_throttle_filter limits throttle to 0 to 1 2016-04-01 11:59:30 +09:00
Leonard Hall 420b90953c AP_MotorsMulticopter: throttle_radio_min, max to multicopter class
Moved in from Motors class, only ever used by multicopters
No functional change
2016-04-01 11:59:30 +09:00
Leonard Hall 2c9a02066d AP_MotorsMulticopter: remove unused functions and variables 2016-04-01 11:59:30 +09:00
Leonard Hall 290e657f61 AP_MotorsMulticopter: update_battery_resistance captures resting voltage while disarmed
Previously it could also capture this when the input throttle was zero
2016-04-01 11:59:30 +09:00
Leonard Hall bc42cb2a66 AP_MotorsMulticopter: update_battery_resistance uses get_throttle accessor 2016-04-01 11:59:30 +09:00
Leonard Hall 8228d9e72c AP_MotorsMulticopter: current_limit_max_throttle uses get_throttle accessor 2016-04-01 11:59:30 +09:00
Leonard Hall d7dc37bda0 AP_MotorsMulticopter: remove apply_thrust_curve_and_volt_scaling_pwm 2016-04-01 11:59:30 +09:00
Leonard Hall 06f25b669d AP_MotorsMulticopter: add roll, pitch, throttle and yaw pass through 2016-04-01 11:59:30 +09:00
Leonard Hall 983d2dc97a AP_MotorsMulticopter: update_throttle_filter does not set throttle_in
get_throttle method now used to access filtered throttle
2016-04-01 11:59:30 +09:00
Leonard Hall 3fc3858fbd AP_MotorsMulticopter: set_throttle_range calcs _min_throttle before use 2016-04-01 11:59:30 +09:00
Leonard Hall b26318c178 AP_MotorsMulticopter: output_logic implements spooling 2016-04-01 11:59:30 +09:00
Leonard Hall b7fe6aa16e AP_MotorsMulticopter: remove update_max_throttle 2016-04-01 11:59:30 +09:00
Leonard Hall be64c71065 AP_MotorsMulticopter: add get_current_limit_max_throttle
returns the current limited maximum throttle as a number between 0 ~ 1 in the range throttle_min to throttle_max
2016-04-01 11:59:30 +09:00
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
2016-04-01 11:59:30 +09:00
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
2016-04-01 11:59:30 +09:00
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
2016-04-01 11:59:30 +09:00
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
2016-04-01 11:59:30 +09:00
Jonathan Challinger 9a09a86bb8 AP_Motors: add AP_MOTORS_DENSITY_COMP_DISABLED option 2016-01-27 09:18:09 +09: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 7ea141b774 AP_Motors_Multi: get rid of _motor_to_channel_map 2015-09-29 11:59:48 +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 f009c2ddb9 Motors_Multicopter: add MOT_THR_MIX_MAX parameter
Allows controlling the prioritisation of throttle vs attitude control
during active flight
2015-08-07 17:39:09 +09:00
Leonard Hall 1a583c5382 AP_Motors: calc_roll_pwm based on throttle pwm range 2015-08-03 14:12:49 +09:00
Randy Mackay 5032cf9fbc Copter: init multicopter flags
Resolves coverity warning

Also fixed indentation
2015-07-25 14:00:29 +09:00
Randy Mackay e31f2d26c4 MotorsMulticopter: move get_hover_throttle_as_pwm to protected
No functional change
2015-07-21 16:27:04 +09:00
Randy Mackay 4d1dfd94f5 AP_MotorsMulticopter: multicopter features moved in from parent
Also rename from multirotor to multicopter
2015-07-21 16:25:37 +09:00