Commit Graph

153 Commits

Author SHA1 Message Date
Peter Barker 183cee3f2c AP_Motors: remove @Values from param metadata where @Bitmask exists 2021-06-23 18:37:34 +10:00
Hwurzburg 57ee6ffdfe AP_Motors: correct H_SV_MAN metadata warning 2021-05-25 10:22:21 +10:00
Peter Hall d0e1e85b9e AP_Motors: add get_frame_mav_type 2021-01-26 11:07:36 +09:00
bnsgeyer 6c8a85ee04 AP_Motors: updates to new integrator and make selectable 2020-12-21 23:33:48 -05:00
bnsgeyer 84fb3afbcb AP_Motors: Tradheli support for integrator management and hover collective learning 2020-12-21 23:33:48 -05:00
Peter Barker 41ab59dcdb AP_Motors: eliminate flags structure
Saves about 44 bytes
2020-09-22 20:26:24 +10:00
Randy Mackay 8629923783 AP_Motors: minor whitespace fix 2020-08-10 09:33:43 +09:00
Josh Welsh e77bc1ce9d AP_Motors: Tradheli servo_test fix 2020-08-10 09:16:44 +09:00
Randy Mackay 2d8c5a7bc4 AP_Motors: remove names from cpp files 2020-07-14 13:27:07 +10:00
bnsgeyer e193c45946 AP_Motors: tradheli-update parameter display names 2019-12-10 12:21:56 +09:00
bnsgeyer 05a30c756a AP_Motors: tradheli- fix metadata 2019-11-20 12:17:36 +08:00
bnsgeyer e91402aeb6 AP_Motors: tradheli-make all RSC params part of library
AP_Motors: Tradheli-fix RSC mode change while armed

AP_Motors: tradheli - improve RSC param metadata

AP_Motors: tradheli-put all throttle param settings in percent
2019-09-13 08:53:54 +09:00
Leonard Hall 036b47ec56 AP_Motors: Add seperate roll and pitch limits 2019-08-03 12:06:32 +09:00
Andrew Tridgell 8a49c84d57 AP_Motors: fixed col max and min for dual heli
fixes H_SV_MAN behaviour
2019-07-06 08:57:18 +10:00
ChristopherOlson fc84995fb9 AP_Motors:Heli - remove H_LAND_COL_MIN and replace with H_COL_MID 2019-06-04 09:48:03 +09:00
bnsgeyer f1a32d7872 AP_Motors: Tradheli- modified thrcrv and gov parameter group names 2019-06-03 07:53:01 +09:00
bnsgeyer 3629541a20 AP_Motors: Tradheli - implement enable params for throttle curve and governor 2019-06-03 07:53:01 +09:00
ChristopherOlson cca58e393a AP_Motors:Heli_RSC - add support for rotor speed governor with droop speed control 2019-06-03 07:53:01 +09:00
Peter Barker 1e606cdc5b AP_Motors: make desired spool state and spool state enum-classes
This will help avoid getting the enumerations mixed up
2019-04-14 12:18:03 +09:00
bnsgeyer 01bd99907b AP_Motors:Tradheli-swash library parameter scope improvement 2019-03-20 10:40:20 +10:00
bnsgeyer 8c46fe1c61 AP_Motors: tradheli-fix parameters for generic swashplate and other minor fixes 2019-03-20 10:40:20 +10:00
bnsgeyer 9f547cc328 AP_Motors: Tradheli - support for linear servo output for swashplates 2019-03-20 10:40:20 +10:00
bnsgeyer 28f4c68f2f AP_MotorsHeli: add spool logic support
Also moved heli init_target_on_arming flag in from vehicle code
2019-01-15 11:41:44 +09:00
bnsgeyer dec8c5de77 AP_Motors: convert heli code to use SRV_Channels
this converts the heli code to use the SRV_Channels output
functions. It does not change behaviour, but removes the last vehicle
type that did its own servo output calculations.  This change also
fixed servo initialization conflicts.

