From 6b2bca510c8a4c5f94520aee2e70f48ac79b1e86 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 17 Apr 2023 12:15:47 +0200 Subject: [PATCH] fix(lua): Debug`print` not working (#3472) --- radio/src/thirdparty/Lua/src/luaconf.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/radio/src/thirdparty/Lua/src/luaconf.h b/radio/src/thirdparty/Lua/src/luaconf.h index 5683447d0..1e9d544a0 100644 --- a/radio/src/thirdparty/Lua/src/luaconf.h +++ b/radio/src/thirdparty/Lua/src/luaconf.h @@ -233,7 +233,23 @@ #define luai_writestringerror(s,p) TRACE_DEBUG_WP(s, p); #endif +// +// fix for #3468 +// +// forces LUA print function to use +// debugPrintf through TRACE_DEBUG_WP +// +#define EDGETX +#if defined(EDGETX) +#undef luai_writestring +#undef luai_writeline +#undef luai_writestringerror +#define luai_writestring(s,l) TRACE_DEBUG_WP("%s", s); +#define luai_writeline() TRACE_DEBUG_WP("\n"); +#define luai_writestringerror(s,p) TRACE_DEBUG_WP(s, p); +#endif +#undef EDGETX /* @@ LUAI_MAXSHORTLEN is the maximum length for short strings, that is,