mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
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.
This commit is contained in:
parent
2c7cfe435f
commit
0aec3b592c
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user