move common package to root level
This commit is contained in:
@@ -2,11 +2,11 @@ import os
|
||||
import warnings
|
||||
|
||||
try:
|
||||
from .decoder import c_common as common
|
||||
from .decoder.c_common import *
|
||||
from . import c_common as common
|
||||
from .c_common import *
|
||||
except:
|
||||
from .decoder import common
|
||||
from .decoder.common import *
|
||||
from . import common
|
||||
from .common import *
|
||||
|
||||
from .decoder import tell
|
||||
from .decoder import adsb
|
||||
@@ -15,6 +15,9 @@ from .decoder import bds
|
||||
from .extra import aero
|
||||
from .extra import tcpclient
|
||||
|
||||
from .encoder import encode_adsb
|
||||
|
||||
|
||||
warnings.simplefilter("once", DeprecationWarning)
|
||||
|
||||
dirpath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
@@ -41,10 +41,8 @@ def crc(msg, encode=False):
|
||||
# the CRC generator
|
||||
G = [int("11111111", 2), int("11111010", 2), int("00000100", 2), int("10000000", 2)]
|
||||
|
||||
if encode and isinstance(msg, str):
|
||||
if encode:
|
||||
msg = msg[:-6] + "000000"
|
||||
elif encode:
|
||||
msg = msg[:-6] + b"000000"
|
||||
|
||||
msgbin = hex2bin(msg)
|
||||
msgbin_split = wrap(msgbin, 8)
|
||||
@@ -21,12 +21,7 @@ Common functions for Mode-S decoding
|
||||
import numpy as np
|
||||
|
||||
from pyModeS.extra import aero
|
||||
|
||||
try:
|
||||
from pyModeS.decoder import c_common as common
|
||||
except:
|
||||
from pyModeS.decoder import common
|
||||
|
||||
from pyModeS import common
|
||||
|
||||
from pyModeS.decoder.bds import (
|
||||
bds05,
|
||||
|
||||
Reference in New Issue
Block a user