Commit Graph

24 Commits

Author SHA1 Message Date
Randy Mackay 010665f915 Copter: fix esc calibration for one-shot
the cork and push need to be done from the vehicle level
2017-05-23 07:57:17 +09:00
Randy Mackay 0e7f12049c Copter: fix esc calibration is safety switch has been disabled 2017-05-11 11:30:05 +09:00
Randy Mackay f9c8bb1b01 Copter: ensure esc calibration only occurs on next reboot
It was possible for a board with no safety switch attached to get stuck waiting for the user to press the non-existance switch.  Rebooting now resolves the problem because the ESC_CAL parameter is reset to zero regardless of whether the calibration completes or not.
2017-05-11 11:30:05 +09:00
Randy Mackay a3450a955d Copter: fix LED notify during auto esc calibration 2017-05-11 11:30:05 +09:00
Andrew Tridgell 49b18819ce Copter: enable channels in ESC calibration 2017-05-01 14:32:18 +10:00
Randy Mackay 032bfad79f Copter: move rc input check to esc_calibration_startup_check
No functional change
2017-04-18 09:29:55 +09:00
Randy Mackay 6726d94537 Copter: update notify during ESC calibration
The notify devices including the RGB were not being updated meaning the main LED was normally frozen or off during calibration.  The desired behaviour is that it flashes red, blue, yellow.
2017-01-27 12:14:56 +09:00
Peter Barker ab13b3beaf Copter: make rc checks verbose on failure 2017-01-20 13:02:53 +09:00
Peter Barker bd6ffc025e Copter: start conversion to AP_Arming_Copter 2017-01-17 11:45:08 +09:00
Andrew Tridgell 0f6d0c5ba9 Copter: combined tri, single, coax and multicopter into a single build
this allows copter to be just 2 builds, one for heli, and one for
everything else
2017-01-12 17:39:37 +11: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 d186e1c648 Copter: improve the reliability of ESC calibration with OneShot ESCs
run at higher rate and make sure we're always giving output
2016-08-29 15:52:21 +10:00
mirkix e3934fac80 ArduCopter: Delete (wrong) filename out of header 2016-07-25 17:13:41 -03:00
Randy Mackay f28666e7cd Copter: pass throttle for esc calibration in 0 to 1 range 2016-05-24 10:00:25 +09:00
skyscraper 6f200fa923 ArduCopter: Fix up after refactoring RC_Channel class
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:16 +10:00
Luis Vale Gonçalves 3199829d45 Copter: revisions to text strings sent to GCS 2015-11-27 16:16:58 +09:00
lvale 549695181c Copter: revised and uniformization of severity messages 2015-11-05 12:20:49 +09:00
Lucas De Marchi 84da1f5039 Rename gcs_send_text_P to gcs_send_text 2015-10-30 14:35:07 +09:00
Lucas De Marchi 2c38e31c93 Remove use of PSTR
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.

This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.

AVR-specific places were not changed.
2015-10-30 14:35:04 +09:00
squilter 767b4da5b6 Copter: update send text severities 2015-08-25 14:05:25 +09:00
Randy Mackay 0f174053d6 Coptre: disable esc calibration for TradHeli 2015-07-21 16:26:14 +09:00
Randy Mackay 1a911553eb Copter: allow disabling ESC calibration 2015-07-13 09:33:35 +09:00
Andrew Tridgell 278883c521 Copter: finished conversion to .cpp files
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2015-05-30 15:21:19 +09:00
Andrew Tridgell 356ece3402 Copter: rename .pde files to .cpp files 2015-05-30 15:21:15 +09:00