Browse Source

Plane: rename update_throttle_mix

was called update_throttle_thr_mix
also minor format fixes
c415-sdk
Randy Mackay 5 years ago
parent
commit
f2ab428cdd
  1. 2
      ArduPlane/ArduPlane.cpp
  2. 6
      ArduPlane/quadplane.cpp
  3. 2
      ArduPlane/quadplane.h

2
ArduPlane/ArduPlane.cpp

@ -177,7 +177,7 @@ void Plane::update_speed_height(void)
if (quadplane.in_vtol_mode() || if (quadplane.in_vtol_mode() ||
quadplane.in_assisted_flight()) { quadplane.in_assisted_flight()) {
quadplane.update_throttle_thr_mix(); quadplane.update_throttle_mix();
} }
} }

6
ArduPlane/quadplane.cpp

@ -3150,7 +3150,7 @@ float QuadPlane::stopping_distance(void)
#define LAND_CHECK_LARGE_ANGLE_CD 1500.0f // maximum angle target to be considered landing #define LAND_CHECK_LARGE_ANGLE_CD 1500.0f // maximum angle target to be considered landing
#define LAND_CHECK_ACCEL_MOVING 3.0f // maximum acceleration after subtracting gravity #define LAND_CHECK_ACCEL_MOVING 3.0f // maximum acceleration after subtracting gravity
void QuadPlane::update_throttle_thr_mix(void) void QuadPlane::update_throttle_mix(void)
{ {
// transition will directly manage the mix // transition will directly manage the mix
if (in_transition()) { if (in_transition()) {
@ -3158,7 +3158,7 @@ void QuadPlane::update_throttle_thr_mix(void)
} }
// if disarmed or landed prioritise throttle // if disarmed or landed prioritise throttle
if(!motors->armed()) { if (!motors->armed()) {
attitude_control->set_throttle_mix_min(); attitude_control->set_throttle_mix_min();
return; return;
} }
@ -3189,7 +3189,7 @@ void QuadPlane::update_throttle_thr_mix(void)
// check for requested decent // check for requested decent
bool descent_not_demanded = pos_control->get_desired_velocity().z >= 0.0f; bool descent_not_demanded = pos_control->get_desired_velocity().z >= 0.0f;
if ( large_angle_request || large_angle_error || accel_moving || descent_not_demanded) { if (large_angle_request || large_angle_error || accel_moving || descent_not_demanded) {
attitude_control->set_throttle_mix_max(1.0); attitude_control->set_throttle_mix_max(1.0);
} else { } else {
attitude_control->set_throttle_mix_min(); attitude_control->set_throttle_mix_min();

2
ArduPlane/quadplane.h

@ -53,7 +53,7 @@ public:
void takeoff_controller(void); void takeoff_controller(void);
void waypoint_controller(void); void waypoint_controller(void);
void update_throttle_thr_mix(void); void update_throttle_mix(void);
// update transition handling // update transition handling
void update(void); void update(void);

Loading…
Cancel
Save