ardupilot/libraries/AP_UAVCAN/examples/UAVCAN_sniffer
Francisco Ferreira 8c382b6904
AP_UAVCAN: adapt to new CANProtocol interface
This includes creating own thread

Also adapts example
2018-08-12 13:35:03 +01:00
..
README.md AP_UAVCAN: fixed build of example on px4 2018-05-25 13:53:17 +10:00
UAVCAN_sniffer.cpp AP_UAVCAN: adapt to new CANProtocol interface 2018-08-12 13:35:03 +01:00
wscript AP_UAVCAN: a simple UAVCAN sniffer based on AP_HAL 2018-05-25 13:53:17 +10:00

README.md

This is a UAVCAN sniffer designed to run on an ArduPilot board. It can be used to watch traffic on a UAVCAN bus, showing exactly what would be received by another node.

To build and upload for a Pixhawk style board run this:

 ./waf configure --board fmuv3 
 ./waf --target examples/UAVCAN_sniffer --upload

then connect on the USB console. You will see 1Hz packet stats like this:

uavcan.equipment.air_data.StaticPressure: 29
uavcan.equipment.air_data.StaticTemperature: 29
uavcan.equipment.ahrs.MagneticFieldStrength: 20
uavcan.protocol.NodeStatus: 6
uavcan.equipment.gnss.Fix: 10
uavcan.equipment.gnss.Auxiliary: 1
uavcan.equipment.actuator.ArrayCommand: 45
uavcan.equipment.esc.RawCommand: 368

note that the code requires you to add new msg types you want to see. Look for the MSG_CB() and START_CB() macros in the code