fix(lua): serialRead is not limited to CLI (#4644)

This commit is contained in:
Peter Feerick
2024-02-27 09:42:50 +10:00
committed by GitHub
parent b63629f715
commit 2bef12996f
-4
View File
@@ -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;
}