1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

OP-1474 Fix label compile error

This commit is contained in:
Stefan Karlsson 2014-09-19 01:29:04 +02:00
parent 31c5f1c519
commit f0c47976a5

View File

@ -163,11 +163,13 @@ static void altitudeHoldTask(void)
dT = PIOS_DELTATIME_GetAverageSeconds(&timeval);
switch (thrustMode) {
case ALTITUDEHOLD:
{
// altitude control loop
// 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);
break;
}
break;
case ALTITUDEVARIO:
altitudeHoldStatus.VelocityDesired = thrustSetpoint;
break;
@ -183,12 +185,13 @@ static void altitudeHoldTask(void)
thrustDemand = thrustSetpoint;
break;
default:
{
// velocity control loop
// 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);
break;
}
break;
}
}