Commit Graph

328 Commits

Author SHA1 Message Date
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
Randy Mackay
3fad8e3630 SingleCopter: motor_to_channel_map moved to progmem 2014-02-15 05:27:50 +11:00
Randy Mackay
0edf039155 AP_MotorsTri: motor_to_channel_map moved to progmem 2014-02-15 05:27:50 +11:00
Randy Mackay
96d433c63e AP_Motors: motor_to_channel_map moved to progmem 2014-02-15 05:27:50 +11:00
Randy Mackay
415e48de19 TriCopter: use refs for all RC_Channels 2014-02-15 05:27:49 +11:00
Randy Mackay
01d30271d8 SingleCopter: use refs for all RC_Channels 2014-02-15 05:27:49 +11:00
Randy Mackay
18d3907928 TradHeli: use refs for all RC_Channels 2014-02-15 05:27:49 +11:00
Randy Mackay
cf1d6854b9 AP_MotorsMatrix: use ref for roll, pitch, yaw, thr channels 2014-02-15 05:27:49 +11:00
Randy Mackay
2f4fe3e192 AP_Motors: accessors to set roll, pitch, yaw, throttle
This saves 16bytes of RAM and slightly reduces the dependence upon the
RC_Channel class as the interface.
2014-02-15 05:27:49 +11:00
Randy Mackay
2c6470f87b AP_MotorsMatrix: remove unused _num_motors
Saves 1 byte of RAM
2014-02-15 05:27:49 +11:00
Randy Mackay
32a0992985 MatrixMotors: motor_out array made local 2014-02-15 05:27:48 +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
a036009524 AP_MotorsTri: motor_out array made local 2014-02-15 05:27:48 +11:00
Randy Mackay
83321b8786 AP_Motors: remove motor_out array
Saves 16bytes of RAM
2014-02-15 05:27:48 +11:00
Randy Mackay
80ec61f217 TradHeli: make accessor methods const 2014-02-15 05:27:43 +11:00
Randy Mackay
48a0917670 Copter: make motors armed call const 2014-02-15 05:27:43 +11:00
Randy Mackay
a0298aee29 AP_Motors: expose throttle min and max 2014-02-15 05:27:34 +11:00
Dan Neault
262d384025 Coax: Yaw fix
Was using _rc_yaw servo_out instead of pwm_out to modify motors.
Corrected and less touchy in Yaw
2014-02-11 11:05:02 +09:00
Randy Mackay
14409ee20f Copter: disable aux channels used for motors 2014-02-07 22:04:27 +09: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
9b594dc5e1 Copter: disable aux channel ch7 for Tri 2014-02-07 22:04:24 +09:00
Randy Mackay
1426078cdb TradHeli: disable aux channels 7 and 8 2014-02-07 22:04:23 +09:00
Dneault
5213ec4aa6 Coax: servos to ch1, ch2, motors to ch3, ch4 2014-02-07 12:36:19 +09:00
Randy Mackay
f60d94c4ab Coax: remove unused servo3, servo4
Removed commented out code
2014-02-07 12:36:06 +09:00
Dneault
f48e106271 Copter: add coax heli support
Motors should be attached to RCOutputs 1 and 2, Flaps should be connected
to RC outputs 3 and 4
2014-02-07 12:36:04 +09:00
Robert Lefebvre
d441354961 TradHeli: Minor change to two param defaults
Also one param name in the code clarified.
2014-01-10 10:52:17 +09:00
Robert Lefebvre
782ce54a5c TradHeli: Fix for yaw offset switching. Yaw Offset should switch on and off with the main motor, not waiting until the rotor has reached full speed. 2013-12-15 11:24:09 +09:00
Randy Mackay
343ea66cd1 Copter: add OctaQuad V frame 2013-12-12 21:17:49 +09:00
Randy Mackay
279d515e59 Copter: Y6 new motor factor fix 2013-12-12 11:57:04 +09:00
Randy Mackay
4148c4e024 TradHeli: bug fix for main rotor ramp up
The main rotor ramp was being held back by the rotor speed estimate
instead of being allowed to jump up to the estimate if it's lower.

