|
|
@ -294,6 +294,8 @@ static void do_land() |
|
|
|
|
|
|
|
|
|
|
|
static void do_approach() |
|
|
|
static void do_approach() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
// Make sure we are not using this to land |
|
|
|
|
|
|
|
if(g.rtl_approach_alt > 5){ |
|
|
|
wp_control = LOITER_MODE; |
|
|
|
wp_control = LOITER_MODE; |
|
|
|
|
|
|
|
|
|
|
|
// just to make sure |
|
|
|
// just to make sure |
|
|
@ -311,6 +313,9 @@ static void do_approach() |
|
|
|
|
|
|
|
|
|
|
|
// Set target alt based on user setting |
|
|
|
// Set target alt based on user setting |
|
|
|
set_new_altitude(g.rtl_approach_alt * 100); |
|
|
|
set_new_altitude(g.rtl_approach_alt * 100); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
set_mode(LOITER); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void do_loiter_unlimited() |
|
|
|
static void do_loiter_unlimited() |
|
|
|