mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 16:48:29 -04:00
Plane: quadplane: forward throttle reutrn float
This commit is contained in:
parent
2f93c1f9e4
commit
73e9c9bb43
@ -3081,7 +3081,7 @@ void QuadPlane::Log_Write_QControl_Tuning()
|
||||
reduces the need for down pitch which reduces load on the vertical
|
||||
lift motors.
|
||||
*/
|
||||
int8_t QuadPlane::forward_throttle_pct()
|
||||
float QuadPlane::forward_throttle_pct()
|
||||
{
|
||||
/*
|
||||
Unless an RC channel is assigned for manual forward throttle control,
|
||||
@ -3191,7 +3191,7 @@ int8_t QuadPlane::forward_throttle_pct()
|
||||
vel_forward.last_pct = linear_interpolate(0, vel_forward.integrator,
|
||||
height_above_ground, alt_cutoff, alt_cutoff+2);
|
||||
}
|
||||
if (vel_forward.last_pct == 0) {
|
||||
if (is_zero(vel_forward.last_pct)) {
|
||||
// if the percent is 0 then decay the integrator
|
||||
vel_forward.integrator *= 0.95f;
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ public:
|
||||
}
|
||||
|
||||
// return desired forward throttle percentage
|
||||
int8_t forward_throttle_pct();
|
||||
float forward_throttle_pct();
|
||||
float get_weathervane_yaw_rate_cds(void);
|
||||
|
||||
// see if we are flying from vtol point of view
|
||||
@ -356,7 +356,7 @@ private:
|
||||
AP_Float gain;
|
||||
float integrator;
|
||||
uint32_t last_ms;
|
||||
int8_t last_pct;
|
||||
float last_pct;
|
||||
} vel_forward;
|
||||
|
||||
struct {
|
||||
|
Loading…
Reference in New Issue
Block a user