From 2bef12996f4d7556438d2d6756253419cf015820 Mon Sep 17 00:00:00 2001 From: Peter Feerick Date: Tue, 27 Feb 2024 09:42:50 +1000 Subject: [PATCH] fix(lua): serialRead is not limited to CLI (#4644) --- radio/src/lua/api_general.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/radio/src/lua/api_general.cpp b/radio/src/lua/api_general.cpp index dde247954..9765922e8 100644 --- a/radio/src/lua/api_general.cpp +++ b/radio/src/lua/api_general.cpp @@ -2321,7 +2321,6 @@ Reads characters from the serial port. The string is allowed to contain any char */ static int luaSerialRead(lua_State * L) { -#if defined(LUA) && !defined(CLI) int num = luaL_optunsigned(L, 1, 0); uint8_t str[LUA_FIFO_SIZE]; @@ -2350,9 +2349,6 @@ static int luaSerialRead(lua_State * L) } } lua_pushlstring(L, (const char*)str, p - str); -#else - lua_pushlstring(L, "", 0); -#endif return 1; }