diff --git a/firmware/controllers/lua/lua_hooks.cpp b/firmware/controllers/lua/lua_hooks.cpp index 9c33fb70e5..fb3718050c 100644 --- a/firmware/controllers/lua/lua_hooks.cpp +++ b/firmware/controllers/lua/lua_hooks.cpp @@ -470,6 +470,8 @@ void configureRusefiLuaHooks(lua_State* l) { lua_register(l, "table3d", lua_table3d); lua_register(l, "curve", lua_curve2d); lua_register(l, "findCurveIndex", lua_findCurveIndex); + // used by unit tests + lua_register(l, "txCan", lua_txCan); #if !EFI_UNIT_TEST lua_register(l, "startPwm", lua_startPwm); @@ -500,7 +502,6 @@ void configureRusefiLuaHooks(lua_State* l) { return 1; }); - lua_register(l, "txCan", lua_txCan); #if EFI_CAN_SUPPORT lua_register(l, "canRxAdd", [](lua_State* l) { auto eid = luaL_checkinteger(l, 1);