From 319b53a34212e3ab6175d168fbfd679d35dce003 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Sat, 10 Mar 2012 16:05:22 -0600 Subject: [PATCH] Make sure full initialization routine for INSGPS occurs each time it is restarted. --- flight/Modules/Attitude/revolution/attitude.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flight/Modules/Attitude/revolution/attitude.c b/flight/Modules/Attitude/revolution/attitude.c index a83dba342..4c0d0f1fc 100644 --- a/flight/Modules/Attitude/revolution/attitude.c +++ b/flight/Modules/Attitude/revolution/attitude.c @@ -464,7 +464,10 @@ static int32_t updateAttitudeINSGPS(bool first_run, bool outdoor_mode) uint16_t sensors = 0; float dT; - inited = first_run ? false : inited; + if (first_run) { + inited = false; + init_stage = 0; + } // Wait until the gyro and accel object is updated, if a timeout then go to failsafe if ( (xQueueReceive(gyroQueue, &ev, 10 / portTICK_RATE_MS) != pdTRUE) ||