mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-05 21:52:10 +01:00
Initialize loop variable OUTSIDE loop so that baro is used still for altitude
hold.
This commit is contained in:
parent
f4705551b6
commit
820ca6a970
@ -139,8 +139,8 @@ static void altitudeHoldTask(void *parameters)
|
|||||||
enum init_state {WAITING_BARO, WAITIING_INIT, INITED} init = WAITING_BARO;
|
enum init_state {WAITING_BARO, WAITIING_INIT, INITED} init = WAITING_BARO;
|
||||||
|
|
||||||
// Main task loop
|
// Main task loop
|
||||||
|
bool baro_updated = false;
|
||||||
while (1) {
|
while (1) {
|
||||||
bool baro_updated = false;
|
|
||||||
// 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, 100 / portTICK_RATE_MS) != pdTRUE )
|
if ( xQueueReceive(queue, &ev, 100 / portTICK_RATE_MS) != pdTRUE )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user