From 04f54928d61735d44bfb1ad7ec0c5e5d2e12703d Mon Sep 17 00:00:00 2001 From: peabody124 Date: Thu, 3 Feb 2011 20:00:00 +0000 Subject: [PATCH] Modules/Guidance: Fix a bug Dale caught about not grabbing settings and also correct a typo when NedAccel.Down wasn't used. Finally increase stack size of guidance task. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2718 ebee16cc-31ac-478f-84a7-5cbb03baadba --- flight/Modules/Guidance/guidance.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flight/Modules/Guidance/guidance.c b/flight/Modules/Guidance/guidance.c index 9b3e24143..a9b2c36fd 100644 --- a/flight/Modules/Guidance/guidance.c +++ b/flight/Modules/Guidance/guidance.c @@ -61,7 +61,7 @@ // Private constants #define MAX_QUEUE_SIZE 1 -#define STACK_SIZE_BYTES 824 +#define STACK_SIZE_BYTES 1024 #define TASK_PRIORITY (tskIDLE_PRIORITY+2) // Private types @@ -124,6 +124,7 @@ static void guidanceTask(void *parameters) // Main task loop lastUpdateTime = xTaskGetTickCount(); while (1) { + GuidanceSettingsGet(&guidanceSettings); // Wait until the AttitudeRaw object is updated, if a timeout then go to failsafe if ( xQueueReceive(queue, &ev, guidanceSettings.UpdatePeriod / portTICK_RATE_MS) != pdTRUE ) @@ -171,7 +172,7 @@ static void guidanceTask(void *parameters) // Convert from m/s to cm/s accelData.North = accel[0] * 100; accelData.East = accel[1] * 100; - accelData.North = accel[2] * 100; + accelData.Down = accel[2] * 100; NedAccelSet(&accelData);