From 094bed11761aa05b6f16443272a8ccfbed3a1fd3 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 29 Aug 2026 16:33:16 +0200 Subject: [PATCH] remove MIX bindings in lua --- client/src/scripting.c | 51 +----------------------------------------- 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/client/src/scripting.c b/client/src/scripting.c index bce0f1149..81d5d845e 100644 --- a/client/src/scripting.c +++ b/client/src/scripting.c @@ -98,55 +98,7 @@ static int l_fast_push_mode(lua_State *L) { /** * The following params expected: - * @brief l_SendCommandMIX - * @param L - a lua string with the following five params. - * @param cmd must be hexstring, max u64 - * @param arg0 must be hexstring, max u64 - * @param arg1 must be hexstring, max u64 - * @param arg2 must be hexstring, max u64 - * @param data must be hexstring less than 1024 chars(512bytes) - * @return - */ -static int l_SendCommandMIX(lua_State *L) { - - uint64_t cmd, arg0, arg1, arg2; - uint8_t data[PM3_CMD_DATA_SIZE] = {0}; - size_t len = 0, size; - - // check number of arguments - int n = lua_gettop(L); - if (n != 5) { - return returnToLuaWithError(L, "You need to supply five parameters"); - } - - // parse input - cmd = luaL_checknumber(L, 1); - arg0 = luaL_checknumber(L, 2); - arg1 = luaL_checknumber(L, 3); - arg2 = luaL_checknumber(L, 4); - - // data - const char *p_data = luaL_checklstring(L, 5, &size); - if (size) { - if (size > 1024) - size = 1024; - - uint32_t tmp; - for (int i = 0; i < size; i += 2) { - sscanf(&p_data[i], "%02x", &tmp); - data[i >> 1] = tmp & 0xFF; - len++; - } - } - - clearCommandBuffer(); - SendCommandMIX(cmd, arg0, arg1, arg2, data, len); - lua_pushboolean(L, true); - return 1; -} -/** - * The following params expected: - * @brief l_SendCommandMIX + * @brief l_SendCommandNG * @param L - a lua string with the following two params. * @param cmd must be hexstring, max u64 * @param data must be hexstring less than 1024 chars(512bytes) @@ -1403,7 +1355,6 @@ static int setLuaPath(lua_State *L, const char *path) { int set_pm3_libraries(lua_State *L) { static const luaL_Reg libs[] = { - {"SendCommandMIX", l_SendCommandMIX}, {"SendCommandNG", l_SendCommandNG}, {"GetFromBigBuf", l_GetFromBigBuf}, {"GetFromFlashMem", l_GetFromFlashMem},