throttle model runs a little bit

(cherry picked from commit 2ba3881ba0)
This commit is contained in:
Matthew Kennedy 2023-03-14 23:49:47 -04:00 committed by Andrey
parent 673ac1fc98
commit 3df13d10af
1 changed files with 6 additions and 1 deletions

View File

@ -93,8 +93,12 @@ float ThrottleModelBase::estimateThrottleFlow(float tip, float tps, float map, f
// What throttle position gives us that flow at 0.95 PR?
float throttleAngle95Pr = throttlePositionForFlow(p95Flow, crossoverPr, tip, iat);
throttleModelCrossoverAngle = throttleAngle95Pr;
if (tps > throttleAngle95Pr) {
bool useWotModel = tps > throttleAngle95Pr;
throttleUseWotModel = useWotModel;
if (useWotModel) {
// "WOT" model
// Maximum flow if the throttle was removed
@ -129,6 +133,7 @@ expected<float> ThrottleModelBase::estimateThrottleFlow(float map, float tps) {
}
void ThrottleModelBase::onSlowCallback() {
throttleEstimatedFlow = estimateThrottleFlow(Sensor::getOrZero(SensorType::Map), Sensor::getOrZero(SensorType::Tps1)).value_or(0);
}
float ThrottleModel::effectiveArea(float tps) const {