|
|
|
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
|
|
|
|
#!/usr/bin/env python |
|
|
|
|
#!/usr/bin/env python3 |
|
|
|
|
|
|
|
|
|
""" |
|
|
|
|
Open a shell over MAVLink. |
|
|
|
@ -11,16 +11,27 @@ from __future__ import print_function
@@ -11,16 +11,27 @@ from __future__ import print_function
|
|
|
|
|
import sys, select |
|
|
|
|
import termios |
|
|
|
|
from timeit import default_timer as timer |
|
|
|
|
from argparse import ArgumentParser |
|
|
|
|
|
|
|
|
|
try: |
|
|
|
|
from pymavlink import mavutil |
|
|
|
|
except ImportError as e: |
|
|
|
|
print("Failed to import pymavlink: " + e) |
|
|
|
|
print("") |
|
|
|
|
print("You may need to install it with:") |
|
|
|
|
print(" pip3 install --user pymavlink") |
|
|
|
|
print("") |
|
|
|
|
sys.exit(1) |
|
|
|
|
|
|
|
|
|
try: |
|
|
|
|
import serial |
|
|
|
|
except: |
|
|
|
|
print("Failed to import pymavlink.") |
|
|
|
|
print("You may need to install it with 'pip install pymavlink pyserial'") |
|
|
|
|
except ImportError as e: |
|
|
|
|
print("Failed to import pyserial: " + e) |
|
|
|
|
print("") |
|
|
|
|
raise |
|
|
|
|
from argparse import ArgumentParser |
|
|
|
|
print("You may need to install it with:") |
|
|
|
|
print(" pip3 install --user pyserial") |
|
|
|
|
print("") |
|
|
|
|
sys.exit(1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MavlinkSerialPort(): |
|
|
|
|