2019-01-15 13:46:13 -04:00
|
|
|
#include "mode.h"
|
|
|
|
#include "Plane.h"
|
|
|
|
|
2021-09-10 03:28:21 -03:00
|
|
|
#include "qautotune.h"
|
|
|
|
|
|
|
|
#if QAUTOTUNE_ENABLED
|
|
|
|
|
2019-01-15 13:46:13 -04:00
|
|
|
bool ModeQAutotune::_enter()
|
|
|
|
{
|
2021-09-04 16:20:33 -03:00
|
|
|
#if QAUTOTUNE_ENABLED
|
|
|
|
return quadplane.qautotune.init();
|
|
|
|
#else
|
|
|
|
return false;
|
|
|
|
#endif
|
2019-01-15 13:46:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void ModeQAutotune::update()
|
|
|
|
{
|
|
|
|
plane.mode_qstabilize.update();
|
|
|
|
}
|
|
|
|
|
2021-08-14 15:53:03 -03:00
|
|
|
void ModeQAutotune::run()
|
|
|
|
{
|
|
|
|
#if QAUTOTUNE_ENABLED
|
|
|
|
quadplane.qautotune.run();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2019-04-30 01:43:10 -03:00
|
|
|
void ModeQAutotune::_exit()
|
|
|
|
{
|
|
|
|
#if QAUTOTUNE_ENABLED
|
|
|
|
plane.quadplane.qautotune.stop();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2021-09-10 03:28:21 -03:00
|
|
|
#endif
|