only:Config compatibility
This commit is contained in:
parent
5852e7c8d4
commit
9fe6cd5760
|
@ -28,11 +28,11 @@ mass_t FuelComputerBase::getCycleFuel(mass_t airmass, float rpm, float load) {
|
|||
float FuelComputer::getStoichiometricRatio() const {
|
||||
float primary = engineConfiguration->stoichRatioPrimary;
|
||||
|
||||
// Config compatibility: this field may be zero on ECUs with old defaults
|
||||
|
||||
if (primary < 5) {
|
||||
// todo: fatal in July of 2023
|
||||
// 14.7 = E0 gasoline AFR
|
||||
engineConfiguration->stoichRatioPrimary = primary = STOICH_RATIO;
|
||||
// Config compatibility: this field may be zero on ECUs with very old defaults
|
||||
criticalError("Please set stoichRatioPrimary");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Without an ethanol/flex sensor, return primary configured stoich ratio
|
||||
|
@ -42,11 +42,10 @@ float FuelComputer::getStoichiometricRatio() const {
|
|||
|
||||
float secondary = engineConfiguration->stoichRatioSecondary;
|
||||
|
||||
// Config compatibility: this field may be zero on ECUs with old defaults
|
||||
if (secondary < 5) {
|
||||
// 9.0 = E100 ethanol AFR
|
||||
// todo: fatal in July of 2023
|
||||
engineConfiguration->stoichRatioSecondary = secondary = 9.0f;
|
||||
// Config compatibility: this field may be zero on ECUs with very old defaults
|
||||
criticalError("Please set stoichRatioSecondary");
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto flex = Sensor::get(SensorType::FuelEthanolPercent);
|
||||
|
|
Loading…
Reference in New Issue