Commit Graph

147 Commits

Author SHA1 Message Date
Andrew Tridgell ee78374513 RC_Channel: added GPS_DISABLE option on a switch 2018-11-29 08:49:23 +11:00
Andrew Tridgell 285935f8b3 RC_Channel: added reverse throttle RC option
used in plane for reverse on a switch
2018-11-16 08:33:35 +11:00
Andrew Tridgell 7fad72dacf RC_Channel: moved LANDING_GEAR to common library 2018-11-09 14:35:14 +11:00
Andrew Tridgell eac7c28005 RC_Channel: allow landing gear control for plane 2018-11-09 14:35:14 +11:00
IamPete1 e42c3c6fab RC_Channel: add Sailboat Tack to aux switch 2018-11-01 18:04:19 +09:00
Randy Mackay 2c29f0d45a RC_Channel: handle AC_Avoid enable and disable
Also change Copter's option from Object Avoidance to Proximity Avoidance
due to impending AP_Avoidance stuff

RC_Channel: update aux switch param docs to add object avoidance
2018-10-30 12:10:42 +11:00
Andrew Tridgell 5fe9334a18 RC_Channel: allow compass learning to be triggered on option
this allows for RCn_OPTION=62 to trigger compass learning, so you can
enable in-flight without using the GCS
2018-10-24 07:25:42 +10:00
Peter Barker c7d052eec8 RC_Channel: add const keyword to many methods 2018-10-23 12:30:35 +11:00
CAO MUQING 09030b1b13 RC_Channel: add aux switch options for ZigZag mode and ZigZag SaveWP 2018-10-05 10:05:45 +09:00
Ammarf 2beb3a278a RC_Channel: add simple mode to aux functions 2018-09-11 16:43:17 +09:00
Peter Barker 0cf12ad47e RC_Channel: add aux option to fly inverted for Plane 2018-09-07 09:07:40 +10:00
Peter Barker bd5cdf9e64 RC_Channel: update aux options for planes to include arm/disarm 2018-09-06 08:26:50 +10:00
Peter Barker 10d7cc6bf4 RC_Channel: add Plane support for channel options 2018-09-05 13:47:19 +10:00
Peter Barker 9650846497 RC_Channel: treat UINT16_MAX as a value of 0 in set_override
This shouldn't really in in RC_Channels - when we move the mavlink
packet handling up to the GCS_MAVLink base class we should move this
into there.
2018-09-05 11:54:32 +10:00
Peter Barker 1c527df084 RC_Channel: note that Rover now has disable-gcs-overrides channel option 2018-09-05 11:54:32 +10:00
Peter Barker 047689981b RC_Channel: honour gcs_overrides_enabled as part of set_override
This will stop situations like we currently have where the
MANUAL_CONTROL GCS mavlink packets can still affect the vehicle

Also resolves an issue where has_new_overrides may not be set
appropriately
2018-09-05 11:54:32 +10:00
Peter Barker 7bdd9b1aea RC_Channel: move handling of disable-gcs-rc-overrides-channel-option 2018-09-05 11:54:32 +10:00
Peter Barker 3c8738b4d8 RC_Channel: add clear-waypoints option 2018-09-04 10:32:26 +10:00
Peter Barker a7acc92663 RC_Channel: move rc-channel option for lost-vehicle sound up to base class 2018-09-03 16:57:25 +09:00
Michael du Breuil 80597d5cba RC_Channel: Fix accidental quantization of override_timeout to 1 second 2018-08-28 14:18:54 +10:00
Peter Barker f2b8c9e501 RC_Channel: improve debug when failing to initialise RC channel 2018-08-21 20:34:01 +09:00
Peter Barker e4d3ed7e39 RC_Channel: move handling of sprayer and gripper in from Copter 2018-08-17 15:33:35 +09:00
Michael du Breuil e7ebea55d2 RC_Channel: Fix possible user induced out of bounds write
CID 308348
2018-08-09 10:27:10 +10:00
Peter Barker e4ff937c96 RC_Channel: remove min-max-configured pre-arm checks
These are really, really expensive to run while your RC isn't
configured.

We now have a split between inputs (RC) and servos (SRV), so these
aren't as critical as they were.  We also have range checks to ensure
they're roughly good enough to fly with.
2018-08-07 09:45:09 +10:00
Peter Barker f2b1387c1c RC_Channel: add AUTOTUNE to init_aux_function routine
Also, cark it in SITL if we fail to initialise an aux function
2018-08-05 07:52:28 +10:00
Peter Barker 61c34ea98c RC_Channel: move handling of auxillary switches into RC_Channel
RC_Channel: move handling of Rover's functions into RC_Channel

