Skip to content

Commit

Permalink
No ABI but a WEAK function for the LIFT_D
Browse files Browse the repository at this point in the history
  • Loading branch information
dewagter committed Sep 30, 2023
1 parent 520ad76 commit 2b7d372
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion sw/airborne/modules/ctrl/ctrl_eff_sched_rot_wing_v3b.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ void schedule_pitch_priority_factor(float wing_rot_deg)
pitch_priority_factor = scheduled_pitch_priority;
}

float ctrl_eff_sched_rot_wing_lift_d = 0.0f;

void schedule_liftd(float *airspeed2, float *sinr2, float wing_rot_deg)
{
float bounded_airspeed2 = *airspeed2;
Expand All @@ -403,9 +405,15 @@ void schedule_liftd(float *airspeed2, float *sinr2, float wing_rot_deg)
lift_d = 0.0;
}
Bound(lift_d, -130., 0.);
AbiSendMsgLIFT_D(LIFT_D_SCHED_ID, lift_d);
ctrl_eff_sched_rot_wing_lift_d = lift_d;
}

// Override standard LIFT_D function
float guidance_indi_get_liftd(float pitch, float theta) {
return ctrl_eff_sched_rot_wing_lift_d;
}


void schedule_wls_guidance(void)
{
// Set weights
Expand Down

0 comments on commit 2b7d372

Please sign in to comment.