RomanLut / INAV-X-Plane-HITL

Hardware-in-the-loop plugin for X-Plane for INAV flight controller firmware
MIT License
44 stars 6 forks source link

Any way to get debug data? #26

Closed Yury-MonZon closed 2 months ago

Yury-MonZon commented 2 months ago

Is there any way that I can get debug data(log, printf or any other way) out of HITL so I can graph it in real time? Thanks!

RomanLut commented 2 months ago

No such functionality is available, you have to implement it yourself.

Yury-MonZon commented 2 months ago

Sorry for bothering again.

I've noticed debug[8] in the plugin menu. Do you mind sharing more information on how this works?

Thanks again.

RomanLut commented 2 months ago

Ok, I might not understand your original question correctly and debug[8] is what you actually need.

There is an array of 8 debug variables in inav int32_t debug[8] https://github.com/iNavFlight/inav/blob/ee747d66715b4bc9702c49c8b4c4b122cca4f68d/src/main/build/debug.h#L24

They can be written to blackbox, visualized in inav configurator in Sensors tab, or drawn on graph in HITL.

They can be used to debug various systems by setting debug_modes in cli or to output debug values in custom inav build.

Just assign debug[0] in inav custom built and value will be shown in HITL https://github.com/RomanLut/INAV-X-Plane-HITL/blob/main/doc/development.md#plugin-data-ref-editor-show-datarefs

Yury-MonZon commented 2 months ago

That's exactly what I was looking for! Thank you very much.