mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
Stabilization: Bugfix: moved queue initialisation to TaskStart where it belongs
This commit is contained in:
parent
7f334a9773
commit
64c1ac3bd6
@ -99,6 +99,15 @@ static void SettingsUpdatedCb(UAVObjEvent * ev);
|
|||||||
int32_t StabilizationStart()
|
int32_t StabilizationStart()
|
||||||
{
|
{
|
||||||
// Initialize variables
|
// Initialize variables
|
||||||
|
// Create object queue
|
||||||
|
queue = xQueueCreate(MAX_QUEUE_SIZE, sizeof(UAVObjEvent));
|
||||||
|
|
||||||
|
// Listen for updates.
|
||||||
|
// AttitudeActualConnectQueue(queue);
|
||||||
|
GyrosConnectQueue(queue);
|
||||||
|
|
||||||
|
StabilizationSettingsConnectCallback(SettingsUpdatedCb);
|
||||||
|
SettingsUpdatedCb(StabilizationSettingsHandle());
|
||||||
|
|
||||||
// Start main task
|
// Start main task
|
||||||
xTaskCreate(stabilizationTask, (signed char*)"Stabilization", STACK_SIZE_BYTES/4, NULL, TASK_PRIORITY, &taskHandle);
|
xTaskCreate(stabilizationTask, (signed char*)"Stabilization", STACK_SIZE_BYTES/4, NULL, TASK_PRIORITY, &taskHandle);
|
||||||
@ -119,17 +128,6 @@ int32_t StabilizationInitialize()
|
|||||||
RateDesiredInitialize();
|
RateDesiredInitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Create object queue
|
|
||||||
queue = xQueueCreate(MAX_QUEUE_SIZE, sizeof(UAVObjEvent));
|
|
||||||
|
|
||||||
// Listen for updates.
|
|
||||||
// AttitudeActualConnectQueue(queue);
|
|
||||||
GyrosConnectQueue(queue);
|
|
||||||
|
|
||||||
StabilizationSettingsConnectCallback(SettingsUpdatedCb);
|
|
||||||
SettingsUpdatedCb(StabilizationSettingsHandle());
|
|
||||||
// Start main task
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user