mirror of https://github.com/ArduPilot/ardupilot
AP_Motors: added disable_yaw_torque() method
this is used for tilt-vectored quadplanes to use only vectoring for yaw control. This avoids some nasty transition issues
This commit is contained in:
parent
f10f7d971d
commit
c504e2db04
|
@ -969,3 +969,14 @@ void AP_MotorsMatrix::thrust_compensation(void)
|
|||
_thrust_compensation_callback(_thrust_rpyt_out, AP_MOTORS_MAX_NUM_MOTORS);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
disable the use of motor torque to control yaw. Used when an
|
||||
external mechanism such as vectoring is used for yaw control
|
||||
*/
|
||||
void AP_MotorsMatrix::disable_yaw_torque(void)
|
||||
{
|
||||
for (uint8_t i = 0; i < AP_MOTORS_MAX_NUM_MOTORS; i++) {
|
||||
_yaw_factor[i] = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,6 +55,10 @@ public:
|
|||
// using copter motors for forward flight
|
||||
float get_roll_factor(uint8_t i) override { return _roll_factor[i]; }
|
||||
|
||||
// disable the use of motor torque to control yaw. Used when an external mechanism such
|
||||
// as vectoring is used for yaw control
|
||||
void disable_yaw_torque(void) override;
|
||||
|
||||
protected:
|
||||
// output - sends commands to the motors
|
||||
void output_armed_stabilizing() override;
|
||||
|
|
|
@ -96,6 +96,10 @@ public:
|
|||
_thrust_compensation_callback = callback;
|
||||
}
|
||||
|
||||
// disable the use of motor torque to control yaw. Used when an external mechanism such
|
||||
// as vectoring is used for yaw control
|
||||
virtual void disable_yaw_torque(void) {}
|
||||
|
||||
// var_info for holding Parameter information
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
||||
|
|
Loading…
Reference in New Issue