Commit Graph

14 Commits

Author SHA1 Message Date
Iampete1 b31ce6734a Plane: get throttle input return float 2021-10-20 18:29:58 +11:00
Iampete1 30c9cccf78 Plane: Quadplane remove THR_MIN_PWM and THR_MAX_PWM 2021-10-11 22:19:17 -04:00
Peter Barker 3d34e061fe ArduPlane: add and use HAL_QUADPLANE_ENABLED 2021-09-14 11:23:18 +10:00
Peter Barker 7e8f812909 Plane: don't allow motortest if motors not allocated 2021-08-02 10:24:49 +10:00
Andrew Tridgell da69bf3391 Plane: added an abstraction for reverse thrust
use have_reverse_thrust() and get_throttle_input()
2018-11-16 08:33:35 +11:00
Jacob Walser 4eb00ac779 Plane: refactor output_test -> output_test_seq 2018-07-02 11:31:58 -04:00
Peter Barker af007c5f0f Plane: tighten handleMessage result type 2017-12-01 17:01:10 +00:00
Peter Barker 5a8f01c19c Plane: use send_text method on the GCS singleton 2017-07-09 17:17:29 -04: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 08dc5fab12 Plane: fixed pilot throttle based motor test 2016-09-15 18:09:35 +10:00
Andrew Tridgell 9933069679 Plane: fixed motor test by percentage in quadplane 2016-05-27 11:53:20 +10:00
skyscraper 7f29903287 ArduPlane: 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
Andrew Tridgell f73c8ab8ed Plane: allow testing of all motors in sequence
this makes for an easier startup test for a quadplane, allowing a
single MAVLink command to test that all motors are working correctly
in the right sequence
2016-04-01 11:09:51 +11:00
Andrew Tridgell 89970e4eaa Plane: support motor_test for quadplanes 2016-03-13 10:05:10 +11:00