From 41c55ffbe7f973b9c669c93bae991bc8007ae4d3 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Thu, 18 Feb 2016 15:55:11 +0900 Subject: [PATCH] AP_MotorsTri: use YAW_SV_REV to reverse yaw output --- libraries/AP_Motors/AP_MotorsTri.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_Motors/AP_MotorsTri.cpp b/libraries/AP_Motors/AP_MotorsTri.cpp index 0ebb84d065..a1f204ccac 100644 --- a/libraries/AP_Motors/AP_MotorsTri.cpp +++ b/libraries/AP_Motors/AP_MotorsTri.cpp @@ -346,6 +346,11 @@ void AP_MotorsTri::output_test(uint8_t motor_seq, int16_t pwm) int16_t AP_MotorsTri::calc_yaw_radio_output(float yaw_input, float yaw_input_max) { int16_t ret; + + if (_yaw_reverse < 0) { + yaw_input = -yaw_input; + } + if (yaw_input >= 0){ ret = (_yaw_servo_trim + (yaw_input/yaw_input_max * (_yaw_servo_max - _yaw_servo_trim))); } else {