parent
aa883fc616
commit
6f162db2c7
|
@ -26,6 +26,7 @@
|
|||
#include "settings.h"
|
||||
#include "signal_executor.h"
|
||||
#include "speed_density.h"
|
||||
#include "fsio_impl.h"
|
||||
|
||||
EXTERN_ENGINE;
|
||||
|
||||
|
@ -33,6 +34,7 @@ void initDataStructures(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
prepareFuelMap(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
prepareTimingMap(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
initSpeedDensity(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
prepareFsio();
|
||||
}
|
||||
|
||||
void initAlgo(Logging *sharedLogger) {
|
||||
|
|
|
@ -347,7 +347,7 @@ void Engine::checkShutdown() {
|
|||
int rpm = rpmCalculator.rpmValue;
|
||||
|
||||
const float vBattThreshold = 5.0f;
|
||||
if (isValidRpm(rpm) && sensors.vBatt < vBattThreshold) {
|
||||
if (isValidRpm(rpm) && sensors.vBatt < vBattThreshold && stopEngineRequestTimeNt == 0) {
|
||||
stopEngine();
|
||||
// todo: add stepper motor parking
|
||||
}
|
||||
|
|
|
@ -512,9 +512,6 @@ void initFsioImpl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||
logger = sharedLogger;
|
||||
#endif
|
||||
for (int i = 0; i < FSIO_COMMAND_COUNT; i++) {
|
||||
fsioLogics[i] = NULL;
|
||||
}
|
||||
|
||||
#if EFI_FUEL_PUMP || defined(__DOXYGEN__)
|
||||
fuelPumpLogic = sysPool.parseExpression(FUEL_PUMP_LOGIC);
|
||||
|
@ -577,5 +574,10 @@ void initFsioImpl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
|
||||
}
|
||||
|
||||
void prepareFsio(void) {
|
||||
for (int i = 0; i < FSIO_COMMAND_COUNT; i++) {
|
||||
fsioLogics[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* EFI_FSIO */
|
||||
|
|
|
@ -25,5 +25,6 @@ void setFsioExt(int index, brain_pin_e pin, const char * exp, int freq DECLARE_E
|
|||
void initFsioImpl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void runFsio(void);
|
||||
void applyFsioConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void prepareFsio(void);
|
||||
|
||||
#endif /* LE_FUNCTIONS_H_ */
|
||||
|
|
Loading…
Reference in New Issue