Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3.  
  4. from pymavlink import mavutil
  5. import time
  6.  
  7. #interface = mavutil.mavlink_connection("/dev/ttyACM0", autoreconnect=True)
  8. interface = mavutil.mavlink_connection("udp:127.0.0.1:14550", autoreconnect=True)
  9.  
  10. while True:
  11.     m = interface.recv_msg()
  12.     if m:
  13.         if (m.get_type() == 'HEARTBEAT'):
  14.             print m
  15.             #interface.set_mode_px4("ALTCTL",0,0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement