Commit Graph

71 Commits

Author SHA1 Message Date
Andrew Tridgell 12e0012b16 Plane: allow for NAV_LOITER_UNLIM and NAV_LOITER_TIME in quadplane 2016-05-11 15:57:41 +10:00
Andrew Tridgell 3fc43b94f9 Plane: separate out auto and guided VTOL states
this prevents a switch to AUTO from using VTOL mode incorrectly
2016-05-11 15:14:43 +10:00
Andrew Tridgell 691d4b6ca7 Plane: added local reached_loiter_target()
this distinguishes between VTOL and fixed wing loiter targets
2016-05-11 05:55:26 +10:00
Andrew Tridgell 6b358a5618 Plane: added Q_GUIDED_MODE parameter
this allows you to do hybrid VTOL and fixed wing guided mode
2016-05-11 05:55:25 +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
Tom Pittenger ec3e9014e4 Plane: move target land_airspeed logic to top layer
- this is to allow min groundspeed to be enforced which is otherwise lost when TECS assigns a target airspeed at the lower level
2016-04-21 21:30:50 -07:00
Andrew Tridgell a7006a7784 Plane: refactor perf variables into a structure 2016-04-21 16:45:02 +10:00
Michael du Breuil c17ea21a97 Plane: Add support for DO_REPOSITION via COMMAND_INT
also allows guided to change loiter directions
2016-04-17 19:00:03 -07:00
Andrew Tridgell 62574b35b5 Plane: fixed negative loiter radius values 2016-04-18 09:33:20 +10:00
Tom Pittenger ff57884eca Plane: renamed variable, non-functional change 2016-04-14 13:18:35 -07:00
Andrew Tridgell f0eddd6366 Plane: ensure we always eventually capture a loiter 2016-03-18 13:47:45 +11:00
Andrew Tridgell d7d528560d Plane: don't start summing for loiter until we reach loiter circle 2016-03-10 15:43:28 +11:00
Tom Pittenger ff249788bf Plane: add a default Navigation option as explained in the param docs 2016-03-03 09:16:26 -08:00
Tom Pittenger 9e452838ab Plane: loiter missions to default to loiter_radius if mission says 0 or 1.
- except loiter_unlim which uses RTL_loiter, although I'm not sure why.
2016-02-29 10:12:20 -08:00
Andrew Tridgell 23eef91c59 Plane: added parameter RTL_RADIUS
this allows the loiter radius for RTL to be controlled separately from
the radius for loiter (as requested by a user)
2016-01-19 15:04:30 +11:00
Tom Pittenger 7978872e32 AP_Plane: set path_propportion in TECS 2016-01-09 13:25:02 +11:00
Tom Pittenger d18c25a0f9 Plane: add item_reached_msg to GUIDED 2015-12-31 15:31:39 +11:00
Jonathan Challinger 05eb723429 Plane: reflect renamed function in AP_AHRS 2015-12-18 18:08:37 +11:00
Tom Pittenger 178bbb080b Plane: improve crosstrack error while navigating to loiter point
There is no crosstrack concept in the loiter navigation so when going from waypoint to loiter you will not converge onto the line between those two points. This commit adds crosstracking by performing normal waypoint navigation until you get near it.
2015-11-09 08:25:26 +11:00
Andrew Tridgell b92c2409e4 Plane: added local millis() and micros() to reduce code size a bit 2015-05-21 07:48:53 +10:00
Andrew Tridgell 18c37935c9 Plane: convert from .pde to .cpp files 2015-05-21 07:48:52 +10:00