python_array_test_send.py 851 B

12345678910111213141516171819202122
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import time
  4. from pymavlink import mavutil
  5. master = mavutil.mavlink_connection("udp::14555", input=False, dialect="array_test")
  6. while True:
  7. master.mav.system_time_send(1,2)
  8. master.mav.array_test_0_send(1, [-3, -2, -1, 0], [1,2,3,4], [5,6,7,8], [9,10,11,12])
  9. master.mav.array_test_1_send([1,2,3,4])
  10. master.mav.array_test_3_send(1, [2,3,4,5])
  11. master.mav.array_test_4_send([1,2,3,4], 5)
  12. master.mav.array_test_5_send("test1", "test2")
  13. master.mav.array_test_6_send(1,2,3, [4,5], [6,7], [8,9], [10,11], [12,13], [14,15], "long value", [1.1, 2.2], [3.3, 4.4])
  14. master.mav.array_test_7_send([1.1, 2.2], [3.3, 4.4],
  15. [4,5], [6,7], [8,9], [10,11], [12,13], [14,15], "long value")
  16. master.mav.array_test_8_send(1, [2.2, 3.3], [14,15])
  17. time.sleep(1)
  18. master.close()