1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

Initialize loop variable OUTSIDE loop so that baro is used still for altitude

hold.
This commit is contained in:
James Cotton 2012-03-10 11:28:51 -06:00
parent f4705551b6
commit 820ca6a970

View File

@ -139,8 +139,8 @@ static void altitudeHoldTask(void *parameters)
enum init_state {WAITING_BARO, WAITIING_INIT, INITED} init = WAITING_BARO;
// Main task loop
bool baro_updated = false;
while (1) {
bool baro_updated = false;
// Wait until the AttitudeRaw object is updated, if a timeout then go to failsafe
if ( xQueueReceive(queue, &ev, 100 / portTICK_RATE_MS) != pdTRUE )
{