Exemplo n.º 1
0
// output - sends commands to the motors
void AP_Motors::output()
{
    // update throttle filter
    update_throttle_filter();

    // update max throttle
    update_max_throttle();

    // update _recovery_pct
    update_recovery_pct();

    // update battery resistance
    update_battery_resistance();

    // calc filtered battery voltage and lift_max
    update_lift_max_from_batt_voltage();

    // move throttle_low_comp towards desired throttle low comp
    update_throttle_thr_mix();

    if (_flags.armed) {
        if (_flags.stabilizing) {
            output_armed_stabilizing();
        } else {
            output_armed_not_stabilizing();
        }
    } else {
        output_disarmed();
    }
};
Exemplo n.º 2
0
// output - sends commands to the motors
void AP_MotorsMulticopter::output()
{
    // update throttle filter
    update_throttle_filter();

    // update max throttle
    update_max_throttle();

    // update battery resistance
    update_battery_resistance();

    // calc filtered battery voltage and lift_max
    update_lift_max_from_batt_voltage();

    // move throttle_low_comp towards desired throttle low comp
    update_throttle_thr_mix();

    if (_flags.armed) {
        if (!_flags.interlock) {
            output_armed_zero_throttle();
        } else if (_flags.stabilizing) {
            output_armed_stabilizing();
        } else {
            output_armed_not_stabilizing();
        }
    } else {
        _multicopter_flags.slow_start_low_end = true;
        output_disarmed();
    }
};
Exemplo n.º 3
0
// output - sends commands to the servos
void AP_MotorsHeli::output()
{
    // update throttle filter
    update_throttle_filter();

    if (_flags.armed) {
        calculate_armed_scalars();
        if (!_flags.interlock) {
            output_armed_zero_throttle();
        } else {
            output_armed_stabilizing();
        }
    } else {
        output_disarmed();
    }
};
Exemplo n.º 4
0
// output - sends commands to the motors
void AP_MotorsMulticopter::output()
{
    // update throttle filter
    update_throttle_filter();

    // update battery resistance
    update_battery_resistance();

    // calc filtered battery voltage and lift_max
    update_lift_max_from_batt_voltage();

    // run spool logic
    output_logic();

    // calculate thrust
    output_armed_stabilizing();

    // convert rpy_thrust values to pwm
    output_to_motors();
};
// output - sends commands to the motors
void AP_MotorsMulticopter::output()
{
    // update throttle filter
    update_throttle_filter();

    // calc filtered battery voltage and lift_max
    update_lift_max_from_batt_voltage();

    // run spool logic
    output_logic();

    // calculate thrust
    output_armed_stabilizing();

    // apply any thrust compensation for the frame
    thrust_compensation();
    
    // convert rpy_thrust values to pwm
    output_to_motors();

    // output any booster throttle
    output_boost_throttle();
};
// output_disarmed - sends commands to the motors
void AP_MotorsHeli::output_disarmed()
{
    // stabilizing servos always operate for helicopters
    output_armed_stabilizing();
}
// output_armed_zero_throttle - sends commands to the motors
void AP_MotorsHeli::output_armed_zero_throttle()
{
    // stabilizing servos always operate for helicopters
    // ToDo: Bring RSC Master On/Off into this function
    output_armed_stabilizing();
}
Exemplo n.º 8
0
// output_disarmed - sends commands to the motors
void AP_MotorsHeli::output_disarmed()
{
    // for helis - armed or disarmed we allow servos to move
    output_armed_stabilizing();
}
Exemplo n.º 9
0
void AP_MotorsHeli::output_armed_not_stabilizing()
{
    // call output_armed_stabilizing
    output_armed_stabilizing();
}