Also fixed some incorrect indentation
2013-12-05 21:24:20 +09:00
Randy Mackay
8149b54807 Copter: add Y6 with all top props CW
Set FRAME parameter to 10
2013-12-03 23:22:14 +09:00
Randy Mackay
90937be3d4 AP_Motors: fix example sketch 2013-11-28 11:34:00 +09:00
Randy Mackay
f9e19b8006 TradHeli: remove use of motor_out array
No longer required for logging purposes as we have RCOU
2013-11-27 22:33:02 +09:00
Randy Mackay
851a538692 Copter: motor matrix comment change 2013-11-27 22:33:01 +09:00
Randy Mackay
652b4b4fe5 SingleCopter: motor test flaps servos in order 2013-11-27 22:33:00 +09:00
Randy Mackay
ccedf98238 Tri: call output_min at end of motors test
Minor change to comments
2013-11-27 22:32:49 +09:00
Randy Mackay
9f2086baf2 Copter: make motor_out array private
With new method of logging rc outputs access to the motor_out array is
not longer required
2013-11-27 21:55:28 +09:00
Andrew Tridgell
316ec5864e AP_Motors: removed incorrect Makefile target 2013-11-23 18:50:55 +11:00
Randy Mackay
afbb199544 TradHeli: remove slash from parameter description
This may fix the issue in which the parameter descriptions are appearing
twice on the arducopter-parameters wiki page
2013-11-19 11:23:07 +09:00
Randy Mackay
330aa95769 Copter: default MOT_SPIN_ARMED to 70 2013-11-18 17:00:17 +09:00
Randy Mackay
7233a567fb TradHeli: add accessor for phase_angle 2013-11-15 22:58:41 +09:00
Randy Mackay
c9c803ffd4 TradHeli: move STAB_COL_MIN to main parameter list 2013-11-15 22:58:32 +09:00
Randy Mackay
b71c6bfd76 TradHeli: add RSC_RUNUP_TIME param and rotor speed estimate 2013-11-15 22:58:29 +09:00
Randy Mackay
bc4dba0eea TradHeli: ext gyro gain range 0 to 1000 2013-11-15 22:58:26 +09:00
Randy Mackay
197fc67897 TradHeli: move pilot desired rotor speed to heli.pde 2013-11-15 22:58:24 +09:00
Randy Mackay
942c14258b TradHeli: ramp up changes
Rewrote tail and main rotor ramp up methods
Moved direct drive ESC speed control into rsc_control method
Pass in ch7 servo as servo_aux to TradHeli motors object constructor
split CH7_SETPOINT parameter into GYR_GAIN and DIRECTDRIVE parameters
replaced RSC_RATE with uint8_t RSC_RAMP_TIME parameter
rename GOV_SETPOINT parameter to RSC_SETPOINT
RSC_MODE parameter description updated to indicate it controls the
source of main rotor speed
2013-11-15 22:58:13 +09:00
Robert Lefebvre
9ac051c56d TradHeli: BugFix to ColYaw
Credit to Jolyon Saunders for finding this bug.
2013-11-15 22:58:11 +09:00
Robert Lefebvre
4426060ccc TradHeli: COLYAW not applied when the motor is not running 2013-11-15 22:58:06 +09:00
Robert Lefebvre
9ae66c1773 TradHeli: add support for drive tail rotors
Repurposed external gyro and made it multi-funcitonal.
required PWM on Ch8 to start the motor in RSC Mode moved up from 100 to 400. This is to facilitate two-stage switching of the motors with PWM>100 starting the tail motor, and PWM>400 starting the main motor.
Additional amendments by Randy
2013-11-15 22:58:04 +09:00
Randy Mackay
7ae0d3320b TradHeli: add landing collective min 2013-11-15 22:57:58 +09:00
Randy Mackay
1f65bb537f TradHeli: add get_pilot_desired_collective
Perhaps this should be moved to the main code's heli.pde sketch
2013-11-15 22:57:51 +09:00
Randy Mackay
13a412ee21 TradHeli: make parameters and variables private
add accessors for variables and params required in main code
replace tabs with spaces
2013-11-15 22:57:41 +09:00
Randy Mackay
2cc48ffcd6 Copter: formatting and param description changes 2013-11-15 22:57:37 +09:00
Randy Mackay
d54b1ea446 CopterMotors: fix example sketch 2013-11-14 22:27:10 +09:00
Randy Mackay
ce045c77a4 Copter: remove unused variable from Single copter 2013-11-14 22:26:53 +09:00
Randy Mackay
14dc1a1c88 Copter: add @User and @Increment to motor params description 2013-11-13 12:28:59 +09:00
Randy Mackay
e53c57b0a6 Copter: default SPIN_WHEN_ARMED to zero 2013-11-13 12:28:01 +09:00
Randy Mackay
81d83f1c55 SingleCopter: formatting changes
replace tab with 4-spaces
remove blank lines
2013-11-12 23:40:29 +09:00
ssq870424
07d3f2a3c5 Copter: add support for singlecopter airframe
this is the newest singlecopter airframe programme.
This kind of aerial vehicles include Honeywell T-hawk and Goldeneye.
2013-11-12 23:40:27 +09:00
Robert Lefebvre
5d946be77c TradHeli: Change user description for COLYAW parameter. 2013-11-03 12:56:59 +09:00
Randy Mackay
bb1664185f Copter: correct @Range of MOT_TCRV_MAXPCT parameter 2013-10-30 20:53:21 +09:00
texlan
78acea820f Copter: fix symmetry in stability patch for Tricopters
Removes the "Increase opposing motors by 1/2 the overage of the high
motor" logic and merely moves all 3 motors down by the same amount if
one is over out_max. This eliminates the asymmetric scaling of
the previous logic when more than one motor is over out_max. This
resolves #537
2013-10-21 20:12:53 +09:00
Randy Mackay
943d7374f6 Copter: slow start motors from 0 to min throttle 2013-10-20 14:51:35 +09:00
texlan
53553751d1 Copter: Correctly set limit.lower flags for Tricopters
Resolves #536
2013-10-19 23:08:25 +09:00
Randy Mackay
e0c4785b2a Copter: OctaQuad H-frame support 2013-10-18 10:41:07 +09:00
Randy Mackay
d3fcfe669d Copter Motors: increase MOT_SPIN_ARMED to int16 2013-09-18 13:28:01 +09:00
Andrew Tridgell
5bef6dd539 AP_Motors: fixed example build 2013-09-13 10:53:53 +10:00
Randy Mackay
0a047ae1c1 Copter Motors: increased spin-when-armed to 70
Changed choices to be displayed in ground stations
2013-09-12 22:36:04 +09:00
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
2013-09-12 22:27:44 +09:00
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
2013-08-30 13:01:39 +10:00
Andrew Tridgell
01387a1553 AP_Motors: fixed examples build 2013-08-30 13:01:39 +10:00
Randy Mackay
0797489ad8 Motors: use AP_Notify static flags variable 2013-08-30 13:01:35 +10:00
Randy Mackay
f8a872f01e AP_Motors: update notify 2013-08-30 13:01:34 +10:00
Randy Mackay
8d26fb5581 Copter Motors: by default spin motors at 65 when armed 2013-07-28 18:18:52 +09:00
Randy Mackay
fe412437c2 Copter: add flags for upper and lower throttle limits
Freeze desired altitude when motors hit a limit
2013-07-28 18:18:39 +09:00
Randy Mackay
f3a2db195e Copter Motors: remove old style stability patch 2013-07-25 15:34:04 +09:00
Randy Mackay
43379f20c3 Copter Motors: replace limit bitmask with structure 2013-07-21 13:58:24 +09:00
Robert Lefebvre
c812d07993 TradHeli: Creating motor_runup_complete bool which is to confirm that the heli motor is running. This will be used for advanced features in the future. 2013-07-19 16:16:08 +09:00
Robert Lefebvre
957cb094ea TradHeli: Remove unused RSC Mode 3. 2013-07-19 16:16:06 +09:00
Randy Mackay
336357fbaf Copter: ensure _spin_when_armed is not higher than _min_throttle 2013-07-16 15:25:57 +09:00
Randy Mackay
62f3eed4e0 Copter: fix to SPIN_ARMED parameter desciption 2013-07-16 12:59:38 +09:00
Randy Mackay
b709b90a59 Copter: implement safety spin for Tricopters 2013-07-16 12:48:01 +09:00
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
2013-07-16 12:47:59 +09:00
Jonathan Challinger
2725f219cb Copter: Warn user with motors while copter is arming 2013-07-16 12:47:51 +09:00
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 2013-07-16 12:47:49 +09:00
rmackay9
073e2c9f15 ACMotors: bug fix to yaw limit 2013-07-05 13:51:59 -10:00
Randy Mackay
76028fc9d3 Copter Motors: use _min_throttle in output_test 2013-05-31 15:16:04 +09:00
Randy Mackay
28f2f87b26 Copter Motors: minor formatting change 2013-05-31 15:16:04 +09:00
Andrew Tridgell
81f7ae9108 AP_Motors: fixed indent-tabs-mode 2013-05-30 09:51:34 +10:00
Randy Mackay
ec7ee47099 Copter: scaling stability patch 2013-05-27 11:21:31 +09:00
Randy Mackay
6a65a32de2 CopterMotors: add formatting info to top of files 2013-05-20 10:48:42 +09:00
Randy Mackay
5235f4cacd Copter: allow Tri copters to init ESCs through APM/PX4 2013-05-19 17:28:39 +09:00
Randy Mackay
610edd8f9a ACMotors: small formatting change 2013-05-14 19:01:53 +09:00
Randy Mackay
cd5795a4ac ACMotors: make a few more functions non-virtual
Saves at least 22 bytes of RAM
2013-05-14 18:23:36 +09:00
Randy Mackay
ad00e0ee1e ACMotors: make test_order uint_8 2013-05-14 18:03:34 +09:00
Randy Mackay
88893f4209 ACMotors: make a few functions non-virtual 2013-05-14 17:41:12 +09:00
Randy Mackay
bd07b1e57b ACMotors: remove unused get_num_motors function
Saves about 4 bytes of RAM
2013-05-14 17:35:27 +09:00
Randy Mackay
5bb0582854 ACMotors: ESC Calibration only for enabled motors 2013-05-14 17:07:36 +09:00
Randy Mackay
33d1129904 Copter: remove unused TB_RATIO parameter 2013-05-14 16:56:55 +09:00
Randy Mackay
7a81c41689 AP_Motors: motor_enabled array to bool
Also increased the default MAX_THROTTLE from 850 to 1000 but this number
is always overwritten by the main code anyway so should have no
functional impact.
2013-05-14 16:05:22 +09:00
Randy Mackay
1cfd5900a8 Copter: add support for H-quad frame
H-quads are like X quads but the motors spin in the opposite direction.
Having the motors reversed seems to help with yaw authority because of
the slight flex in bodies
2013-05-03 23:13:40 +09:00
Randy Mackay
cb5f8826f8 Copter: Leonard's fix for trapezoidal frame
We need to allow yaw_factors to be floats in the add_motor method
2013-04-25 17:52:19 +09:00
Randy Mackay
1a7cffefe6 TradHeli: change coll_out to int16_t
was incorrectly defined as an AP_Int16 parameter
2013-04-24 11:32:26 +09:00