AP_MotorsMatrixTS.h 990 B

123456789101112131415161718192021222324252627282930
  1. /// @file AP_MotorsMatrixTS.h
  2. /// @brief Motor control class for tailsitters with multicopter motor configurations
  3. #pragma once
  4. #include <AP_Common/AP_Common.h>
  5. #include <AP_Math/AP_Math.h>
  6. #include <SRV_Channel/SRV_Channel.h>
  7. #include "AP_MotorsMatrix.h"
  8. /// @class AP_MotorsMatrix
  9. class AP_MotorsMatrixTS : public AP_MotorsMatrix {
  10. public:
  11. AP_MotorsMatrixTS(uint16_t loop_rate, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) :
  12. AP_MotorsMatrix(loop_rate, speed_hz) {
  13. AP_Param::setup_object_defaults(this, var_info);
  14. };
  15. virtual void output_to_motors() override;
  16. virtual void output_motor_mask(float thrust, uint8_t mask, float rudder_dt) override;
  17. protected:
  18. // configures the motors for the defined frame_class and frame_type
  19. virtual void setup_motors(motor_frame_class frame_class, motor_frame_type frame_type) override;
  20. // calculate motor outputs
  21. void output_armed_stabilizing() override;
  22. };