I am very new to SITL and just got the simulator working on a Linux virtual machine. I have made some custom functionality for my UAV where it will perform actions before it reaches a waypoint. I was wondering if there is a way to print to the SITL console for debugging, just to see if my functions are being called properly. If not, what is the best practice for this?
I have tried using SITL_debug("FLAG"); in my function but nothing is printed.
Thanks for the help.
EDIT: As stated by OlivierB, the command hal.console->printf("What you want to print \n"); successfully prints to the SITL console.
@anthonyb Did you figure it out ? I am in the situation than you and I don’t get how to debug properly when working with SITL to analyse new code I did.
@anthonyb Did you figure it out ? I am in the situation than you and I don’t
get how to debug properly when working with SITL to analyse new code I did.
Which instructions are you following on how to use SITL?
Yes, thank you! I just read about this on the website with hal reference. I defintely need to try few examples from the “Codebase” description before to start anything.
@peterbarker
I’m working on Windows 10. I followed the instructions from here.
I am trying to use hal.console->printf("some text\n") to print some debug messages. But when I run SITL I dont see anything getting printed on the mavproxy console. I am working on linux (Ubuntu 18.04) and I am on Copter 4.1.5.