LUA read ECU state: Cranking, Idling, Cruising #3742

This commit is contained in:
rusefillc 2022-01-04 23:17:26 -05:00
parent cf11dd0ca5
commit d877a02486
1 changed files with 1 additions and 1 deletions

View File

@ -568,13 +568,13 @@ void configureRusefiLuaHooks(lua_State* l) {
} else if (state == RUNNING) { } else if (state == RUNNING) {
luaStateCode = 2; luaStateCode = 2;
} else { } else {
// spinning-up or cranking
luaStateCode = 1; luaStateCode = 1;
} }
lua_pushnumber(l, luaStateCode); lua_pushnumber(l, luaStateCode);
return 1; return 1;
}); });
lua_register(l, "setCalibration", [](lua_State* l) { lua_register(l, "setCalibration", [](lua_State* l) {
auto propertyName = luaL_checklstring(l, 1, nullptr); auto propertyName = luaL_checklstring(l, 1, nullptr);
auto value = luaL_checknumber(l, 2); auto value = luaL_checknumber(l, 2);