diff --git a/firmware/controllers/algo/accel_enrichment.cpp b/firmware/controllers/algo/accel_enrichment.cpp index 5056c31dad..08f54da093 100644 --- a/firmware/controllers/algo/accel_enrichment.cpp +++ b/firmware/controllers/algo/accel_enrichment.cpp @@ -271,17 +271,7 @@ void initAccelEnrichment(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S) { tpsTpsMap.init(config->tpsTpsAccelTable, config->tpsTpsAccelFromRpmBins, config->tpsTpsAccelToRpmBins); #if ! EFI_UNIT_TEST || defined(__DOXYGEN__) - addConsoleActionI("set_tps_accel_len", setTpsAccelLen); - addConsoleActionF("set_tps_accel_threshold", setTpsAccelThr); - //addConsoleActionF("set_tps_accel_multiplier", setTpsAccelMult); - addConsoleActionF("set_tps_decel_threshold", setTpsDecelThr); - addConsoleActionF("set_tps_decel_multiplier", setTpsDecelMult); - addConsoleActionI("set_engine_load_accel_len", setEngineLoadAccelLen); - addConsoleActionF("set_engine_load_accel_threshold", setEngineLoadAccelThr); - addConsoleActionF("set_engine_load_accel_multiplier", setEngineLoadAccelMult); - addConsoleActionF("set_engine_decel_threshold", setDecelThr); - addConsoleActionF("set_engine_decel_multiplier", setDecelMult); addConsoleAction("accelinfo", accelInfo); updateAccelParameters(); diff --git a/firmware/controllers/algo/accel_enrichment.h b/firmware/controllers/algo/accel_enrichment.h index 8537f8b9e0..6dda111965 100644 --- a/firmware/controllers/algo/accel_enrichment.h +++ b/firmware/controllers/algo/accel_enrichment.h @@ -66,9 +66,14 @@ void initAccelEnrichment(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S); void setEngineLoadAccelLen(int len); void setEngineLoadAccelThr(float value); void setEngineLoadAccelMult(float value); + void setTpsAccelThr(float value); void setTpsDecelThr(float value); void setTpsDecelMult(float value); +void setTpsAccelLen(int length); + +void setDecelThr(float value); +void setDecelMult(float value); void updateAccelParameters(); diff --git a/firmware/controllers/idle_thread.cpp b/firmware/controllers/idle_thread.cpp index e0c2f11550..c37151a528 100644 --- a/firmware/controllers/idle_thread.cpp +++ b/firmware/controllers/idle_thread.cpp @@ -231,25 +231,25 @@ static void apply(void) { // idleMath.updateFactors(engineConfiguration->idlePFactor, engineConfiguration->idleIFactor, engineConfiguration->idleDFactor, engineConfiguration->idleDT); } -static void setIdlePFactor(float value) { +void setIdlePFactor(float value) { engineConfiguration->idleRpmPid.pFactor = value; apply(); showIdleInfo(); } -static void setIdleIFactor(float value) { +void setIdleIFactor(float value) { engineConfiguration->idleRpmPid.iFactor = value; apply(); showIdleInfo(); } -static void setIdleDFactor(float value) { +void setIdleDFactor(float value) { engineConfiguration->idleRpmPid.dFactor = value; apply(); showIdleInfo(); } -static void setIdleDT(int value) { +void setIdleDT(int value) { engineConfiguration->idleDT = value; apply(); showIdleInfo(); @@ -327,9 +327,6 @@ void startIdleThread(Logging*sharedLogger, Engine *engine) { // split this whole file into manual controller and auto controller? move these commands into the file // which would be dedicated to just auto-controller? addConsoleActionI("set_idle_rpm", setTargetRpm); - addConsoleActionF("set_idle_p", setIdlePFactor); - addConsoleActionF("set_idle_i", setIdleIFactor); - addConsoleActionF("set_idle_d", setIdleDFactor); addConsoleActionI("set_idle_dt", setIdleDT); addConsoleAction("idlebench", startIdleBench); diff --git a/firmware/controllers/idle_thread.h b/firmware/controllers/idle_thread.h index 7a3b52b4c3..35f62f38dc 100644 --- a/firmware/controllers/idle_thread.h +++ b/firmware/controllers/idle_thread.h @@ -15,5 +15,9 @@ percent_t getIdlePosition(void); void startIdleThread(Logging*sharedLogger, Engine *engine); void setDefaultIdleParameters(void); void startIdleBench(void); +void setIdleDT(int value); +void setIdlePFactor(float value); +void setIdleIFactor(float value); +void setIdleDFactor(float value); #endif /* IDLE_THREAD_H_ */ diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 4c38e49b59..7c117098e4 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -23,6 +23,7 @@ #include "efiGpio.h" #include "engine_math.h" #include "alternatorController.h" +#include "idle_thread.h" #if EFI_PROD_CODE || defined(__DOXYGEN__) #include "rtc_helper.h" @@ -978,6 +979,18 @@ command_f_s commandsF[] = {{"mock_iat_voltage", setIatVoltage}, {"vbatt_divider", setVBattDivider}, {"clt_bias", setCltBias}, {"iat_bias", setIatBias}, + {"tps_accel_threshold", setTpsAccelThr}, + {"tps_decel_threshold", setTpsDecelThr}, + {"tps_decel_multiplier", setTpsDecelMult}, + {"engine_load_accel_threshold", setEngineLoadAccelThr}, + {"engine_load_accel_multiplier", setEngineLoadAccelMult}, + {"engine_decel_threshold", setDecelThr}, + {"engine_decel_multiplier", setDecelMult}, + {"idle_p", setIdlePFactor}, + {"idle_i", setIdleIFactor}, + {"idle_d", setIdleDFactor}, + // {"", }, + // {"", }, // {"", }, // {"", }, // {"", }, @@ -1005,8 +1018,8 @@ command_i_s commandsI[] = {{"ignition_mode", setIgnitionMode}, {"operation_mode", setOM}, {"trigger_type", setTriggerType}, {"idle_solenoid_freq", setIdleSolenoidFrequency}, - // {"", }, - // {"", }, + {"tps_accel_len", setTpsAccelLen}, + {"engine_load_accel_len", setEngineLoadAccelLen}, // {"", }, // {"", }, // {"", }, diff --git a/java_console/autotest/src/com/rusefi/AutoTest.java b/java_console/autotest/src/com/rusefi/AutoTest.java index 75846f2ace..f39e2a4edb 100644 --- a/java_console/autotest/src/com/rusefi/AutoTest.java +++ b/java_console/autotest/src/com/rusefi/AutoTest.java @@ -223,7 +223,7 @@ public class AutoTest { // switching to Speed Density sendCommand("set mock_map_voltage 1"); - sendComplexCommand("set_algorithm 3"); + sendComplexCommand("set algorithm 3"); IoUtil.changeRpm(2600); IoUtil.changeRpm(2000); chart = nextChart();