pyfastnet 2.0.7__tar.gz → 2.0.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyfastnet-2.0.7/pyfastnet.egg-info → pyfastnet-2.0.8}/PKG-INFO +1 -1
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/fastnet_decoder/decode_fastnet.py +15 -10
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/fastnet_decoder/mappings.py +19 -15
- {pyfastnet-2.0.7 → pyfastnet-2.0.8/pyfastnet.egg-info}/PKG-INFO +1 -1
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/setup.py +1 -1
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/LICENSE +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/MANIFEST.in +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/README.md +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/fastnet_decoder/__init__.py +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/fastnet_decoder/frame_buffer.py +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/fastnet_decoder/logger.py +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/fastnet_decoder/utils.py +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/pyfastnet.egg-info/SOURCES.txt +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/pyfastnet.egg-info/dependency_links.txt +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/pyfastnet.egg-info/top_level.txt +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/setup.cfg +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/tests/test_apparent_frame.py +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/tests/test_autopilot_frame.py +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/tests/test_channels.py +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/tests/test_depth_frame.py +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/tests/test_format07_msb_regression.py +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/tests/test_format08_layout.py +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/tests/test_heel_frame.py +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/tests/test_rudder_frame.py +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/tests/test_tide_frame.py +0 -0
- {pyfastnet-2.0.7 → pyfastnet-2.0.8}/tests/test_true_frame.py +0 -0
|
@@ -16,19 +16,24 @@ _DECIMAL_PLACES_MAP = {1: 0, 10: 1, 100: 2, 1000: 3}
|
|
|
16
16
|
# "°M" → magnetic bearing, suffix added after value
|
|
17
17
|
|
|
18
18
|
def _sign_from_layout(layout: str) -> int:
|
|
19
|
-
return -1 if layout in ("-[data]", "=[data]", "
|
|
19
|
+
return -1 if layout in ("-[data]", "=[data]", "L[data]") else 1
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
def _display_from_layout(layout: str, formatted: str) -> str:
|
|
23
|
-
if layout
|
|
24
|
-
if layout == "
|
|
25
|
-
if layout == "[data]
|
|
26
|
-
if layout == "[data]
|
|
27
|
-
if layout == "[data]
|
|
28
|
-
if layout == "[data]
|
|
29
|
-
if layout == "[data]°
|
|
30
|
-
if layout == "[data]°": return f"{formatted}°"
|
|
31
|
-
if layout == "
|
|
23
|
+
if layout is None: return formatted
|
|
24
|
+
if layout == "°M": return f"{formatted}°M"
|
|
25
|
+
if layout == "H[data]": return f"H{formatted}"
|
|
26
|
+
if layout == "[data]H": return f"{formatted}H"
|
|
27
|
+
if layout == "[data]=": return f"{formatted}="
|
|
28
|
+
if layout == "[data]-": return f"{formatted}-"
|
|
29
|
+
if layout == "[data]°C": return f"{formatted}°C"
|
|
30
|
+
if layout == "[data]°F": return f"{formatted}°F"
|
|
31
|
+
if layout == "[data]L": return f"{formatted}L"
|
|
32
|
+
if layout == "L[data]": return f"L{formatted}"
|
|
33
|
+
if layout == "[data]z": return f"{formatted}z"
|
|
34
|
+
if layout == "z[data]": return f"z{formatted}"
|
|
35
|
+
if layout == "u[data]": return f"u{formatted}"
|
|
36
|
+
if layout == "d[data]": return f"d{formatted}"
|
|
32
37
|
return formatted
|
|
33
38
|
|
|
34
39
|
|
|
@@ -281,24 +281,28 @@ SEGMENT_A = {
|
|
|
281
281
|
0x20: "[data]-", 0xa0: "-[data]",
|
|
282
282
|
0x8c: "=[data]", 0x0c: "[data]=",
|
|
283
283
|
0xf3: "H[data]", 0x73: "[data]H",
|
|
284
|
-
0x00: " ",
|
|
285
284
|
|
|
286
|
-
#
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
0x99: " ", # top+bottom bars + dp — VMG positive direction indicator
|
|
290
|
-
0xbb: " ", # f,d,b,c + dp — VMG / tidal drift positive indicator
|
|
291
|
-
0x32: " ", # f,d,c — AP Off Course low indicator
|
|
292
|
-
0x61: " ", # g,f + dp — AP Off Course high indicator
|
|
285
|
+
# Blank — no segments lit, no indicator symbol
|
|
286
|
+
0x00: None, # AFTER, all blank — COG, SOG
|
|
287
|
+
0x80: None, # BEFORE, all blank — Depth (m/ft/fm)
|
|
293
288
|
|
|
294
|
-
#
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
0x58: "[data]
|
|
298
|
-
|
|
289
|
+
# Confirmed symbols
|
|
290
|
+
0xbb: "d[data]", # 'd' BEFORE — Tidal Drift
|
|
291
|
+
0x99: "u[data]", # 'u' BEFORE — VMG (upwind indicator)
|
|
292
|
+
0x58: "[data]L", # 'L' AFTER — AP Compass Target
|
|
293
|
+
0xd8: "L[data]", # 'L' BEFORE — Leeway port/negative
|
|
299
294
|
|
|
300
|
-
#
|
|
301
|
-
|
|
295
|
+
# AP Off Course — dog-leg symbol, direction shown by z position
|
|
296
|
+
0x32: "[data]z", # z after value — AP Off Course one direction
|
|
297
|
+
0x61: "z[data]", # z before value — AP Off Course other direction
|
|
298
|
+
|
|
299
|
+
# Temperature suffixes
|
|
300
|
+
0x5c: "[data]°C", # 'C' shape AFTER — Sea Temperature °C
|
|
301
|
+
0x74: "[data]°F", # 'F' shape AFTER — Sea Temperature °F
|
|
302
|
+
|
|
303
|
+
# TBC — symbol seen but not yet identified
|
|
304
|
+
0x01: "TBC", # lower-right segment only — Linear sensors, Node Reset
|
|
305
|
+
0x54: "TBC", # upper-left+lower-left+top — True Wind Angle starboard
|
|
302
306
|
}
|
|
303
307
|
|
|
304
308
|
SEGMENT_B = {
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="pyfastnet",
|
|
5
|
-
version="2.0.
|
|
5
|
+
version="2.0.8", # Ensure this matches your intended version
|
|
6
6
|
author="Alex Salmon",
|
|
7
7
|
author_email="alex@ivila.net",
|
|
8
8
|
description="A Python library for decoding FastNet protocol data streams.",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|