Note that this also allows helis to be setup with more than one
channel for a particular output (eg. two separate channels for tail
servo if they are wanted). This isn't likely to be used much, but does
make heli consistent with other vehicle types
2018-07-16 12:41:16 +10:00
bnsgeyer b20ebc6540 AP_Motors: Tradheli- removes unnecessary code from swash servo trim bug fix 2018-05-16 09:22:44 +10:00
bnsgeyer c8488e3333 AP_Motors: Tradheli - swashplate servo trim fix for heli single and dual frames 2018-04-24 10:30:26 +10:00
bnsgeyer 690e8fd3f4 AP_Motors: TradHeli - Changed RSC mode 3 to a spline fit throttle curve 2018-03-27 09:07:03 +11:00
ChristopherOlson 96793a3ae7 AP_Motors:TradHeli - DDVP Ramp/Runup
Change to ramp and runup DDVP tail rotor to prevent torque pitching the frame and provide runup in sync with main
rotor like a mechanically driven tail.

Fix some comments and remove indents found in whitespace in AP_MotorsHeli.cpp and AP_MotorsHeli.h
2018-03-14 09:18:07 +09:00
Andrew Tridgell e1f8e7bc58 AP_Motors: cope with H vs X frame in HeliQuad 2017-10-03 10:16:41 +11:00
Peter Barker 35d8f11e46 AP_Motors: eliminate GCS_MAVLINK::send_statustext_all 2017-07-11 23:53:53 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas 1b062d9d29 AP_Motors: Improve the PWM parameters descriptions 2017-06-06 11:06:26 +10:00
Dr.-Ing. Amilcar Do Carmo Lucas 9d9ebc91cd AP_Motors: Use SI units conventions in parameter units
Follow the rules from:
http://physics.nist.gov/cuu/Units/units.html
http://physics.nist.gov/cuu/Units/outside.html
and
http://physics.nist.gov/cuu/Units/checklist.html
one further constrain is that only printable (7bit) ASCII characters are allowed
2017-05-17 18:07:25 +10:00
Andrew Tridgell 638f1364be AP_Motors: adapt to new RC_Channel API 2017-01-12 17:39:37 +11:00
Randy Mackay 7be0f437a9 AP_Motors: consolidate matrix multicopters
AP_MOTORS_x_FRAME definitions moved to motor_frame_type enum
init function and now accepts frame-class and type to perform initial motor setup
set_frame_class_and_type allows real-time changing of motor setup
initialised_ok flag and accessor records whether setup was successful
2016-12-31 10:55:23 +09:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Andrew Tridgell 11975223dd AP_Motors: added H_RSC_POWER_NEGC and H_RSC_SLEWRATE
this gives more control over throttle for petrol
helis. H_RSC_POWER_NEGC allows for a asymmetric V-curve, which allows
for less power being put into the head when landing or when sitting on
the ground. That can lead to significantly less vibration and chance
of ground oscillation. A heli not being flown with aerobatics does not
need to use high throttle at negative collective pitch.

The H_RSC_SLEWRATE allows for a maximum throttle slew rate to be
set. Some petrol motors can cut if the throttle is moved too
quickly. We had this happen at a height of 6m when switching from
ALT_HOLD to STABILIZE mode. It also lowers the chance of the blades
skewing in their holders with the sudden change of power when the heli
is disarmed. In general it is a bad idea to do instantaneous large
movements of a IC engine throttle.
2016-07-03 18:29:05 +10:00
Ricardo de Almeida Gonzaga 2802775e7d AP_Motors: Fix typos 2016-05-13 19:20:06 -03:00
skyscraper daec4ea10e AP_Motors: Fix up after RC_Channels refactor
Further to refactor of RC_Channel class which included
adding get_xx set_xx methods, change reads and writes to the public members
to calls to  get and set functionsss

