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