mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
RTL: Commands.pde
When we are out of commands we land or Loiter at the RTL_Approach_altitude.
This commit is contained in:
parent
d58ceb2b09
commit
2ad08fdd98
@ -65,7 +65,12 @@ static void update_commands()
|
||||
// we will disarm the motors after landing.
|
||||
} else {
|
||||
// If the approach altitude is valid (above 1m), do approach, else land
|
||||
set_mode(((g.rtl_approach_alt >= 1) ? APPROACH : LAND));
|
||||
if(g.rtl_approach_alt >= 1){
|
||||
set_mode(LOITER);
|
||||
set_new_altitude(g.rtl_approach_alt);
|
||||
}else{
|
||||
set_mode(LAND);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user