diff --git a/firmware/controllers/lua/generated/value_lookup_generated.cpp b/firmware/controllers/lua/generated/value_lookup_generated.cpp index c037bb20a6..d0fba2b587 100644 --- a/firmware/controllers/lua/generated/value_lookup_generated.cpp +++ b/firmware/controllers/lua/generated/value_lookup_generated.cpp @@ -4282,6 +4282,6 @@ bool setConfigValueByName(const char *name, float value) { engineConfiguration->lambdaProtectionTimeout = (int)value; return 1; } -return 0; } + return 0; } diff --git a/firmware/controllers/lua/lua_hooks.cpp b/firmware/controllers/lua/lua_hooks.cpp index 15c136f77a..34d1b0bb15 100644 --- a/firmware/controllers/lua/lua_hooks.cpp +++ b/firmware/controllers/lua/lua_hooks.cpp @@ -842,7 +842,12 @@ void configureRusefiLuaHooks(lua_State* l) { auto propertyName = luaL_checklstring(l, 1, nullptr); auto value = luaL_checknumber(l, 2); auto incrementVersion = lua_toboolean(l, 3); - setConfigValueByName(propertyName, value); + bool isGoodName = setConfigValueByName(propertyName, value); + if (isGoodName) { + efiPrintf("LUA: applying [%s][%f]", propertyName, value); + } else { + efiPrintf("LUA: invalid calibration key [%s]", propertyName); + } if (incrementVersion) { incrementGlobalConfigurationVersion("lua"); } diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index fb4cca57c4..f087f999c1 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -915,6 +915,12 @@ static void setValue(const char *paramStr, const char *valueStr) { // rusEfi console invokes this method with timestamp in local timezone setDateTime(valueStr); } + + bool isGoodName = setConfigValueByName(paramStr, valueF); + if (isGoodName) { + efiPrintf("Settings: applying [%s][%f]", paramStr, valueF); + } + engine->resetEngineSnifferIfInTestMode(); } @@ -947,8 +953,8 @@ void initSettings(void) { addConsoleActionS(CMD_ENABLE, enable); addConsoleActionS(CMD_DISABLE, disable); - addConsoleActionSS("set", setValue); - addConsoleActionS("get", getValue); + addConsoleActionSS(CMD_SET, setValue); + addConsoleActionS(CMD_GET, getValue); #if EFI_PROD_CODE addConsoleActionS("showpin", showPinFunction); diff --git a/java_tools/configuration_definition/src/test/java/com/rusefi/test/GetConfigValueConsumerTest.java b/java_tools/configuration_definition/src/test/java/com/rusefi/test/GetConfigValueConsumerTest.java index ab0459ae2c..e555e099b6 100644 --- a/java_tools/configuration_definition/src/test/java/com/rusefi/test/GetConfigValueConsumerTest.java +++ b/java_tools/configuration_definition/src/test/java/com/rusefi/test/GetConfigValueConsumerTest.java @@ -57,8 +57,9 @@ public class GetConfigValueConsumerTest { "\t\tconfig->iat.adcChannel = (int)value;\n" + "\t\treturn 1;\n" + "\t}\n" + - "return 0;\n" + - "\t}\n", getConfigValueConsumer.getSetterBody()); + "\t}\n" + + "\treturn 0;\n", + getConfigValueConsumer.getSetterBody()); assertEquals("// generated by GetConfigValueConsumer.java\n" + "#include \"pch.h\"\n" + @@ -88,8 +89,8 @@ public class GetConfigValueConsumerTest { "\t\tconfig->iat.adcChannel = (int)value;\n" + "\t\treturn 1;\n" + "\t}\n" + - "return 0;\n" + "\t}\n" + + "\treturn 0;\n" + "}\n", getConfigValueConsumer.getContent()); diff --git a/java_tools/configuration_definition_base/src/main/java/com/rusefi/output/GetConfigValueConsumer.java b/java_tools/configuration_definition_base/src/main/java/com/rusefi/output/GetConfigValueConsumer.java index 3c01bf596a..da51e95029 100644 --- a/java_tools/configuration_definition_base/src/main/java/com/rusefi/output/GetConfigValueConsumer.java +++ b/java_tools/configuration_definition_base/src/main/java/com/rusefi/output/GetConfigValueConsumer.java @@ -163,11 +163,10 @@ public class GetConfigValueConsumer implements ConfigurationConsumer { setterBody.append(str); } } - switchBody.append("return 0;\n"); String fullSwitch = GetOutputValueConsumer.wrapSwitchStatement(switchBody); - return fullSwitch + setterBody; + return fullSwitch + "\treturn 0;\n" + setterBody; } public String getContent() {