2018-12-07 03:52:05 -04:00
|
|
|
/*
|
|
|
|
support for autotune of quadplanes
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AP_HAL/AP_HAL.h>
|
|
|
|
|
2021-09-10 03:28:21 -03:00
|
|
|
#include "quadplane.h"
|
|
|
|
|
|
|
|
#define QAUTOTUNE_ENABLED HAL_QUADPLANE_ENABLED && !HAL_MINIMIZE_FEATURES
|
2018-12-07 03:52:05 -04:00
|
|
|
|
|
|
|
#if QAUTOTUNE_ENABLED
|
|
|
|
|
2020-11-02 14:59:36 -04:00
|
|
|
#include <AC_AutoTune/AC_AutoTune_Multi.h>
|
2018-12-07 03:52:05 -04:00
|
|
|
|
2020-11-02 14:59:36 -04:00
|
|
|
class QAutoTune : public AC_AutoTune_Multi
|
2018-12-07 03:52:05 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
friend class QuadPlane;
|
|
|
|
|
|
|
|
bool init() override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
float get_pilot_desired_climb_rate_cms(void) const override;
|
2019-02-28 07:11:05 -04:00
|
|
|
void get_pilot_desired_rp_yrate_cd(float &roll_cd, float &pitch_cd, float &yaw_rate_cds) override;
|
2018-12-07 03:52:05 -04:00
|
|
|
void init_z_limits() override;
|
2018-12-21 22:26:31 -04:00
|
|
|
void log_pids() override;
|
2018-12-07 03:52:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QAUTOTUNE_ENABLED
|