Ejemplo n.º 1
0
// 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();
}
Ejemplo n.º 2
0
// 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();
}
Ejemplo n.º 3
0
// 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();
}