Ardupilot2/ArduPlane/mode_autotune.cpp
Peter Barker a1ea1306a1 Plane: use pure-virtual method for allows_throttle_nudging
In place of a state variable which could become stale
2021-01-10 16:04:30 +11:00

24 lines
346 B
C++

#include "mode.h"
#include "Plane.h"
bool ModeAutoTune::_enter()
{
plane.auto_throttle_mode = false;
plane.auto_navigation_mode = false;
plane.autotune_start();
return true;
}
void ModeAutoTune::_exit()
{
// restore last gains
plane.autotune_restore();
}
void ModeAutoTune::update()
{
plane.mode_fbwa.update();
}