Commit Graph

35 Commits

Author SHA1 Message Date
Randy Mackay 5f0a4c2097 Copter: integrate non-GPS avoidance into althold 2016-12-20 19:48:00 +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
Randy Mackay 5894a54a16 Copter: althold uses current alt target if active
Previously we always reset the altitude target to the current altitude but this causes a jump if the vehicle is already in an alt-hold flight mode but has an altitude error
2016-10-15 11:29:10 +09:00
Leonard Hall d9deab9e8e Copter: AltHold pilot feedback only spins up to min throttle 2016-08-05 12:40:37 +09:00
mirkix e3934fac80 ArduCopter: Delete (wrong) filename out of header 2016-07-25 17:13:41 -03:00
Leonard Hall 7d54c268f6 Copter: consolidate input_euler_angle calls to use smoothing gain
Previously we had _smooth and non-smooth methods in the attitude
controller but as part of the move to quaternions these have been replaced
by a single call which always takes a smoothing gain
2016-06-24 17:17:17 +09:00
Leonard Hall e9d8a28ec0 Copter: AP_Motor's throttle_hover replaces throttle_average 2016-06-18 11:55:49 +09:00
Randy Mackay 949d5f7109 Copter: add rangefinder_alt_ok
Reduces some duplicate code,no functional change.
2016-05-21 10:36:53 +09:00
Randy Mackay 7689315ba2 Copter: rename sonar to rangefinder 2016-05-21 10:36:53 +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
Randy Mackay 9c12b64ba5 Copter: rename AltHold states and swap order within select statement
No functional change
2016-05-07 10:08:30 +09:00
Randy Mackay 932cd907d4 Copter: AltHold stabilizes roll and pitch while landed 2016-05-07 10:08:28 +09:00
Randy Mackay 3ead74c4be Copter: remove zero-throttle check from AltHold takeoff state
Hard to imagine a reason why we would want to turn off stabilization during takeoff
2016-05-07 10:08:26 +09:00
Randy Mackay 1c98cd9d52 Copter: remove slow_start from althold 2016-04-01 11:59:30 +09:00
Leonard Hall d2642065dd Copter: althold uses AP_Motors set_desired_spool_state 2016-04-01 11:59:30 +09:00
Leonard Hall 70433d25e3 Copter: althold uses 0 to 1 throttle range and spool logic
stabilizes even while landed
sets desired motor spool state
check for spool up before takeoff
2016-04-01 11:59:30 +09:00
Jonathan Challinger a0b36e0eff Copter: use renamed functions in AC_AttitudeControl 2015-12-09 19:58:47 +09:00
Jonathan Challinger dfab21171b Copter: call renamed functions in AC_AttitudeControl 2015-12-09 19:58:37 +09:00
Jonathan Challinger 9d8b0f3d58 Copter: call renamed functions in AC_AttitudeControl 2015-12-09 19:58:30 +09:00
Robert Lefebvre 652283a570 Copter: Helicopters to force descent when motor is shut off 2015-12-07 14:51:39 +09:00
Randy Mackay 50e3c2ce3a Copter: minor comment updates
No functional change
2015-11-18 22:12:44 +09:00
bugobliterator 945bdee452 Copter: PILOT_VELZ_MAX and PILOT_ACCEL_Z take effect immediately 2015-11-18 22:12:41 +09:00
Leonard Hall 411e75b917 Copter: feed forward only used for AltHold, Loiter, PosHold
land modes use non-feedforward alt hold
2015-10-28 20:21:54 +09:00
Leonard Hall 543f6fdcd4 Copter: AltHold limits lean angle to maintain altitude
get_pilot_desired_lean_angles function now takes angle max parameter but
all flight modes except AltHold simply pass in the ANGLE_MAX parameter
meaning no functional change for them
2015-09-07 15:10:12 +09:00
Randy Mackay 908afad65c Copter: reset yaw angle target when disarmed or landed in AltHold 2015-07-21 16:26:50 +09:00
Randy Mackay 35a924703f Copter: change multirotor comments to multicopter
No functional change
2015-07-21 16:26:25 +09:00
Robert Lefebvre 534ba89756 Copter: Tradheli manage yaw better on the ground. 2015-07-21 16:25:16 +09:00
Robert Lefebvre 8891cd159a Copter: Tradheli to check rotor_runup_complete before allowing takeoff. 2015-06-24 11:42:48 +09:00
Randy Mackay f79ac46d60 Copter: fix althold take-off state
Also abort takeoff when switching into AltHold
2015-06-22 13:24:00 +09:00
Randy Mackay 15c57342a5 Copter: remove some comments from althold 2015-06-22 13:23:58 +09:00
Robert Lefebvre a642c88e34 Copter: AltHold state machine 2015-06-22 13:23:53 +09:00
Randy Mackay 82ad454864 Copter: log sonar_alt even when disabled 2015-06-17 12:46:55 +10:00
Randy Mackay 362a43c126 Copter: explicitly set alt_target_from_climb_rate parameter 2015-06-05 15:11:30 +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