// // rate_controller_run - run lowest level body-frame rate controller and send outputs to the motors // should be called at 100hz or more // void AC_AttitudeControl::rate_controller_run() { // call rate controllers and send output to motors object // To-Do: should the outputs from get_rate_roll, pitch, yaw be int16_t which is the input to the motors library? // To-Do: skip this step if the throttle out is zero? _motors.set_roll(rate_bf_to_motor_roll(_rate_bf_target.x)); _motors.set_pitch(rate_bf_to_motor_pitch(_rate_bf_target.y)); _motors.set_yaw(rate_bf_to_motor_yaw(_rate_bf_target.z)); }
void AC_AttitudeControl::rate_controller_run() { _motors.set_roll(rate_bf_to_motor_roll(_ang_vel_target_rads.x)); _motors.set_pitch(rate_bf_to_motor_pitch(_ang_vel_target_rads.y)); _motors.set_yaw(rate_bf_to_motor_yaw(_ang_vel_target_rads.z)); }