parent
40b61375e3
commit
3247c15838
|
@ -19,6 +19,11 @@ constexpr inline int convertVoltageTo10bitADC(float voltage) {
|
|||
return (int) (voltage * TPS_TS_CONVERSION);
|
||||
}
|
||||
|
||||
struct SentTps : public StoredValueSensor {
|
||||
SentTps() : StoredValueSensor(SensorType::Tps1, MS2NT(200)) {
|
||||
}
|
||||
};
|
||||
|
||||
void grabTPSIsClosed();
|
||||
void grabTPSIsWideOpen();
|
||||
void grabPedalIsUp();
|
||||
|
|
|
@ -165,6 +165,8 @@ static FuncSensPair tps2s(TPS_TS_CONVERSION, SensorType::Tps2Secondary);
|
|||
static RedundantPair analogTps1(tps1p, tps1s, SensorType::Tps1);
|
||||
static RedundantPair tps2(tps2p, tps2s, SensorType::Tps2);
|
||||
|
||||
static SentTps sentTps;
|
||||
|
||||
// Used only in case of weird Ford-style ETB TPS
|
||||
static RedundantFordTps fordTps1(SensorType::Tps1, SensorType::Tps1Primary, SensorType::Tps1Secondary);
|
||||
static RedundantFordTps fordTps2(SensorType::Tps2, SensorType::Tps2Primary, SensorType::Tps2Secondary);
|
||||
|
@ -246,6 +248,8 @@ void deinitTps() {
|
|||
tps2.deinit(isFordTps, &fordTps2);
|
||||
pedal.deinit(isFordTps, &fordPps);
|
||||
|
||||
sentTps.unregister();
|
||||
|
||||
wastegate.deinit();
|
||||
idlePos.deinit();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue