TPS/TPS logging delta TPS not consistent with actual logic fix #768
This commit is contained in:
parent
8c62395a10
commit
bc86783b45
|
@ -167,7 +167,7 @@ int AccelEnrichmemnt::getMaxDeltaIndex(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
float AccelEnrichmemnt::getMaxDelta(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
int index = getMaxDeltaIndex(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
return (cb.get(index) - (cb.get(index - 1))) * CONFIG(specs.cylindersCount);
|
||||
return (cb.get(index) - (cb.get(index - 1)));
|
||||
}
|
||||
|
||||
// todo: eliminate code duplication between these two methods! Some pointer magic would help.
|
||||
|
|
|
@ -46,7 +46,7 @@ GTEST_API_ int main(int argc, char **argv) {
|
|||
// printTriggerDebug = true;
|
||||
|
||||
// resizeMap();
|
||||
printf("Success 20190201\r\n");
|
||||
printf("Success 20190420\r\n");
|
||||
printAllTriggers();
|
||||
// printConvertedTable();
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
|
|
|
@ -24,14 +24,14 @@ TEST(big, testAccelEnrichment) {
|
|||
engine->tpsAccelEnrichment.onNewValue(0 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
ASSERT_EQ( 0, engine->tpsAccelEnrichment.getMaxDelta(PASS_ENGINE_PARAMETER_SIGNATURE)) << "maxDelta";
|
||||
engine->tpsAccelEnrichment.onNewValue(10 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
ASSERT_EQ( 40, engine->tpsAccelEnrichment.getMaxDelta(PASS_ENGINE_PARAMETER_SIGNATURE)) << "maxDelta#1";
|
||||
ASSERT_EQ( 10, engine->tpsAccelEnrichment.getMaxDelta(PASS_ENGINE_PARAMETER_SIGNATURE)) << "maxDelta#1";
|
||||
engine->tpsAccelEnrichment.onNewValue(30 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
ASSERT_EQ( 80, engine->tpsAccelEnrichment.getMaxDelta(PASS_ENGINE_PARAMETER_SIGNATURE)) << "maxDelta#2";
|
||||
ASSERT_EQ( 20, engine->tpsAccelEnrichment.getMaxDelta(PASS_ENGINE_PARAMETER_SIGNATURE)) << "maxDelta#2";
|
||||
|
||||
engine->tpsAccelEnrichment.onNewValue(0 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
ASSERT_EQ( 80, engine->tpsAccelEnrichment.getMaxDelta(PASS_ENGINE_PARAMETER_SIGNATURE)) << "maxDelta#3";
|
||||
ASSERT_EQ( 20, engine->tpsAccelEnrichment.getMaxDelta(PASS_ENGINE_PARAMETER_SIGNATURE)) << "maxDelta#3";
|
||||
engine->tpsAccelEnrichment.onNewValue(0 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
ASSERT_EQ( 80, engine->tpsAccelEnrichment.getMaxDelta(PASS_ENGINE_PARAMETER_SIGNATURE)) << "maxDelta#4";
|
||||
ASSERT_EQ( 20, engine->tpsAccelEnrichment.getMaxDelta(PASS_ENGINE_PARAMETER_SIGNATURE)) << "maxDelta#4";
|
||||
engine->tpsAccelEnrichment.onNewValue(0 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
ASSERT_EQ( 0, engine->tpsAccelEnrichment.getMaxDelta(PASS_ENGINE_PARAMETER_SIGNATURE)) << "maxDelta#5";
|
||||
engine->tpsAccelEnrichment.onNewValue(0 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
|
|
Loading…
Reference in New Issue