/* call vehicle supplied thrust compensation if set. This allows for vehicle specific thrust compensation for motor arrangements such as the forward motors tilting */ void AP_MotorsTri::thrust_compensation(void) { if (_thrust_compensation_callback) { // convert 3 thrust values into an array indexed by motor number float thrust[4] { _thrust_right, _thrust_left, 0, _thrust_rear }; // apply vehicle supplied compensation function _thrust_compensation_callback(thrust, 4); // extract compensated thrust values _thrust_right = thrust[0]; _thrust_left = thrust[1]; _thrust_rear = thrust[3]; } }
/* call vehicle supplied thrust compensation if set. This allows vehicle code to compensate for vehicle specific motor arrangements such as tiltrotors or tiltwings */ void AP_MotorsMatrix::thrust_compensation(void) { if (_thrust_compensation_callback) { _thrust_compensation_callback(_thrust_rpyt_out, AP_MOTORS_MAX_NUM_MOTORS); } }