/
Sangak
/
ardupilot
Обзор
Документация
Войти
/
Sangak
/
ardupilot
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
libraries/AC_CustomControl/AC_CustomControl_Backend.h
39 строк
1 KB
Peter Barker
AC_CustomControl: re-order initialiser lines so -Werror=reorder will work
24 сен 2024, 15:50
24 сен 2024, 15:50
a40b387
Код
Авторство
О чём код?
#pragma once #include "AC_CustomControl_config.h" #if AP_CUSTOMCONTROL_ENABLED #include "AC_CustomControl.h" class AC_CustomControl_Backend { public: AC_CustomControl_Backend(AC_CustomControl& frontend, AP_AHRS_View*& ahrs, AC_AttitudeControl*& att_control, AP_MotorsMulticopter*& motors, float dt) : _ahrs(ahrs), _att_control(att_control), _motors(motors), _frontend(frontend) {} // empty destructor to suppress compiler warning virtual ~AC_CustomControl_Backend() {} // update controller, return roll, pitch, yaw controller output virtual Vector3f update() = 0; // reset controller to avoid build up or abrupt response upon switch, ex: integrator, filter virtual void reset() = 0; // set the PID notch sample rates virtual void set_notch_sample_rate(float sample_rate) {}; protected: // References to external libraries AP_AHRS_View*& _ahrs; AC_AttitudeControl*& _att_control; AP_MotorsMulticopter*& _motors; AC_CustomControl& _frontend; }; #endif // AP_CUSTOMCONTROL_ENABLED