From 2721f5f233bfc1eff490a377ab2b2582b263d0d9 Mon Sep 17 00:00:00 2001
From: kamiccolo <kamicc@gmail.com>
Date: Fri, 26 Jan 2024 17:50:40 +0200
Subject: [PATCH] Clean up the mess with TNLDG

---
 pynmea2/types/proprietary/tnl.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/pynmea2/types/proprietary/tnl.py b/pynmea2/types/proprietary/tnl.py
index b40cee8..19d7203 100644
--- a/pynmea2/types/proprietary/tnl.py
+++ b/pynmea2/types/proprietary/tnl.py
@@ -17,13 +17,13 @@ def __new__(_cls, manufacturer, data):
         '''
             Return the correct sentence type based on the first field
         '''
-        sentence_type = data[0] or data[1]
-        name = manufacturer + sentence_type
-        if name not in _cls.sentence_types:
-            # TNLDG does not have a sentence type
+
+        name_check = manufacturer + data[1]
+        if name_check not in _cls.sentence_types:
             if TNLDG.match(data):
                 return super(TNL, TNLDG).__new__(TNLDG)
-        cls = _cls.sentence_types.get(name, _cls)
+
+        cls = _cls.sentence_types.get(name_check, _cls)
         return super(TNL, cls).__new__(cls)
 
     def __init__(self, manufacturer, data):
@@ -81,7 +81,7 @@ def match(data):
 
     def __init__(self, *args, **kwargs):
         self.subtype = 'TNL'
-        super(TNLDG, self).__init(*args, **kwargs)
+        super(TNLDG, self).__init__(*args, **kwargs)
 
     fields = (
         ('Empty', '_'),