diff --git a/firmware/controllers/algo/fuel_math.cpp b/firmware/controllers/algo/fuel_math.cpp index 19f5ea9cb2..c536e91afb 100644 --- a/firmware/controllers/algo/fuel_math.cpp +++ b/firmware/controllers/algo/fuel_math.cpp @@ -164,12 +164,8 @@ AirmassModelBase* getAirmassModel(engine_load_mode_e mode) { case LM_MOCK: return engine->mockAirmassModel; #endif default: - // this is a bad work-around for https://github.com/rusefi/rusefi/issues/1690 issue - warning(CUSTOM_ERR_ASSERT, "Invalid airmass mode %d", engineConfiguration->fuelAlgorithm); - return &sdAirmass; -/* todo: this should be the implementation + firmwareError(CUSTOM_ERR_ASSERT, "Invalid airmass mode %d", engineConfiguration->fuelAlgorithm); return nullptr; -*/ } } diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 4d9f868eb4..8ac672ab83 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -117,16 +117,16 @@ typedef enum __attribute__ ((__packed__)) { * Speed Density algorithm - Engine Load is a function of MAP, VE and target AFR * http://articles.sae.org/8539/ */ - LM_SPEED_DENSITY = 3, + LM_SPEED_DENSITY = 0, /** * MAF with a known kg/hour function */ - LM_REAL_MAF = 4, + LM_REAL_MAF = 1, - LM_ALPHA_N = 5, + LM_ALPHA_N = 2, - LM_LUA = 6, + LM_LUA = 3, // This mode is for unit testing only, so that tests don't have to rely on a particular real airmass mode LM_MOCK = 100, diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index a68e0e5397..94b097e36a 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -93,7 +93,7 @@ ! Any time an incompatible change is made to the configuration format stored in flash, ! update this string to the current date! It is required to also update TS_SIGNATURE above ! when this happens. -#define FLASH_DATA_VERSION 10017 +#define FLASH_DATA_VERSION 10018 ! this offset is part of console compatibility mechanism, please DO NOT change this offset #define TS_FILE_VERSION_OFFSET 124 @@ -516,7 +516,7 @@ end_struct specs_s specs float cylinderBore;Cylinder diameter in mm.;"mm", 1, 0, 0, 20000, 2 -#define engine_load_mode_e_enum "INVALID", "INVALID", "INVALID", "Speed Density", "MAF Air Charge", "Alpha-N", "Lua" +#define engine_load_mode_e_enum "Speed Density", "MAF Air Charge", "Alpha-N", "Lua" custom engine_load_mode_e 1 bits, U08, @OFFSET@, [0:2], @@engine_load_mode_e_enum@@ diff --git a/java_console/autotest/src/main/java/com/rusefi/f4discovery/CommonFunctionalTest.java b/java_console/autotest/src/main/java/com/rusefi/f4discovery/CommonFunctionalTest.java index f9fa626584..219b86c9b4 100644 --- a/java_console/autotest/src/main/java/com/rusefi/f4discovery/CommonFunctionalTest.java +++ b/java_console/autotest/src/main/java/com/rusefi/f4discovery/CommonFunctionalTest.java @@ -111,7 +111,7 @@ public class CommonFunctionalTest extends RusefiTestBase { ecu.changeRpm(2000); // Alpha-N mode so that we actually inject some fuel (without mocking tons of sensors) - ecu.sendCommand("set algorithm 5"); + ecu.sendCommand("set algorithm 2"); // Set tps to 25% - make alpha-n happy ecu.sendCommand("set_sensor_mock 10 25"); ecu.sendCommand("set rpm_hard_limit 2500"); @@ -273,7 +273,7 @@ public class CommonFunctionalTest extends RusefiTestBase { ecu.sendCommand("set_sensor_mock 27 12"); // Alpha-N mode so that we actually inject some fuel (without mocking tons of sensors) - ecu.sendCommand("set algorithm 5"); + ecu.sendCommand("set algorithm 2"); // Set tps to 25% - make alpha-n happy ecu.sendCommand("set_sensor_mock 10 25"); @@ -321,7 +321,7 @@ public class CommonFunctionalTest extends RusefiTestBase { // switching to Speed Density ecu.sendCommand("set_sensor_mock 4 69.12"); // MAP - sendComplexCommand("set algorithm 3"); + sendComplexCommand("set algorithm 0"); ecu.changeRpm(2600); ecu.changeRpm(2000); chart = nextChart(); @@ -435,7 +435,7 @@ public class CommonFunctionalTest extends RusefiTestBase { assertWaveNotNull(chart, EngineChart.SPARK_2); // switching to Speed Density - sendComplexCommand("set algorithm 3"); + sendComplexCommand("set algorithm 0"); ecu.changeRpm(2400); ecu.changeRpm(2000); chart = nextChart();