Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. void sendMocapPos()
  2. {
  3. msg_att_pos_mocap mapm= new msg_att_pos_mocap();
  4. byte[] buffer;
  5. int counter =0;
  6. mapm.time_usec=234324;
  7. mapm.q[0] = 1;
  8. mapm.q[1] =0;
  9. mapm.q[2] =0;
  10. mapm.q[3] =0;
  11. mapm.x =32;
  12. mapm.y=312;
  13. mapm.z=65;
  14. MAVLinkPacket pck = mapm.pack();
  15. buffer = pck.encodePacket();
  16. int len = buffer.length;
  17. while(counter<len)
  18. {
  19. portSerial8.write(buffer[counter]);
  20. counter++;
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement