I am sending heartbeat messages from a companion computer (an Arduino board relaying Mavlink messages through the FC’s TELEM2 port). I can see these from the MAV Inspector in Mission Planner under compid=195. However I can’t see them from a Python script running in MP. The script only detects the HEARTBEAT messages from the primary component (compid=1).
I am missing something… what is it?
Here’s what I am doing in Python:
# Subscribe to HEARTBEAT messages
MAV.OnPacketReceived += PacketHandler
def PacketHandler(o, message):
try:
if message.msgid == MAVLink.MAVLINK_MSG_ID.HEARTBEAT:
print "HEARTBEAT: " + str(message.sysid) + " " + str(message.compid)
print dir(message)
except Exception as inst:
print inst
Any thoughts as to what might be wrong above?