unable to print any variable to VScode\interactive console, text is fine
exact code works fine in VEXcode\console.
float support in printf is disabled by default for IQ2 (because it makes the executable larger and there’s limited memory), edit the mkenv.mk file to enable it. (ie.comment out the command line check)
# printf_float flag name passed from app
#ifeq ("$(origin PRINTF_FLOAT)", "command line")
PRINTF_FLAG = -u_printf_float
#endif
I think this is in the backlog to have an extension setting to pass the necessary command line argument to make.
Thank you very much, it works now
Yeah adding an enable flag for float support is on the backlog. We have not decided on how to expose this setting in the extension yet.
Sorry to revive this topic, I’ve tried this fix and it hasn’t worked. I’ve even forced the project to rebuild. Any suggestions?
printf("%3.2\n", L_velocity);
You need to fix the format string, perhaps try “%5.2f\n”
Sorry, that was a typo as I typed it in…
Found the solution, in vex project settings within the .vscode folder, there is a place to enable floats, and that was overriding the previous fix. Guess this is new?