◆ configureRusefiLuaUtilHooks()
void configureRusefiLuaUtilHooks |
( |
lua_State * |
l | ) |
|
Definition at line 39 of file lua_hooks_util.cpp.
43 lua_register(lState,
"findCurveIndex", [](lua_State* l) {
44 auto name = luaL_checklstring(l, 1,
nullptr);
50 lua_pushnumber(l, result.Value + HUMAN_OFFSET);
55 lua_register(lState,
"findTableIndex",
57 auto name = luaL_checklstring(l, 1,
nullptr);
63 lua_pushnumber(l, index.Value + HUMAN_OFFSET);
68 lua_register(lState,
"findSetting",
70 auto name = luaL_checklstring(l, 1,
nullptr);
71 auto defaultValue = luaL_checknumber(l, 2);
75 lua_pushnumber(l, defaultValue);
83 #if defined(STM32F4) || defined(STM32F7)
84 lua_register(lState,
"mcu_standby", [](lua_State*) {
static int lua_efi_print(lua_State *l)
static int lua_interpolate(lua_State *l)
engine_configuration_s * engineConfiguration
expected< int > getSettingIndexByName(const char *name)
expected< int > getTableIndexByName(const char *name)
expected< int > getCurveIndexByName(const char *name)
script_setting_t scriptSetting[SCRIPT_SETTING_COUNT]
Referenced by configureRusefiLuaHooks().
Go to the source code of this file.