This commit is contained in:
rusefi 2019-05-27 16:12:59 -04:00
parent 5f642ac254
commit 886a88bad3
2 changed files with 8 additions and 3 deletions

View File

@ -215,7 +215,12 @@ void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
/**
* *0.01 because of https://sourceforge.net/p/rusefi/tickets/153/
*/
currentRawVE = veMap.getValue(rpm, CONFIGB(useTPSBasedVeTable) ? tps : map);
if (CONFIGB(useTPSBasedVeTable)) {
// todo: should we have 'veTpsMap' fuel_Map3D_t variable here?
currentRawVE = interpolate3d<float>(tps, CONFIG(ignitionTpsBins), IGN_TPS_COUNT, rpm, config->veRpmBins, FUEL_RPM_COUNT, veMap.pointers);
} else {
currentRawVE = veMap.getValue(rpm, map);
}
// get VE from the separate table for Idle
if (CONFIG(useSeparateVeForIdle)) {
float idleVe = interpolate2d("idleVe", rpm, config->idleVeBins, config->idleVe, IDLE_VE_CURVE_SIZE);

View File

@ -254,6 +254,6 @@ TEST(fuel, testTpsBasedVeDefect799) {
setMockTpsValue(7 PASS_ENGINE_PARAMETER_SUFFIX);
engine->engineState.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
// we have a problem - we get value on the edge of the MAP axis, not middle of TPS axis
ASSERT_EQ(100, engine->engineState.currentRawVE);
// value in the middle of the map as expected
ASSERT_EQ(107, engine->engineState.currentRawVE);
}