From ed89d5da57d89f2c866a573d7a5adbff507fbf80 Mon Sep 17 00:00:00 2001 From: rusefi Date: Fri, 29 Oct 2021 13:14:42 -0400 Subject: [PATCH] lua can: one step back --- firmware/controllers/lua/lua_can_rx.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/firmware/controllers/lua/lua_can_rx.cpp b/firmware/controllers/lua/lua_can_rx.cpp index 979140d5ae..3c3f6e614f 100644 --- a/firmware/controllers/lua/lua_can_rx.cpp +++ b/firmware/controllers/lua/lua_can_rx.cpp @@ -80,7 +80,9 @@ static void handleCanFrame(LuaHandle& ls, CANRxFrame* frame) { lua_pushinteger(ls, frame->data8[i]); // index is i+1 because Lua "arrays" (tables) are 1-indexed - lua_rawseti(ls, -2, i + 1); +// lua_rawseti(ls, -2, i + 1); + // one step back + lua_rawseti(ls, -2, i); } // Perform the actual function call