parent
8cbad5e591
commit
976b3c0306
|
@ -22,6 +22,10 @@ constexpr inline int convertVoltageTo10bitADC(float voltage) {
|
|||
struct SentTps : public StoredValueSensor {
|
||||
SentTps() : StoredValueSensor(SensorType::Tps1, MS2NT(200)) {
|
||||
}
|
||||
|
||||
bool isRedundant() const override {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
void grabTPSIsClosed();
|
||||
|
|
|
@ -137,3 +137,18 @@ TEST(etb, intermittentPps) {
|
|||
etb->update();
|
||||
EXPECT_NE(0, etb->etbErrorCode);
|
||||
}
|
||||
|
||||
TEST(etb, sentTpsIntegrated) {
|
||||
EngineTestHelper eth(TEST_ENGINE); // we have a destructor so cannot move EngineTestHelper into utility method
|
||||
|
||||
engineConfiguration->sentInputPins[0] = Gpio::B3;
|
||||
engineConfiguration->sentEtbType = SentEtbType::GM_TYPE_1;
|
||||
|
||||
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_3;
|
||||
engineConfiguration->throttlePedalPositionSecondAdcChannel = EFI_ADC_3;
|
||||
|
||||
Sensor::setMockValue(SensorType::Tps1, 25.0f, true);
|
||||
|
||||
initTps();
|
||||
doInitElectronicThrottle();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue