-
-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(cpn) LUA no debug printout possible #3468
Comments
I can confirm the problem on W10-64Bit and started investigating. It seems fwrite() to stdout is no longer working. Using TRACE_DEBUG_WP() LUA print works: radio\src\thirdparty\Lua\src\luaconf.h changing lines 224-234 to this will bring back LUA print to Simulator Debug console: //#if defined(LUA_LIB) || defined(lua_c)
//#include <stdio.h>
//#define luai_writestring(s,l) fwrite((s), sizeof(char), (l), stdout)
//#define luai_writeline() (luai_writestring("\n", 1), fflush(stdout))
//#define luai_writestringerror(s,p) \
// (fprintf(stderr, (s), (p)), fflush(stderr))
//#else
#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 Please let me know if this might be a valid fix but I'd rather understand why fwrite() to stdout stopped working. Any ideas? |
Well The above code is a fix but is it ok to change this thirdparty file? |
It seems to be ok to make changes there, there have been other changes and it's not submoduled code. |
Is there an existing issue for this problem?
What part of EdgeTX is the focus of this bug?
Companion
Current Behavior
with the current main it is no longer possible to print debug messages in the simulator's debug window from LUA Widgets or Scripts
Expected Behavior
print ("test") should print "test" in simulator debug window from LUA scripts or LUA widgets
Steps To Reproduce
Version
Nightly (Please give date/commit below)
Transmitter
Other (Please specify below)
Operating System (OS)
Windows
OS Version
windows 11 pro 22H2
Anything else?
current main
The text was updated successfully, but these errors were encountered: