Drift: get velocity using const reference

This commit is contained in:
Randy Mackay 2014-04-05 23:19:31 +09:00
parent 02775e8dc5
commit 729026d80c
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ static void drift_run()
pilot_throttle_scaled = get_pilot_desired_throttle(g.rc_3.control_in);
// Grab inertial velocity
Vector3f vel = inertial_nav.get_velocity();
const Vector3f& vel = inertial_nav.get_velocity();
// rotate roll, pitch input from north facing to vehicle's perspective
float roll_vel = vel.y * ahrs.cos_yaw() - vel.x * ahrs.sin_yaw(); // body roll vel