mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-03 11:24:10 +01:00
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
This commit is contained in:
parent
768bdbba44
commit
04f54928d6
@ -61,7 +61,7 @@
|
|||||||
|
|
||||||
// Private constants
|
// Private constants
|
||||||
#define MAX_QUEUE_SIZE 1
|
#define MAX_QUEUE_SIZE 1
|
||||||
#define STACK_SIZE_BYTES 824
|
#define STACK_SIZE_BYTES 1024
|
||||||
#define TASK_PRIORITY (tskIDLE_PRIORITY+2)
|
#define TASK_PRIORITY (tskIDLE_PRIORITY+2)
|
||||||
// Private types
|
// Private types
|
||||||
|
|
||||||
@ -124,6 +124,7 @@ static void guidanceTask(void *parameters)
|
|||||||
// Main task loop
|
// Main task loop
|
||||||
lastUpdateTime = xTaskGetTickCount();
|
lastUpdateTime = xTaskGetTickCount();
|
||||||
while (1) {
|
while (1) {
|
||||||
|
GuidanceSettingsGet(&guidanceSettings);
|
||||||
|
|
||||||
// Wait until the AttitudeRaw object is updated, if a timeout then go to failsafe
|
// Wait until the AttitudeRaw object is updated, if a timeout then go to failsafe
|
||||||
if ( xQueueReceive(queue, &ev, guidanceSettings.UpdatePeriod / portTICK_RATE_MS) != pdTRUE )
|
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
|
// Convert from m/s to cm/s
|
||||||
accelData.North = accel[0] * 100;
|
accelData.North = accel[0] * 100;
|
||||||
accelData.East = accel[1] * 100;
|
accelData.East = accel[1] * 100;
|
||||||
accelData.North = accel[2] * 100;
|
accelData.Down = accel[2] * 100;
|
||||||
NedAccelSet(&accelData);
|
NedAccelSet(&accelData);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user