/// update_z_controller - fly to altitude in cm above home void AC_PosControl::update_z_controller() { // check if leash lengths need to be recalculated calc_leash_length_z(); // call position controller pos_to_rate_z(); }
/// update_z_controller - fly to altitude in cm above home void AC_PosControl::update_z_controller() { // check time since last cast uint32_t now = hal.scheduler->millis(); if (now - _last_update_z_ms > POSCONTROL_ACTIVE_TIMEOUT_MS) { _flags.reset_rate_to_accel_z = true; _flags.reset_accel_to_throttle = true; } _last_update_z_ms = now; // check if leash lengths need to be recalculated calc_leash_length_z(); // call position controller pos_to_rate_z(); }