From 586f8a9ca818bf2d936f6202aaa7ccf856af31f5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 23 Jan 2017 09:29:51 +1100 Subject: [PATCH] Plane: fixes for tilt quadplane after rebase --- ArduPlane/quadplane.cpp | 2 +- ArduPlane/tiltrotor.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ArduPlane/quadplane.cpp b/ArduPlane/quadplane.cpp index 3a852e4429..ce0f38990d 100644 --- a/ArduPlane/quadplane.cpp +++ b/ArduPlane/quadplane.cpp @@ -332,7 +332,7 @@ const AP_Param::GroupInfo QuadPlane::var_info[] = { // @DisplayName: Tiltrotor type // @Description: This is the type of tiltrotor when TILT_MASK is non-zero. A continuous tiltrotor can tilt the rotors to any angle on demand. A binary tiltrotor assumes a retract style servo where the servo is either fully forward or fully up. In both cases the servo can't move faster than Q_TILT_RATE // @Values: 0:Continuous,1:Binary - AP_GROUPINFO("TILT_TYPE", 46, QuadPlane, tilt.tilt_type, TILT_TYPE_CONTINUOUS), + AP_GROUPINFO("TILT_TYPE", 47, QuadPlane, tilt.tilt_type, TILT_TYPE_CONTINUOUS), AP_GROUPEND }; diff --git a/ArduPlane/tiltrotor.cpp b/ArduPlane/tiltrotor.cpp index 2e07af2530..608334b5eb 100644 --- a/ArduPlane/tiltrotor.cpp +++ b/ArduPlane/tiltrotor.cpp @@ -104,7 +104,7 @@ void QuadPlane::tiltrotor_continuous_update(void) */ void QuadPlane::tiltrotor_binary_slew(bool forward) { - RC_Channel_aux::set_servo_out_for(RC_Channel_aux::k_motor_tilt, forward?1000:0); + SRV_Channels::set_output_scaled(SRV_Channel::k_motor_tilt, forward?1000:0); float max_change = (tilt.max_rate_dps.get() * plane.G_Dt) / 90.0f; if (forward) { @@ -130,7 +130,7 @@ void QuadPlane::tiltrotor_binary_update(void) // all the way forward and run them as a forward motor tiltrotor_binary_slew(true); - float new_throttle = plane.channel_throttle->get_servo_out()*0.01f; + float new_throttle = SRV_Channels::get_output_scaled(SRV_Channel::k_throttle)*0.01f; if (tilt.current_tilt >= 1) { uint8_t mask = is_zero(new_throttle)?0:(uint8_t)tilt.tilt_mask.get(); // the motors are all the way forward, start using them for fwd thrust