Exemplo n.º 1
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.º 2
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.º 3
0
// output - sends commands to the motors
void AP_Motors::output()
{
    // update max throttle
    update_max_throttle();

    // output to motors
    if (_flags.armed ) {
        output_armed();
    } else {
        output_disarmed();
    }
};