RC_Channel: move auxsw handling for camera to base RC_Channel

RC_Channel: add responsibility for servorelay events

RC_Channel: move mode switch handling to base class
2018-08-01 12:11:30 +09:00
Michael du Breuil 60f19bbf02 RC_Channel: Allow an input to be ignored 2018-08-01 09:19:20 +10:00
Michael du Breuil 16b6201195 RC_Channel: Allow a RC_OVERRIDE_TIMEOUT of -1 to use the overrides
forever
2018-07-19 07:53:43 +10:00
Michael du Breuil 95eda5d9b7 RC_Channel: Remove unneeded interfaces 2018-06-11 16:29:36 -07:00
Michael du Breuil 0fcf07fde7 RC_Channel: Remove input() method from individual channels 2018-06-05 09:51:09 +10:00
Michael du Breuil 4253c7f74d RC_Channel: Move overrides out of the HAL 2018-06-05 09:51:09 +10:00
Michael du Breuil c8fdb90ab5 RC_Channel: Rework set_pwm_no_deadzone() to a recompute function 2018-04-14 14:05:20 +10:00
Andrew Tridgell e5813effff RC_Channel: improved efficiency of min_max_configured
this is quite a costly function due to scan in AP_Param. It takes
about 4 to 5 milliseconds when done as part of AP_Arming
2018-01-10 16:42:51 +09:00
Andrew Tridgell 0155434057 RC_Channel: fixed bug in manual with TRIM == MIN
This fixes the bug described here:

https://discuss.ardupilot.org/t/arduplane-reverse-thrust-setup/18324/5

which otherwise would prevent output with TRIM == MIN or TRIM == MAX
2017-08-26 20:30:54 +10:00
Dr.-Ing. Amilcar Do Carmo Lucas ed07d5b5c9 RC_Channel: Improve the PWM parameters descriptions 2017-06-06 11:06:26 +10:00
Dr.-Ing. Amilcar Do Carmo Lucas 8661bdda8a RC_Channel: 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 d6d94bd26c RC_Channel: improved doc string 2017-02-07 16:32:57 +11:00
Andrew Tridgell 11afd0c7d4 RC_Channel: split RC_Channels.cpp out to separate cpp file
this is needed for automatic parameter documentation generation
2017-02-06 15:12:32 +11:00
Andrew Tridgell 0791186cd2 RC_Channel: split SRV_Channel into separate directory 2017-01-12 17:39:37 +11:00
Andrew Tridgell 64aa13e7f4 RC_Channel: 2nd stage of SRV_Channels conversion
allow for 16 output channel objects
2017-01-12 17:39:37 +11:00
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02: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 73b9123495 RC_Channel: added set_trim() API to SRV_Channels object 2016-10-15 16:59:35 +11:00
Andrew Tridgell fea7903aa8 RC_Channel: added get_radio_out_normalised() 2016-10-15 16:59:35 +11:00
Andrew Tridgell 96c7d9dde8 RC_Channel: make output_trim() go via _radio_out
this ensures that _radio_out always contains the value that would be
output to the channel. This will be used by the SRV_Channels object
2016-10-15 16:59:35 +11:00
Andrew Tridgell 934d2b6ae4 RC_Channel: added setup_failsafe_trim_mask() 2016-06-30 16:46:57 +10:00
skyscraper d9ab3baf84 RC_Channel: Refactor to make data members private
rename all public data members of RC_Channnels with
leading underscore and make all data members private.
Provide get_xx and set_xx methods for access

 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)

add function to save radio trim
(expression where c is an object of type RC_Channel)
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);
// other
c.min_max_configured() // return true if min and max are configured
c.save_radio_trim()    // save radio trim to eeprom
2016-05-10 16:21:15 +10:00
skyscraper 134ea338da RC_Channel: remove unused control_mix method 2016-05-05 18:58:17 -03:00
Ricardo de Almeida Gonzaga 5bd034a5a8 Global: start using cmath instead of math.h 2016-04-05 21:06:19 -07:00
Andrew Tridgell 4deb01b8d5 RC_Channel: set AP_PARAM_NO_SHIFT 2016-03-18 12:33:34 +11:00