Skip to content

Commit

Permalink
Make Numpy support optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
mairsbw authored and LorenzMeier committed Dec 11, 2015
1 parent c89b121 commit 2c614f1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 0 additions & 4 deletions pymavlink/mavutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
except Exception:
pass

# these imports allow for mavgraph and mavlogdump to use maths expressions more easily
from math import *
from .mavextra import *

# maximum packet length for a single receive call - use the UDP limit
UDP_MAX_PACKET_LEN = 65535

Expand Down
5 changes: 4 additions & 1 deletion pymavlink/tools/mavgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
import matplotlib
from math import *

from pymavlink.mavextra import *
try:
from pymavlink.mavextra import *
except:
print("WARNING: Numpy missing, mathematical notation will not be supported.")

# cope with rename of raw_input in python3
try:
Expand Down
5 changes: 5 additions & 0 deletions pymavlink/tools/mavlogdump.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@

import sys, time, os, struct, json

try:
from pymavlink.mavextra import *
except:
print("WARNING: Numpy missing, mathematical notation will not be supported..")

from argparse import ArgumentParser
parser = ArgumentParser(description=__doc__)

Expand Down

0 comments on commit 2c614f1

Please sign in to comment.