old public member(int16_t)   get function -> int16_t     set function (int16_t)
(expression where c is an object of type RC_Channel)
c.radio_in                     c.get_radio_in()           c.set_radio_in(v)
c.control_in                   c.get_control_in()         c.set_control_in(v)
c.servo_out                    c.get_servo_out()          c.set_servo_out(v)
c.pwm_out                      c.get_pwm_out()            // use existing
c.radio_out                    c.get_radio_out()          c.set_radio_out(v)
c.radio_max                    c.get_radio_max()          c.set_radio_max(v)
c.radio_min                    c.get_radio_min()          c.set_radio_min(v)
c.radio_trim                   c.get_radio_trim()         c.set_radio_trim(v);

c.min_max_configured() // return true if min and max are configured

Because data members of RC_Channels are now private and so cannot be written directly
 some overloads are provided in the Plane classes to provide the old functionality

new overload Plane::stick_mix_channel(RC_Channel *channel)
which forwards to the previously existing
void stick_mix_channel(RC_Channel *channel, int16_t &servo_out);

new overload Plane::channel_output_mixer(Rc_Channel* , RC_Channel*)const
which forwards to
(uint8_t mixing_type, int16_t & chan1, int16_t & chan2)const;

Rename functions

 RC_Channel_aux::set_radio_trim(Aux_servo_function_t function)
    to RC_Channel_aux::set_trim_to_radio_in_for(Aux_servo_function_t function)

 RC_Channel_aux::set_servo_out(Aux_servo_function_t function, int16_t value)
    to RC_Channel_aux::set_servo_out_for(Aux_servo_function_t function, int16_t value)

 Rationale:

        RC_Channel is a complicated class, which combines
        several functionalities dealing with stick inputs
        in pwm and logical units, logical and actual actuator
        outputs, unit conversion etc, etc
        The intent of this PR is to clarify existing use of
        the class. At the basic level it should now be possible
        to grep all places where private variable is set by
        searching for the set_xx function.

        (The wider purpose is to provide a more generic and
        logically simpler method of output mixing. This is a small step)
2016-05-10 16:21:15 +10:00
Randy Mackay 9b5b6f3779 AP_MotorsHeli: constrain filtered throttle
This is required because we have removed the constraint on the throttle input.  This also insures that there is no lag caused by the filtered throttle straying far outside the 0 to 1 range
2016-04-01 11:59:30 +09:00
Randy Mackay 4f1e62d551 AP_MotorsHeli: remove reset_radio_passthrough 2016-04-01 11:59:30 +09:00
Randy Mackay 9790245bf1 AP_MotorsHeli: replace collective_mid_pwm with collective_mid_pct 2016-04-01 11:59:30 +09:00
Randy Mackay e863f0b9c0 AP_MotorsHeli: use AP_Motors set_radio_passthrough in 0 to 1 range 2016-04-01 11:59:30 +09:00
Randy Mackay 47873c1d34 AP_MotorsHeli: fix RSC_SETPOINT param description 2016-04-01 11:59:30 +09:00
Randy Mackay a18722a2fc AP_MotorsHeli: output_min uses new move_actuators in -1 to +1 range 2016-04-01 11:59:30 +09:00
Leonard Hall 97f0b00e3e AP_MotorsHeli: roll, pitch, yaw input in -1 to +1 range 2016-04-01 11:59:30 +09:00
Leonard Hall d2a1cdf906 MotorsHeli: replace throttle_control_input with throttle_in
throttle_control_input was 0 to 1000 range, throttle_in is 0 to 1
2016-04-01 11:59:30 +09:00
Leonard Hall f02e8f8e01 AP_MotorsHeli: remove output_armed_not_stabilizing 2016-04-01 11:59:30 +09:00
Andrew Tridgell 1b682e3c8f AP_Motors: swash servos are output only 2016-01-05 06:41:51 +11:00
Andrew Tridgell 47b9f6598a AP_Motors: allow change to heli rotor speed controls while armed
this helps a lot with tuning for gas helis
2015-11-27 15:12:03 +09:00
Robert Lefebvre bb7f8c1999 AP_MotorsHeli: Create Servo Test functionality 2015-11-12 19:37:34 +09:00