added deprecation waring
This commit is contained in:
parent
12506e7c7f
commit
773efff9bc
@ -1 +1,3 @@
|
||||
from __future__ import absolute_import, print_function, division
|
||||
|
||||
from pyModeS.decoder import *
|
||||
|
@ -5,3 +5,17 @@ from pyModeS.decoder.bds.bds44 import *
|
||||
from pyModeS.decoder.bds.bds50 import *
|
||||
from pyModeS.decoder.bds.bds53 import *
|
||||
from pyModeS.decoder.bds.bds60 import *
|
||||
|
||||
def BDS(msg):
|
||||
import warnings
|
||||
from pyModeS.decoder.bds import infer
|
||||
warnings.simplefilter('always', DeprecationWarning)
|
||||
warnings.warn("pms.ehs.BDS() is deprecated, use pms.bds.infer() instead", DeprecationWarning)
|
||||
return infer(msg)
|
||||
|
||||
def icao(msg):
|
||||
import warnings
|
||||
from pyModeS.decoder.modes import icao
|
||||
warnings.simplefilter('always', DeprecationWarning)
|
||||
warnings.warn("pms.ehs.icao() deprecated, please use pms.modes.icao() instead", DeprecationWarning)
|
||||
return icao(msg)
|
||||
|
@ -41,7 +41,7 @@ def hex2int(hexstr):
|
||||
|
||||
def bin2np(binstr):
|
||||
"""Convert a binary string to numpy array. """
|
||||
return np.fromstring(binstr, 'u1') - ord('0')
|
||||
return np.array([int(i) for i in binstr])
|
||||
|
||||
|
||||
def np2bin(npbin):
|
||||
|
Loading…
Reference in New Issue
Block a user