// output_min - sets servos to neutral point void AP_MotorsHeli::output_min() { // move swash to mid move_swash(0,0,500,0); // override limits flags limit.roll_pitch = true; limit.yaw = true; limit.throttle_lower = true; limit.throttle_upper = false; }
// sends commands to the motors void AP_MotorsHeli::output_armed_stabilizing() { // if manual override (i.e. when setting up swash), pass pilot commands straight through to swash if (_servo_manual == 1) { _roll_control_input = _roll_radio_passthrough; _pitch_control_input = _pitch_radio_passthrough; _throttle_control_input = _throttle_radio_passthrough; _yaw_control_input = _yaw_radio_passthrough; } move_swash(_roll_control_input, _pitch_control_input, _throttle_control_input, _yaw_control_input); // update rotor and direct drive esc speeds rsc_control(); }
// output_armed - sends commands to the motors void AP_MotorsHeli::output_armed() { // if manual override (i.e. when setting up swash), pass pilot commands straight through to swash if( servo_manual == 1 ) { _rc_roll->servo_out = _rc_roll->control_in; _rc_pitch->servo_out = _rc_pitch->control_in; _rc_throttle->servo_out = _rc_throttle->control_in; _rc_yaw->servo_out = _rc_yaw->control_in; } //static int counter = 0; _rc_roll->calc_pwm(); _rc_pitch->calc_pwm(); _rc_throttle->calc_pwm(); _rc_yaw->calc_pwm(); move_swash( _rc_roll->servo_out, _rc_pitch->servo_out, _rc_throttle->servo_out, _rc_yaw->servo_out ); rsc_control(); }
// output_armed - sends commands to the motors void AP_MotorsHeli::output_armed() { // if manual override (i.e. when setting up swash), pass pilot commands straight through to swash if (_servo_manual == 1) { _rc_roll->servo_out = _rc_roll->control_in; _rc_pitch->servo_out = _rc_pitch->control_in; _rc_throttle->servo_out = _rc_throttle->control_in; _rc_yaw->servo_out = _rc_yaw->control_in; } _rc_roll->calc_pwm(); _rc_pitch->calc_pwm(); _rc_throttle->calc_pwm(); _rc_yaw->calc_pwm(); move_swash( _rc_roll->servo_out, _rc_pitch->servo_out, _rc_throttle->servo_out, _rc_yaw->servo_out ); // update rotor and direct drive esc speeds rsc_control(); }
// output_min - sends minimum values out to the motors void AP_MotorsHeli::output_min() { // move swash to mid move_swash(0,0,500,0); }