From 7f273bd9e681e0c763d8c93201e80f6a9d0c9b8b Mon Sep 17 00:00:00 2001 From: "Richard Flay (Hyper)" Date: Sat, 4 May 2013 11:30:39 +0930 Subject: [PATCH] Fixes recent, but broken, commit of fix for OP-754. Bunny is bad. --- flight/modules/Attitude/attitude.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flight/modules/Attitude/attitude.c b/flight/modules/Attitude/attitude.c index 6f4d348f5..06b9a42c2 100644 --- a/flight/modules/Attitude/attitude.c +++ b/flight/modules/Attitude/attitude.c @@ -237,7 +237,7 @@ static void AttitudeTask(void *parameters) AttitudeSettingsAccelKiGet(&accelKi); AttitudeSettingsAccelKpGet(&accelKp); AttitudeSettingsYawBiasRateGet(&yawBiasRate); - rollPitchBiasRate = 0.0f + rollPitchBiasRate = 0.0f; if (accel_alpha > 0.0f) accel_filter_enabled = true; init = 1; @@ -437,8 +437,8 @@ static int32_t updateSensorsCC3D(AccelsData * accelsData, GyrosData * gyrosData) } // Force the roll & pitch gyro rates to average to zero during initialisation - gyro_correct_int[0] += - gyros->x * rollPitchBiasRate; - gyro_correct_int[1] += - gyros->y * rollPitchBiasRate; + gyro_correct_int[0] += - gyrosData->x * rollPitchBiasRate; + gyro_correct_int[1] += - gyrosData->y * rollPitchBiasRate; // Because most crafts wont get enough information from gravity to zero yaw gyro, we try // and make it average zero (weakly)