ETB overheats due to constant isTpsError true/false/true/false jitter: this seems obvious enough to disable ETB at least on non running engine #4832

This commit is contained in:
Andrey 2022-11-30 21:23:13 -05:00
parent 405b23d682
commit 32e502c569
2 changed files with 4 additions and 3 deletions

View File

@ -73,11 +73,11 @@ public:
float getLuaAdjustment() const;
float prevOutput = 0;
int prevErrorState = false;
protected:
// This is set if an automatic TPS calibration should be run
bool m_isAutocal = false;
int prevErrorState = false;
etb_function_e getFunction() const { return m_function; }
DcMotor* getMotor() { return m_motor; }

View File

@ -20,6 +20,7 @@ static EtbController * initEtbIntegratedTest() {
EtbController *etb = (EtbController*)engine->etbControllers[0];
etb->etbInputErrorCounter = 0; // ETB controlles are global shared instances :(
etb->prevErrorState = false;
return etb;
}
@ -78,9 +79,9 @@ TEST(etb, intermittentPps) {
ASSERT_FALSE(isTps2Error());
ASSERT_FALSE(isPedalError());
etb->update();
ASSERT_EQ(1, etb->etbInputErrorCounter);
ASSERT_EQ(0, etb->etbInputErrorCounter);
Sensor::setInvalidMockValue(SensorType::AcceleratorPedal);
etb->update();
ASSERT_EQ(2, etb->etbInputErrorCounter);
ASSERT_EQ(1, etb->etbInputErrorCounter);
}