diff --git a/seatalk/seatalk.py b/seatalk/seatalk.py index f24145e..70b9e2f 100644 --- a/seatalk/seatalk.py +++ b/seatalk/seatalk.py @@ -6,8 +6,8 @@ from device import TaskDevice from nmea import nmea_datagram import seatalk -import seatalk.datagrams.seatalk_datagram # TODO remove when #1 is finished from seatalk.datagrams.seatalk_datagram import SeatalkDatagram +from seatalk import * from seatalk.seatalk_exceptions import SeatalkException, NoCorrespondingNMEASentence, DataNotRecognizedException @@ -30,11 +30,6 @@ def write_raw_seatalk(self, rec, attribute, data, ingoing): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) if len(self.__class__._seatalk_datagram_map) == 0: - for name, obj in inspect.getmembers(seatalk.datagrams.seatalk_datagram): # TODO remove when #1 is finished - # Abstract, non-private SeatalkDatagrams - if inspect.isclass(obj) and issubclass(obj, SeatalkDatagram) and not inspect.isabstract(obj) and obj.__name__[0] != '_': - self.__class__._seatalk_datagram_map[obj.seatalk_id] = obj - for name, obj in inspect.getmembers(seatalk): # Abstract, non-private SeatalkDatagrams if inspect.isclass(obj) and issubclass(obj, SeatalkDatagram) and not inspect.isabstract(obj) and obj.__name__[0] != '_':