mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
OP-1848 build fixes after merge with ratetrainer
This commit is contained in:
parent
43d193cceb
commit
dd1c6c7600
@ -300,26 +300,25 @@ static void stabilizationOuterloopTask()
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RateDesiredSet(&rateDesired);
|
||||
{
|
||||
FlightStatusArmedOptions armed;
|
||||
FlightStatusArmedGet(&armed);
|
||||
float throttleDesired;
|
||||
ManualControlCommandThrottleGet(&throttleDesired);
|
||||
if (armed != FLIGHTSTATUS_ARMED_ARMED ||
|
||||
((stabSettings.settings.LowThrottleZeroIntegral == STABILIZATIONSETTINGS_LOWTHROTTLEZEROINTEGRAL_TRUE) && throttleDesired < 0)) {
|
||||
// Force all axes to reinitialize when engaged
|
||||
for (t = 0; t < AXES; t++) {
|
||||
previous_mode[t] = 255;
|
||||
RateDesiredSet(&rateDesired);
|
||||
{
|
||||
FlightStatusArmedOptions armed;
|
||||
FlightStatusArmedGet(&armed);
|
||||
float throttleDesired;
|
||||
ManualControlCommandThrottleGet(&throttleDesired);
|
||||
if (armed != FLIGHTSTATUS_ARMED_ARMED ||
|
||||
((stabSettings.settings.LowThrottleZeroIntegral == STABILIZATIONSETTINGS_LOWTHROTTLEZEROINTEGRAL_TRUE) && throttleDesired < 0)) {
|
||||
// Force all axes to reinitialize when engaged
|
||||
for (t = 0; t < AXES; t++) {
|
||||
previous_mode[t] = 255;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update cruisecontrol based on attitude
|
||||
cruisecontrol_compute_factor(&attitudeState, rateDesired.Thrust);
|
||||
stabSettings.monitor.rateupdates = 0;
|
||||
cruisecontrol_compute_factor(&attitudeState, rateDesired.Thrust);
|
||||
stabSettings.monitor.rateupdates = 0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user