mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
Quick RTL Fix, logic was backward
This commit is contained in:
parent
05ee33d9ad
commit
c25478448b
@ -1125,6 +1125,9 @@ static void update_navigation()
|
|||||||
|
|
||||||
case RTL:
|
case RTL:
|
||||||
if((wp_distance <= g.waypoint_radius) || check_missed_wp()){
|
if((wp_distance <= g.waypoint_radius) || check_missed_wp()){
|
||||||
|
// lets just jump to Loiter Mode after RTL
|
||||||
|
set_mode(LOITER);
|
||||||
|
}else{
|
||||||
// calculates desired Yaw
|
// calculates desired Yaw
|
||||||
// XXX this is an experiment
|
// XXX this is an experiment
|
||||||
#if FRAME_CONFIG == HELI_FRAME
|
#if FRAME_CONFIG == HELI_FRAME
|
||||||
@ -1132,9 +1135,6 @@ static void update_navigation()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
wp_control = WP_MODE;
|
wp_control = WP_MODE;
|
||||||
}else{
|
|
||||||
// lets just jump to Loiter Mode after RTL
|
|
||||||
set_mode(LOITER);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// calculates the desired Roll and Pitch
|
// calculates the desired Roll and Pitch
|
||||||
|
Loading…
Reference in New Issue
Block a user