Browse Source

Copter: fix spelling in drift mode variable name

non-functional change
master
Randy Mackay 7 years ago
parent
commit
60c3ae1ec2
  1. 10
      ArduCopter/mode_drift.cpp

10
ArduCopter/mode_drift.cpp

@ -40,7 +40,7 @@ bool Copter::ModeDrift::init(bool ignore_checks)
// should be called at 100hz or more // should be called at 100hz or more
void Copter::ModeDrift::run() void Copter::ModeDrift::run()
{ {
static float breaker = 0.0f; static float braker = 0.0f;
static float roll_input = 0.0f; static float roll_input = 0.0f;
float target_roll, target_pitch; float target_roll, target_pitch;
float target_yaw_rate; float target_yaw_rate;
@ -90,11 +90,11 @@ void Copter::ModeDrift::run()
// If we let go of sticks, bring us to a stop // If we let go of sticks, bring us to a stop
if(is_zero(target_pitch)){ if(is_zero(target_pitch)){
// .14/ (.03 * 100) = 4.6 seconds till full braking // .14/ (.03 * 100) = 4.6 seconds till full braking
breaker += .03f; braker += .03f;
breaker = MIN(breaker, DRIFT_SPEEDGAIN); braker = MIN(braker, DRIFT_SPEEDGAIN);
target_pitch = pitch_vel * breaker; target_pitch = pitch_vel * braker;
}else{ }else{
breaker = 0.0f; braker = 0.0f;
} }
// set motors to full range // set motors to full range

Loading…
Cancel
Save