|
|
|
@ -2,11 +2,6 @@
@@ -2,11 +2,6 @@
|
|
|
|
|
#include "Plane.h" |
|
|
|
|
|
|
|
|
|
bool ModeQLoiter::_enter() |
|
|
|
|
{ |
|
|
|
|
return plane.mode_qstabilize._enter(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void ModeQLoiter::init() |
|
|
|
|
{ |
|
|
|
|
// initialise loiter
|
|
|
|
|
loiter_nav->clear_pilot_desired_acceleration(); |
|
|
|
@ -23,6 +18,7 @@ void ModeQLoiter::init()
@@ -23,6 +18,7 @@ void ModeQLoiter::init()
|
|
|
|
|
|
|
|
|
|
// prevent re-init of target position
|
|
|
|
|
quadplane.last_loiter_ms = AP_HAL::millis(); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void ModeQLoiter::update() |
|
|
|
@ -43,7 +39,7 @@ void ModeQLoiter::run()
@@ -43,7 +39,7 @@ void ModeQLoiter::run()
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!quadplane.motors->armed()) { |
|
|
|
|
plane.mode_qloiter.init(); |
|
|
|
|
plane.mode_qloiter._enter(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
quadplane.check_attitude_relax(); |
|
|
|
|