parent
6bce0e319a
commit
1a8af17307
|
@ -22,6 +22,8 @@ DDEFS += -DFLEXIBLE_CRITICAL_LED=1
|
||||||
DDEFS += -DHW_FRANKENSO=1
|
DDEFS += -DHW_FRANKENSO=1
|
||||||
DDEFS += $(DEFAULT_ENGINE_TYPE)
|
DDEFS += $(DEFAULT_ENGINE_TYPE)
|
||||||
|
|
||||||
|
DDEFS += -DEFI_SENT_SUPPORT=TRUE
|
||||||
|
|
||||||
# TS_SECONDARY_UxART_PORT
|
# TS_SECONDARY_UxART_PORT
|
||||||
DDEFS += -DSTM32_SERIAL_USE_USART3=TRUE
|
DDEFS += -DSTM32_SERIAL_USE_USART3=TRUE
|
||||||
DDEFS += -DTS_SECONDARY_UxART_PORT=SD3
|
DDEFS += -DTS_SECONDARY_UxART_PORT=SD3
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
* @author Andrey Belomutskiy, (c) 2012-2020
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
||||||
*/
|
*/
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
|
#include "sent.h"
|
||||||
|
|
||||||
void grabTPSIsClosed() {
|
void grabTPSIsClosed() {
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
|
@ -46,5 +47,14 @@ bool isPedalError() {
|
||||||
return !Sensor::get(SensorType::AcceleratorPedal).Valid && Sensor::hasSensor(SensorType::AcceleratorPedalPrimary);
|
return !Sensor::get(SensorType::AcceleratorPedal).Valid && Sensor::hasSensor(SensorType::AcceleratorPedalPrimary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern SentTps sentTps;
|
||||||
|
|
||||||
void sentTpsDecode() {
|
void sentTpsDecode() {
|
||||||
|
#if EFI_SENT_SUPPORT
|
||||||
|
if (!isDigitalTps1()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
float value = getSentValue(0);
|
||||||
|
sentTps.setValidValue(value, getTimeNowNt());
|
||||||
|
#endif // EFI_SENT_SUPPORT
|
||||||
}
|
}
|
|
@ -30,6 +30,7 @@ void grabPedalIsUp();
|
||||||
void grabPedalIsWideOpen();
|
void grabPedalIsWideOpen();
|
||||||
|
|
||||||
void sentTpsDecode();
|
void sentTpsDecode();
|
||||||
|
bool isDigitalTps1();
|
||||||
|
|
||||||
bool isTps1Error();
|
bool isTps1Error();
|
||||||
bool isTps2Error();
|
bool isTps2Error();
|
||||||
|
|
|
@ -165,7 +165,7 @@ static FuncSensPair tps2s(TPS_TS_CONVERSION, SensorType::Tps2Secondary);
|
||||||
static RedundantPair analogTps1(tps1p, tps1s, SensorType::Tps1);
|
static RedundantPair analogTps1(tps1p, tps1s, SensorType::Tps1);
|
||||||
static RedundantPair tps2(tps2p, tps2s, SensorType::Tps2);
|
static RedundantPair tps2(tps2p, tps2s, SensorType::Tps2);
|
||||||
|
|
||||||
static SentTps sentTps;
|
SentTps sentTps;
|
||||||
|
|
||||||
// Used only in case of weird Ford-style ETB TPS
|
// Used only in case of weird Ford-style ETB TPS
|
||||||
static RedundantFordTps fordTps1(SensorType::Tps1, SensorType::Tps1Primary, SensorType::Tps1Secondary);
|
static RedundantFordTps fordTps1(SensorType::Tps1, SensorType::Tps1Primary, SensorType::Tps1Secondary);
|
||||||
|
|
Loading…
Reference in New Issue