1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-27 16:54:15 +01:00

OP-1330 reset Home Set delay timer if Set==true

This commit is contained in:
Alessio Morale 2014-05-12 22:56:28 +02:00
parent 953b7cc2a7
commit 47976312c2

View File

@ -202,6 +202,7 @@ static void gpsTask(__attribute__((unused)) void *parameters)
{ {
portTickType xDelay = 100 / portTICK_RATE_MS; portTickType xDelay = 100 / portTICK_RATE_MS;
uint32_t timeNowMs = xTaskGetTickCount() * portTICK_RATE_MS; uint32_t timeNowMs = xTaskGetTickCount() * portTICK_RATE_MS;
#ifdef PIOS_GPS_SETS_HOMELOCATION #ifdef PIOS_GPS_SETS_HOMELOCATION
portTickType homelocationSetDelay = 0; portTickType homelocationSetDelay = 0;
#endif #endif
@ -272,6 +273,8 @@ static void gpsTask(__attribute__((unused)) void *parameters)
setHomeLocation(&gpspositionsensor); setHomeLocation(&gpspositionsensor);
homelocationSetDelay = 0; homelocationSetDelay = 0;
} }
} else {
homelocationSetDelay = 0;
} }
#endif #endif
} else if ((gpspositionsensor.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) && } else if ((gpspositionsensor.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) &&