From 0aec3b592c19af699dd423ef7f6eed1fec35dc29 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Tue, 12 Jul 2011 14:35:32 -0500 Subject: [PATCH] Changing stabilization so that the PIDs are zeroed when not armed, but NOT when the throttle is < 0. This will make things like axis-lock work while armed without throttle. HOWEVER don't hold your stick in the arming position for a long time or you can wind up the integrals now. --- flight/Modules/Stabilization/stabilization.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flight/Modules/Stabilization/stabilization.c b/flight/Modules/Stabilization/stabilization.c index 922434a32..024dd5585 100644 --- a/flight/Modules/Stabilization/stabilization.c +++ b/flight/Modules/Stabilization/stabilization.c @@ -100,7 +100,7 @@ static void SettingsUpdatedCb(UAVObjEvent * ev); int32_t StabilizationStart() { // Initialize variables - + // Start main task xTaskCreate(stabilizationTask, (signed char*)"Stabilization", STACK_SIZE_BYTES/4, NULL, TASK_PRIORITY, &taskHandle); TaskMonitorAdd(TASKINFO_RUNNING_STABILIZATION, taskHandle); @@ -329,7 +329,7 @@ static void stabilizationTask(void* parameters) } if(flightStatus.Armed != FLIGHTSTATUS_ARMED_ARMED || - !shouldUpdate || (stabDesired.Throttle < 0)) + !shouldUpdate) { ZeroPids(); }