mirror of https://github.com/rusefi/rusefi-1.git
Remove fsio part 1 (#3871)
* dead includes * move last logic out of fsio * dead functions
This commit is contained in:
parent
f3a2a9c6cb
commit
a718f3a30a
|
@ -11,7 +11,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "electronic_throttle_impl.h"
|
#include "electronic_throttle_impl.h"
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "mre_meta.h"
|
#include "mre_meta.h"
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
|
|
||||||
// Warning! This is a test config!
|
// Warning! This is a test config!
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
|
|
||||||
#ifdef STM32F469xx
|
#ifdef STM32F469xx
|
||||||
static bool is469 = true;
|
static bool is469 = true;
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "proteus_meta.h"
|
#include "proteus_meta.h"
|
||||||
|
|
||||||
static const brain_pin_e injPins[] = {
|
static const brain_pin_e injPins[] = {
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
|
|
||||||
// An example of how to configure complex features on the board.
|
// An example of how to configure complex features on the board.
|
||||||
// Generally these should be local (static) functions, one function per chip.
|
// Generally these should be local (static) functions, one function per chip.
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "smart_gpio.h"
|
#include "smart_gpio.h"
|
||||||
#include "drivers/gpio/mc33810.h"
|
#include "drivers/gpio/mc33810.h"
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,6 @@
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
|
|
||||||
#include "bmw_m73.h"
|
#include "bmw_m73.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
|
|
||||||
void setEngineBMW_M73_microRusEfi() {
|
void setEngineBMW_M73_microRusEfi() {
|
||||||
m73engine();
|
m73engine();
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
|
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "mre_meta.h"
|
#include "mre_meta.h"
|
||||||
#include "proteus_meta.h"
|
#include "proteus_meta.h"
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
|
|
||||||
#include "ford_festiva.h"
|
#include "ford_festiva.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "mazda_miata.h"
|
#include "mazda_miata.h"
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
|
|
||||||
|
|
|
@ -11,5 +11,4 @@
|
||||||
|
|
||||||
#include "mazda_626.h"
|
#include "mazda_626.h"
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
|
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "mazda_miata.h"
|
#include "mazda_miata.h"
|
||||||
#include "advance_map.h"
|
#include "advance_map.h"
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
|
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "mazda_miata_1_6.h"
|
#include "mazda_miata_1_6.h"
|
||||||
#include "mazda_miata_base_maps.h"
|
#include "mazda_miata_base_maps.h"
|
||||||
#include "mre_meta.h"
|
#include "mre_meta.h"
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
#include "mazda_miata_vvt.h"
|
#include "mazda_miata_vvt.h"
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
|
|
||||||
// todo: why would this not work?
|
// todo: why would this not work?
|
||||||
//extern const float mazda_miata_nb2_RpmBins[FUEL_RPM_COUNT];
|
//extern const float mazda_miata_nb2_RpmBins[FUEL_RPM_COUNT];
|
||||||
|
|
|
@ -50,7 +50,6 @@
|
||||||
|
|
||||||
#include "mazda_miata_vvt.h"
|
#include "mazda_miata_vvt.h"
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "mazda_miata_base_maps.h"
|
#include "mazda_miata_base_maps.h"
|
||||||
#include "hip9011_logic.h"
|
#include "hip9011_logic.h"
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
|
|
||||||
#include "me7pnp.h"
|
#include "me7pnp.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "cj125.h"
|
#include "cj125.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
|
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "mitsubishi.h"
|
#include "mitsubishi.h"
|
||||||
|
|
||||||
void setMitsubishiConfiguration() {
|
void setMitsubishiConfiguration() {
|
||||||
|
|
|
@ -79,10 +79,6 @@ extern int icuFallingCallbackCounter;
|
||||||
#include "map_averaging.h"
|
#include "map_averaging.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EFI_FSIO
|
|
||||||
#include "fsio_impl.h"
|
|
||||||
#endif /* EFI_FSIO */
|
|
||||||
|
|
||||||
#if (BOARD_TLE8888_COUNT > 0)
|
#if (BOARD_TLE8888_COUNT > 0)
|
||||||
#include "tle8888.h"
|
#include "tle8888.h"
|
||||||
#endif /* BOARD_TLE8888_COUNT */
|
#endif /* BOARD_TLE8888_COUNT */
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
#include "local_version_holder.h"
|
#include "local_version_holder.h"
|
||||||
#include "vvt.h"
|
#include "vvt.h"
|
||||||
|
|
||||||
#include "fsio_impl.h"
|
|
||||||
|
|
||||||
#define NO_PIN_PERIOD 500
|
#define NO_PIN_PERIOD 500
|
||||||
|
|
||||||
#if defined(HAS_OS_ACCESS)
|
#if defined(HAS_OS_ACCESS)
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
#include "os_access.h"
|
#include "os_access.h"
|
||||||
#include "aux_valves.h"
|
#include "aux_valves.h"
|
||||||
#include "map_averaging.h"
|
#include "map_averaging.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "perf_trace.h"
|
#include "perf_trace.h"
|
||||||
#include "backup_ram.h"
|
#include "backup_ram.h"
|
||||||
#include "idle_thread.h"
|
#include "idle_thread.h"
|
||||||
|
@ -225,11 +224,8 @@ void Engine::periodicSlowCallback() {
|
||||||
|
|
||||||
updateVrPwm();
|
updateVrPwm();
|
||||||
|
|
||||||
#if EFI_FSIO
|
enginePins.o2heater.setValue(engine->rpmCalculator.isRunning());
|
||||||
runFsio();
|
enginePins.starterRelayDisable.setValue(Sensor::getOrZero(SensorType::Rpm) < engineConfiguration->cranking.rpm);
|
||||||
#else
|
|
||||||
runHardcodedFsio();
|
|
||||||
#endif /* EFI_FSIO */
|
|
||||||
|
|
||||||
updateGppwm();
|
updateGppwm();
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
|
|
||||||
#include "os_access.h"
|
#include "os_access.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "speed_density.h"
|
#include "speed_density.h"
|
||||||
#include "advance_map.h"
|
#include "advance_map.h"
|
||||||
#include "flash_main.h"
|
#include "flash_main.h"
|
||||||
|
@ -203,10 +202,6 @@ void incrementGlobalConfigurationVersion() {
|
||||||
onConfigurationChangeRpmEmulatorCallback(&activeConfiguration);
|
onConfigurationChangeRpmEmulatorCallback(&activeConfiguration);
|
||||||
#endif /* EFI_EMULATE_POSITION_SENSORS */
|
#endif /* EFI_EMULATE_POSITION_SENSORS */
|
||||||
|
|
||||||
#if EFI_FSIO
|
|
||||||
onConfigurationChangeFsioCallback(&activeConfiguration);
|
|
||||||
#endif /* EFI_FSIO */
|
|
||||||
|
|
||||||
engine->engineModules.apply_all([](auto & m) {
|
engine->engineModules.apply_all([](auto & m) {
|
||||||
m.onConfigurationChange(&activeConfiguration);
|
m.onConfigurationChange(&activeConfiguration);
|
||||||
});
|
});
|
||||||
|
|
|
@ -70,8 +70,6 @@ static LENameOrdinalPair leFuelRate(LE_METHOD_FUEL_FLOW_RATE, "fuel_flow");
|
||||||
static LEElement sysElements[SYS_ELEMENT_POOL_SIZE];
|
static LEElement sysElements[SYS_ELEMENT_POOL_SIZE];
|
||||||
CCM_OPTIONAL LEElementPool sysPool(sysElements, SYS_ELEMENT_POOL_SIZE);
|
CCM_OPTIONAL LEElementPool sysPool(sysElements, SYS_ELEMENT_POOL_SIZE);
|
||||||
|
|
||||||
static LEElement * starterRelayDisableLogic;
|
|
||||||
|
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||||
|
|
||||||
FsioResult getEngineValue(le_action_e action) {
|
FsioResult getEngineValue(le_action_e action) {
|
||||||
|
@ -121,10 +119,6 @@ FsioResult getEngineValue(le_action_e action) {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void onConfigurationChangeFsioCallback(engine_configuration_s *previousConfiguration) {
|
|
||||||
(void)previousConfiguration;
|
|
||||||
}
|
|
||||||
|
|
||||||
static LECalculator calc CCM_OPTIONAL;
|
static LECalculator calc CCM_OPTIONAL;
|
||||||
|
|
||||||
static const char * action2String(le_action_e action) {
|
static const char * action2String(le_action_e action) {
|
||||||
|
@ -172,21 +166,6 @@ static void setPinState(const char * msg, OutputPin *pin, LEElement *element) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* this method should be invoked periodically to calculate FSIO and toggle corresponding FSIO outputs
|
|
||||||
*/
|
|
||||||
void runFsio() {
|
|
||||||
if (isBrainPinValid(engineConfiguration->starterRelayDisablePin))
|
|
||||||
setPinState("starter_relay", &enginePins.starterRelayDisable, starterRelayDisableLogic);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* o2 heater is off during cranking
|
|
||||||
* todo: convert to FSIO?
|
|
||||||
* open question if heater should be ON during cranking
|
|
||||||
*/
|
|
||||||
enginePins.o2heater.setValue(engine->rpmCalculator.isRunning());
|
|
||||||
}
|
|
||||||
|
|
||||||
ValueProvider3D *getscriptTable(int index) {
|
ValueProvider3D *getscriptTable(int index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
default:
|
default:
|
||||||
|
@ -250,14 +229,6 @@ float getCurveValue(int index, float key) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void initFsioImpl() {
|
void initFsioImpl() {
|
||||||
#if EFI_UNIT_TEST
|
|
||||||
// only unit test needs this
|
|
||||||
sysPool.reset();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (isBrainPinValid(engineConfiguration->starterRelayDisablePin))
|
|
||||||
starterRelayDisableLogic = sysPool.parseExpression(STARTER_RELAY_LOGIC);
|
|
||||||
|
|
||||||
scriptTable1.init(config->scriptTable1, config->scriptTable1LoadBins,
|
scriptTable1.init(config->scriptTable1, config->scriptTable1LoadBins,
|
||||||
config->scriptTable1RpmBins);
|
config->scriptTable1RpmBins);
|
||||||
scriptTable2.init(config->scriptTable2, config->scriptTable2LoadBins,
|
scriptTable2.init(config->scriptTable2, config->scriptTable2LoadBins,
|
||||||
|
@ -269,22 +240,4 @@ void initFsioImpl() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !EFI_FSIO */
|
|
||||||
|
|
||||||
// "Limp-mode" implementation for some RAM-limited configs without FSIO
|
|
||||||
void runHardcodedFsio() {
|
|
||||||
#if EFI_PROD_CODE
|
|
||||||
if (isRunningBenchTest()) {
|
|
||||||
return; // let's not mess with bench testing
|
|
||||||
}
|
|
||||||
#endif /* EFI_PROD_CODE */
|
|
||||||
|
|
||||||
// see STARTER_RELAY_LOGIC
|
|
||||||
if (isBrainPinValid(engineConfiguration->starterRelayDisablePin)) {
|
|
||||||
enginePins.starterRelayDisable.setValue(Sensor::getOrZero(SensorType::Rpm) < engineConfiguration->cranking.rpm);
|
|
||||||
}
|
|
||||||
|
|
||||||
enginePins.o2heater.setValue(engine->rpmCalculator.isRunning());
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* EFI_FSIO */
|
#endif /* EFI_FSIO */
|
||||||
|
|
|
@ -23,10 +23,6 @@ typedef Map3D<SCRIPT_TABLE_8, SCRIPT_TABLE_8, uint8_t, uint16_t, uint16_t> fsio8
|
||||||
expected<float> getEngineValue(le_action_e action);
|
expected<float> getEngineValue(le_action_e action);
|
||||||
|
|
||||||
void initFsioImpl();
|
void initFsioImpl();
|
||||||
void runFsio();
|
|
||||||
|
|
||||||
void onConfigurationChangeFsioCallback(engine_configuration_s *previousConfiguration);
|
|
||||||
void runHardcodedFsio();
|
|
||||||
|
|
||||||
float getCurveValue(int index, float key);
|
float getCurveValue(int index, float key);
|
||||||
int getCurveIndexByName(const char *name);
|
int getCurveIndexByName(const char *name);
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
#include "advance_map.h"
|
#include "advance_map.h"
|
||||||
#include "efi_pid.h"
|
#include "efi_pid.h"
|
||||||
#include "fsio_impl.h"
|
|
||||||
#include "idle_thread.h"
|
#include "idle_thread.h"
|
||||||
#include "electronic_throttle.h"
|
#include "electronic_throttle.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue