int main(void) { init_system(); while (1) { output_logic(); state_logic(); if(SerialInterrupt_flag==1){ present_state = CharRX; SerialInterrupt_flag=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(); };