parent
ed77817bf9
commit
cc80c6e354
|
@ -22,6 +22,8 @@ DDEFS += -DEFI_USE_UART_DMA=FALSE
|
||||||
# temp work-around only until June 3rd 2024
|
# temp work-around only until June 3rd 2024
|
||||||
DDEFS += -DETB_INTERMITTENT_LIMIT=30000
|
DDEFS += -DETB_INTERMITTENT_LIMIT=30000
|
||||||
|
|
||||||
|
DDEFS += -DEFI_AUX_VALVES=TRUE
|
||||||
|
|
||||||
# maybe a way to disable SPI2 privately
|
# maybe a way to disable SPI2 privately
|
||||||
#DDEFS += -DSTM32_SPI_USE_SPI2=FALSE
|
#DDEFS += -DSTM32_SPI_USE_SPI2=FALSE
|
||||||
|
|
||||||
|
|
|
@ -217,7 +217,9 @@ public:
|
||||||
|
|
||||||
void setConfig();
|
void setConfig();
|
||||||
|
|
||||||
|
#if EFI_AUX_VALVES
|
||||||
AuxActor auxValves[AUX_DIGITAL_VALVE_COUNT][2];
|
AuxActor auxValves[AUX_DIGITAL_VALVE_COUNT][2];
|
||||||
|
#endif // EFI_AUX_VALVES
|
||||||
|
|
||||||
#if EFI_UNIT_TEST
|
#if EFI_UNIT_TEST
|
||||||
bool needTdcCallback = true;
|
bool needTdcCallback = true;
|
||||||
|
|
|
@ -116,7 +116,9 @@ void EngineState::periodicFastCallback() {
|
||||||
|
|
||||||
engine->fuelComputer.running.timeSinceCrankingInSecs = crankingTimer.getElapsedSeconds(nowNt);
|
engine->fuelComputer.running.timeSinceCrankingInSecs = crankingTimer.getElapsedSeconds(nowNt);
|
||||||
|
|
||||||
|
#if EFI_AUX_VALVES
|
||||||
recalculateAuxValveTiming();
|
recalculateAuxValveTiming();
|
||||||
|
#endif //EFI_AUX_VALVES
|
||||||
|
|
||||||
float rpm = Sensor::getOrZero(SensorType::Rpm);
|
float rpm = Sensor::getOrZero(SensorType::Rpm);
|
||||||
engine->ignitionState.sparkDwell = engine->ignitionState.getSparkDwell(rpm);
|
engine->ignitionState.sparkDwell = engine->ignitionState.getSparkDwell(rpm);
|
||||||
|
|
|
@ -504,9 +504,9 @@ void commonInitEngineController() {
|
||||||
engine->rpmCalculator.Register();
|
engine->rpmCalculator.Register();
|
||||||
#endif /* EFI_UNIT_TEST */
|
#endif /* EFI_UNIT_TEST */
|
||||||
|
|
||||||
#if (EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT) || EFI_SIMULATOR || EFI_UNIT_TEST
|
#if EFI_AUX_VALVES
|
||||||
initAuxValves();
|
initAuxValves();
|
||||||
#endif /* EFI_ENGINE_CONTROL */
|
#endif /* EFI_AUX_VALVES */
|
||||||
|
|
||||||
initTachometer();
|
initTachometer();
|
||||||
initSpeedometer();
|
initSpeedometer();
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
#include "trigger_central.h"
|
#include "trigger_central.h"
|
||||||
#include "spark_logic.h"
|
#include "spark_logic.h"
|
||||||
|
|
||||||
|
#if EFI_AUX_VALVES
|
||||||
|
|
||||||
static void plainPinTurnOff(NamedOutputPin *output) {
|
static void plainPinTurnOff(NamedOutputPin *output) {
|
||||||
output->setLow();
|
output->setLow();
|
||||||
}
|
}
|
||||||
|
@ -102,3 +104,5 @@ void recalculateAuxValveTiming() {
|
||||||
engine->engineState.auxValveEnd);
|
engine->engineState.auxValveEnd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // EFI_AUX_VALVES
|
||||||
|
|
|
@ -229,7 +229,9 @@ bool EnginePins::stopPins() {
|
||||||
void EnginePins::unregisterPins() {
|
void EnginePins::unregisterPins() {
|
||||||
stopInjectionPins();
|
stopInjectionPins();
|
||||||
stopIgnitionPins();
|
stopIgnitionPins();
|
||||||
|
#if EFI_AUX_VALVES
|
||||||
stopAuxValves();
|
stopAuxValves();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if EFI_ELECTRONIC_THROTTLE_BODY
|
#if EFI_ELECTRONIC_THROTTLE_BODY
|
||||||
unregisterEtbPins();
|
unregisterEtbPins();
|
||||||
|
@ -258,9 +260,12 @@ void EnginePins::startPins() {
|
||||||
#if EFI_ENGINE_CONTROL
|
#if EFI_ENGINE_CONTROL
|
||||||
startInjectionPins();
|
startInjectionPins();
|
||||||
startIgnitionPins();
|
startIgnitionPins();
|
||||||
startAuxValves();
|
|
||||||
#endif /* EFI_ENGINE_CONTROL */
|
#endif /* EFI_ENGINE_CONTROL */
|
||||||
|
|
||||||
|
#if EFI_AUX_VALVES
|
||||||
|
startAuxValves();
|
||||||
|
#endif // EFI_AUX_VALVES
|
||||||
|
|
||||||
RegisteredOutputPin * pin = registeredOutputHead;
|
RegisteredOutputPin * pin = registeredOutputHead;
|
||||||
while (pin != nullptr) {
|
while (pin != nullptr) {
|
||||||
pin->init();
|
pin->init();
|
||||||
|
@ -290,6 +295,7 @@ void EnginePins::stopInjectionPins() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if EFI_AUX_VALVES
|
||||||
void EnginePins::stopAuxValves() {
|
void EnginePins::stopAuxValves() {
|
||||||
for (int i = 0; i < AUX_DIGITAL_VALVE_COUNT; i++) {
|
for (int i = 0; i < AUX_DIGITAL_VALVE_COUNT; i++) {
|
||||||
NamedOutputPin *output = &enginePins.auxValve[i];
|
NamedOutputPin *output = &enginePins.auxValve[i];
|
||||||
|
@ -311,6 +317,7 @@ void EnginePins::startAuxValves() {
|
||||||
}
|
}
|
||||||
#endif /* EFI_PROD_CODE */
|
#endif /* EFI_PROD_CODE */
|
||||||
}
|
}
|
||||||
|
#endif // EFI_AUX_VALVES
|
||||||
|
|
||||||
void EnginePins::startIgnitionPins() {
|
void EnginePins::startIgnitionPins() {
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#define EFI_ENABLE_ASSERTS TRUE
|
#define EFI_ENABLE_ASSERTS TRUE
|
||||||
#define EFI_LAUNCH_CONTROL TRUE
|
#define EFI_LAUNCH_CONTROL TRUE
|
||||||
|
#define EFI_AUX_VALVES FALSE
|
||||||
|
|
||||||
#define EFI_TS_TUNNEL_CAN TRUE
|
#define EFI_TS_TUNNEL_CAN TRUE
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
|
|
||||||
#define EFI_TUNER_STUDIO TRUE
|
#define EFI_TUNER_STUDIO TRUE
|
||||||
|
|
||||||
|
#define EFI_AUX_VALVES TRUE
|
||||||
|
|
||||||
#define EFI_EMULATE_POSITION_SENSORS TRUE
|
#define EFI_EMULATE_POSITION_SENSORS TRUE
|
||||||
|
|
||||||
#define EFI_VEHICLE_SPEED TRUE
|
#define EFI_VEHICLE_SPEED TRUE
|
||||||
|
|
Loading…
Reference in New Issue