mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
OP-1474 Fix label compile error
This commit is contained in:
parent
31c5f1c519
commit
f0c47976a5
@ -163,11 +163,13 @@ static void altitudeHoldTask(void)
|
|||||||
dT = PIOS_DELTATIME_GetAverageSeconds(&timeval);
|
dT = PIOS_DELTATIME_GetAverageSeconds(&timeval);
|
||||||
switch (thrustMode) {
|
switch (thrustMode) {
|
||||||
case ALTITUDEHOLD:
|
case ALTITUDEHOLD:
|
||||||
|
{
|
||||||
// altitude control loop
|
// altitude control loop
|
||||||
// No scaling.
|
// No scaling.
|
||||||
pid_scaler scaler = { .p = 1.0f, .i = 1.0f, .d = 1.0f };
|
const pid_scaler scaler = { .p = 1.0f, .i = 1.0f, .d = 1.0f };
|
||||||
altitudeHoldStatus.VelocityDesired = pid_apply_setpoint(&pid0, &scaler, thrustSetpoint, positionStateDown, dT);
|
altitudeHoldStatus.VelocityDesired = pid_apply_setpoint(&pid0, &scaler, thrustSetpoint, positionStateDown, dT);
|
||||||
break;
|
}
|
||||||
|
break;
|
||||||
case ALTITUDEVARIO:
|
case ALTITUDEVARIO:
|
||||||
altitudeHoldStatus.VelocityDesired = thrustSetpoint;
|
altitudeHoldStatus.VelocityDesired = thrustSetpoint;
|
||||||
break;
|
break;
|
||||||
@ -183,12 +185,13 @@ static void altitudeHoldTask(void)
|
|||||||
thrustDemand = thrustSetpoint;
|
thrustDemand = thrustSetpoint;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
{
|
||||||
// velocity control loop
|
// velocity control loop
|
||||||
// No scaling.
|
// No scaling.
|
||||||
pid_scaler scaler = { .p = 1.0f, .i = 1.0f, .d = 1.0f };
|
const pid_scaler scaler = { .p = 1.0f, .i = 1.0f, .d = 1.0f };
|
||||||
thrustDemand = startThrust - pid_apply_setpoint(&pid1, &scaler, altitudeHoldStatus.VelocityDesired, velocityStateDown, dT);
|
thrustDemand = startThrust - pid_apply_setpoint(&pid1, &scaler, altitudeHoldStatus.VelocityDesired, velocityStateDown, dT);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user