MP MAVLink inspector garbage distances simulating lidar

Here it is.

For your Arduino, adapt serials, pins,… → carry to MP.

Note:

  • Comments for having nice numbers.
  • Pins to synchronize an oscilloscope.
  • Simulates two aligned lidars rotating at the same pace at a vehicle rotating (bigger N_FLOAT/N_INTEGER slower vehicle rotation), but only one on the drop down.
  • No heartbeat for component_id MAV_COMP_ID_OBSTACLE_AVOIDANCE+1. Needed? (Easy to add).
  • 30 distances commented. 72 distances not appearing all on MAVLink inspector.
  • Not possible to display the second distances radar window (no drop down, and which component_id to use?).
  • Many yellow arcs missing (very few appear on the core i5).

I have seen a crash on the core i5, but seems to last long on the core i7.

Possibly, you should start commenting the code for the second serial (second packet MAV_COMP_ID_OBSTACLE_AVOIDANCE+1).

Note that if two radar windows were possible, it would be needed to identify which is which. I asked in the past some id on the caption bar for a similar situation, but didn’t get any answer.

I also have had always to stop Arduino activity (with reset or however) while MP connects; if not, it keeps reading parameters forever.

Capture on the core i7: