diff --git a/ArduPlane/ArduPlane.pde b/ArduPlane/ArduPlane.pde index 0c4d646356..179cdbec24 100644 --- a/ArduPlane/ArduPlane.pde +++ b/ArduPlane/ArduPlane.pde @@ -27,13 +27,13 @@ // Header includes //////////////////////////////////////////////////////////////////////////////// +#include #include #include #include #include #include -#include #include #include #include // ArduPilot GPS library @@ -498,7 +498,9 @@ static struct { bool locked_course; float locked_course_err; } steer_state = { - hold_course_cd : -1, + hold_course_cd : -1, + locked_course : false, + locked_course_err : 0 }; diff --git a/ArduPlane/Attitude.pde b/ArduPlane/Attitude.pde index 1a32c649dc..860f6a2c05 100644 --- a/ArduPlane/Attitude.pde +++ b/ArduPlane/Attitude.pde @@ -22,10 +22,10 @@ static float get_speed_scaler(void) speed_scaler = constrain_float(speed_scaler, 0.5, 2.0); } else { if (channel_throttle->servo_out > 0) { - speed_scaler = 0.5 + ((float)THROTTLE_CRUISE / channel_throttle->servo_out / 2.0); // First order taylor expansion of square root + speed_scaler = 0.5f + ((float)THROTTLE_CRUISE / channel_throttle->servo_out / 2.0f); // First order taylor expansion of square root // Should maybe be to the 2/7 power, but we aren't goint to implement that... }else{ - speed_scaler = 1.67; + speed_scaler = 1.67f; } // This case is constrained tighter as we don't have real speed info speed_scaler = constrain_float(speed_scaler, 0.6, 1.67);