mirror of https://github.com/FOME-Tech/fome-fw.git
sensor checker wasn't checking sensors
This commit is contained in:
parent
b2e804e0ee
commit
323d61d90b
|
@ -28,4 +28,7 @@ Release template (copy/paste this for new release):
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Sensor checker wasn't checking sensors
|
||||||
|
|
||||||
### For older changelog entries prior to fork from rusEFI, see CHANGELOG.rusefi.md
|
### For older changelog entries prior to fork from rusEFI, see CHANGELOG.rusefi.md
|
||||||
|
|
|
@ -148,7 +148,7 @@ void SensorChecker::onSlowCallback() {
|
||||||
// TODO: also inhibit checking if we just did a flash burn, since that blocks the ECU for a few seconds.
|
// TODO: also inhibit checking if we just did a flash burn, since that blocks the ECU for a few seconds.
|
||||||
bool shouldCheck = m_ignitionIsOn && m_timeSinceIgnOff.hasElapsedSec(5);
|
bool shouldCheck = m_ignitionIsOn && m_timeSinceIgnOff.hasElapsedSec(5);
|
||||||
m_analogSensorsShouldWork = shouldCheck;
|
m_analogSensorsShouldWork = shouldCheck;
|
||||||
if (shouldCheck) {
|
if (!shouldCheck) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ TEST(etb, integrated) {
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int timeNowUs;
|
extern int timeNowUs;
|
||||||
|
extern WarningCodeState unitTestWarningCodeState;
|
||||||
|
|
||||||
TEST(etb, intermittentTps) {
|
TEST(etb, intermittentTps) {
|
||||||
EngineTestHelper eth(TEST_ENGINE); // we have a destructor so cannot move EngineTestHelper into utility method
|
EngineTestHelper eth(TEST_ENGINE); // we have a destructor so cannot move EngineTestHelper into utility method
|
||||||
|
@ -91,6 +92,7 @@ TEST(etb, intermittentTps) {
|
||||||
etb->update();
|
etb->update();
|
||||||
|
|
||||||
EXPECT_NE(0, etb->etbErrorCode);
|
EXPECT_NE(0, etb->etbErrorCode);
|
||||||
|
EXPECT_EQ(3, unitTestWarningCodeState.recentWarnings.getCount()) << "intermittentTps";
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(etb, intermittentPps) {
|
TEST(etb, intermittentPps) {
|
||||||
|
|
Loading…
Reference in New Issue