Remove fsio part 1 (#3871)
* dead includes * move last logic out of fsio * dead functions
This commit is contained in:
parent
fd9930440f
commit
28b6cce9d9
|
@ -11,7 +11,6 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "custom_engine.h"
|
||||
#include "hellen_meta.h"
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "custom_engine.h"
|
||||
#include "hellen_meta.h"
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "custom_engine.h"
|
||||
#include "hellen_meta.h"
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "custom_engine.h"
|
||||
#include "electronic_throttle_impl.h"
|
||||
#include "hellen_meta.h"
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "custom_engine.h"
|
||||
#include "hellen_meta.h"
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "custom_engine.h"
|
||||
#include "hellen_meta.h"
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "custom_engine.h"
|
||||
#include "hellen_meta.h"
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "custom_engine.h"
|
||||
#include "hellen_meta.h"
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "hellen_meta.h"
|
||||
|
||||
static void setInjectorPins() {
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "custom_engine.h"
|
||||
#include "hellen_meta.h"
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "custom_engine.h"
|
||||
#include "hellen_meta.h"
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "mre_meta.h"
|
||||
|
||||
static void setInjectorPins() {
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
|
||||
// Warning! This is a test config!
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
|
||||
#ifdef STM32F469xx
|
||||
static bool is469 = true;
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "proteus_meta.h"
|
||||
|
||||
static const brain_pin_e injPins[] = {
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "smart_gpio.h"
|
||||
#include "drivers/gpio/mc33810.h"
|
||||
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
#include "pch.h"
|
||||
|
||||
#include "bmw_m73.h"
|
||||
#include "fsio_impl.h"
|
||||
|
||||
void setEngineBMW_M73_microRusEfi() {
|
||||
m73engine();
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "pch.h"
|
||||
|
||||
#include "custom_engine.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "mre_meta.h"
|
||||
#include "proteus_meta.h"
|
||||
#include "hellen_meta.h"
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "pch.h"
|
||||
|
||||
#include "ford_festiva.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "mazda_miata.h"
|
||||
#include "custom_engine.h"
|
||||
|
||||
|
|
|
@ -11,5 +11,4 @@
|
|||
|
||||
#include "mazda_626.h"
|
||||
#include "custom_engine.h"
|
||||
#include "fsio_impl.h"
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
#include "pch.h"
|
||||
|
||||
#include "fsio_impl.h"
|
||||
#include "mazda_miata.h"
|
||||
#include "advance_map.h"
|
||||
#include "custom_engine.h"
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "pch.h"
|
||||
|
||||
#include "custom_engine.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "mazda_miata_1_6.h"
|
||||
#include "mazda_miata_base_maps.h"
|
||||
#include "mre_meta.h"
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include "mazda_miata_vvt.h"
|
||||
#include "custom_engine.h"
|
||||
#include "fsio_impl.h"
|
||||
|
||||
// todo: why would this not work?
|
||||
//extern const float mazda_miata_nb2_RpmBins[FUEL_RPM_COUNT];
|
||||
|
|
|
@ -50,7 +50,6 @@
|
|||
|
||||
#include "mazda_miata_vvt.h"
|
||||
#include "custom_engine.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "mazda_miata_base_maps.h"
|
||||
#include "hip9011_logic.h"
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "pch.h"
|
||||
|
||||
#include "me7pnp.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "cj125.h"
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include "pch.h"
|
||||
|
||||
#include "fsio_impl.h"
|
||||
#include "mitsubishi.h"
|
||||
|
||||
void setMitsubishiConfiguration() {
|
||||
|
|
|
@ -79,10 +79,6 @@ extern int icuFallingCallbackCounter;
|
|||
#include "map_averaging.h"
|
||||
#endif
|
||||
|
||||
#if EFI_FSIO
|
||||
#include "fsio_impl.h"
|
||||
#endif /* EFI_FSIO */
|
||||
|
||||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
#include "tle8888.h"
|
||||
#endif /* BOARD_TLE8888_COUNT */
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
#include "local_version_holder.h"
|
||||
#include "vvt.h"
|
||||
|
||||
#include "fsio_impl.h"
|
||||
|
||||
#define NO_PIN_PERIOD 500
|
||||
|
||||
#if defined(HAS_OS_ACCESS)
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "os_access.h"
|
||||
#include "aux_valves.h"
|
||||
#include "map_averaging.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "perf_trace.h"
|
||||
#include "backup_ram.h"
|
||||
#include "idle_thread.h"
|
||||
|
@ -225,11 +224,8 @@ void Engine::periodicSlowCallback() {
|
|||
|
||||
updateVrPwm();
|
||||
|
||||
#if EFI_FSIO
|
||||
runFsio();
|
||||
#else
|
||||
runHardcodedFsio();
|
||||
#endif /* EFI_FSIO */
|
||||
enginePins.o2heater.setValue(engine->rpmCalculator.isRunning());
|
||||
enginePins.starterRelayDisable.setValue(Sensor::getOrZero(SensorType::Rpm) < engineConfiguration->cranking.rpm);
|
||||
|
||||
updateGppwm();
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "pch.h"
|
||||
|
||||
#include "os_access.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "speed_density.h"
|
||||
#include "advance_map.h"
|
||||
#include "flash_main.h"
|
||||
|
@ -203,10 +202,6 @@ void incrementGlobalConfigurationVersion() {
|
|||
onConfigurationChangeRpmEmulatorCallback(&activeConfiguration);
|
||||
#endif /* EFI_EMULATE_POSITION_SENSORS */
|
||||
|
||||
#if EFI_FSIO
|
||||
onConfigurationChangeFsioCallback(&activeConfiguration);
|
||||
#endif /* EFI_FSIO */
|
||||
|
||||
engine->engineModules.apply_all([](auto & m) {
|
||||
m.onConfigurationChange(&activeConfiguration);
|
||||
});
|
||||
|
|
|
@ -70,8 +70,6 @@ static LENameOrdinalPair leFuelRate(LE_METHOD_FUEL_FLOW_RATE, "fuel_flow");
|
|||
static LEElement sysElements[SYS_ELEMENT_POOL_SIZE];
|
||||
CCM_OPTIONAL LEElementPool sysPool(sysElements, SYS_ELEMENT_POOL_SIZE);
|
||||
|
||||
static LEElement * starterRelayDisableLogic;
|
||||
|
||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||
|
||||
FsioResult getEngineValue(le_action_e action) {
|
||||
|
@ -121,10 +119,6 @@ FsioResult getEngineValue(le_action_e action) {
|
|||
|
||||
#endif
|
||||
|
||||
void onConfigurationChangeFsioCallback(engine_configuration_s *previousConfiguration) {
|
||||
(void)previousConfiguration;
|
||||
}
|
||||
|
||||
static LECalculator calc CCM_OPTIONAL;
|
||||
|
||||
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) {
|
||||
switch (index) {
|
||||
default:
|
||||
|
@ -250,14 +229,6 @@ float getCurveValue(int index, float key) {
|
|||
}
|
||||
|
||||
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,
|
||||
config->scriptTable1RpmBins);
|
||||
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 */
|
||||
|
|
|
@ -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);
|
||||
|
||||
void initFsioImpl();
|
||||
void runFsio();
|
||||
|
||||
void onConfigurationChangeFsioCallback(engine_configuration_s *previousConfiguration);
|
||||
void runHardcodedFsio();
|
||||
|
||||
float getCurveValue(int index, float key);
|
||||
int getCurveIndexByName(const char *name);
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "advance_map.h"
|
||||
#include "efi_pid.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "idle_thread.h"
|
||||
#include "electronic_throttle.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue