mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
moved discentDistance to the beginning of the function
This commit is contained in:
parent
c9b9c1bee5
commit
6ca39c6ad1
1 changed files with 2 additions and 2 deletions
|
@ -470,6 +470,8 @@ static bool checkGPSRescueIsAvailable(void)
|
||||||
*/
|
*/
|
||||||
void updateGPSRescueState(void)
|
void updateGPSRescueState(void)
|
||||||
{
|
{
|
||||||
|
static uint16_t descentDistance;
|
||||||
|
|
||||||
if (!FLIGHT_MODE(GPS_RESCUE_MODE)) {
|
if (!FLIGHT_MODE(GPS_RESCUE_MODE)) {
|
||||||
rescueStop();
|
rescueStop();
|
||||||
} else if (FLIGHT_MODE(GPS_RESCUE_MODE) && rescueState.phase == RESCUE_IDLE) {
|
} else if (FLIGHT_MODE(GPS_RESCUE_MODE) && rescueState.phase == RESCUE_IDLE) {
|
||||||
|
@ -484,8 +486,6 @@ void updateGPSRescueState(void)
|
||||||
|
|
||||||
rescueState.isAvailable = checkGPSRescueIsAvailable();
|
rescueState.isAvailable = checkGPSRescueIsAvailable();
|
||||||
|
|
||||||
static uint16_t descentDistance;
|
|
||||||
|
|
||||||
switch (rescueState.phase) {
|
switch (rescueState.phase) {
|
||||||
case RESCUE_IDLE:
|
case RESCUE_IDLE:
|
||||||
idleTasks();
|
idleTasks();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue