APM_Control: fixed for cygwin build
This commit is contained in:
parent
364fa0680d
commit
3cb32a18f0
@ -236,7 +236,7 @@ void AP_AutoTune::update(AP_Logger::PID_Info &pinfo, float scaler)
|
|||||||
unsigned(new_state),
|
unsigned(new_state),
|
||||||
actuator,
|
actuator,
|
||||||
desired_rate,
|
desired_rate,
|
||||||
FF0,
|
FF_single,
|
||||||
current.FF,
|
current.FF,
|
||||||
current.P,
|
current.P,
|
||||||
current.D,
|
current.D,
|
||||||
@ -277,13 +277,13 @@ void AP_AutoTune::update(AP_Logger::PID_Info &pinfo, float scaler)
|
|||||||
|
|
||||||
// we've finished an event. calculate the single-event FF value
|
// we've finished an event. calculate the single-event FF value
|
||||||
if (state == ATState::DEMAND_POS) {
|
if (state == ATState::DEMAND_POS) {
|
||||||
FF0 = max_actuator / (max_rate * scaler);
|
FF_single = max_actuator / (max_rate * scaler);
|
||||||
} else {
|
} else {
|
||||||
FF0 = min_actuator / (min_rate * scaler);
|
FF_single = min_actuator / (min_rate * scaler);
|
||||||
}
|
}
|
||||||
|
|
||||||
// apply median filter
|
// apply median filter
|
||||||
float FF = ff_filter.apply(FF0);
|
float FF = ff_filter.apply(FF_single);
|
||||||
|
|
||||||
const float old_FF = rpid.ff();
|
const float old_FF = rpid.ff();
|
||||||
|
|
||||||
|
@ -114,5 +114,5 @@ private:
|
|||||||
float max_P;
|
float max_P;
|
||||||
float max_D;
|
float max_D;
|
||||||
float min_Dmod;
|
float min_Dmod;
|
||||||
float FF0;
|
float FF_single;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user