pyfastnet 2.0.6__tar.gz → 2.0.7__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.6/pyfastnet.egg-info → pyfastnet-2.0.7}/PKG-INFO +2 -3
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/fastnet_decoder/decode_fastnet.py +10 -6
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/fastnet_decoder/mappings.py +16 -10
- {pyfastnet-2.0.6 → pyfastnet-2.0.7/pyfastnet.egg-info}/PKG-INFO +2 -3
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/setup.py +1 -1
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/tests/test_channels.py +2 -3
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/LICENSE +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/MANIFEST.in +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/README.md +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/fastnet_decoder/__init__.py +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/fastnet_decoder/frame_buffer.py +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/fastnet_decoder/logger.py +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/fastnet_decoder/utils.py +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/pyfastnet.egg-info/SOURCES.txt +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/pyfastnet.egg-info/dependency_links.txt +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/pyfastnet.egg-info/top_level.txt +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/setup.cfg +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/tests/test_apparent_frame.py +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/tests/test_autopilot_frame.py +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/tests/test_depth_frame.py +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/tests/test_format07_msb_regression.py +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/tests/test_format08_layout.py +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/tests/test_heel_frame.py +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/tests/test_rudder_frame.py +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/tests/test_tide_frame.py +0 -0
- {pyfastnet-2.0.6 → pyfastnet-2.0.7}/tests/test_true_frame.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: pyfastnet
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.7
|
|
4
4
|
Summary: A Python library for decoding FastNet protocol data streams.
|
|
5
5
|
Home-page: https://github.com/ghotihook/pyfastnet
|
|
6
6
|
Author: Alex Salmon
|
|
@@ -17,7 +17,6 @@ Dynamic: classifier
|
|
|
17
17
|
Dynamic: description
|
|
18
18
|
Dynamic: description-content-type
|
|
19
19
|
Dynamic: home-page
|
|
20
|
-
Dynamic: license-file
|
|
21
20
|
Dynamic: requires-python
|
|
22
21
|
Dynamic: summary
|
|
23
22
|
|
|
@@ -16,15 +16,19 @@ _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]") else 1
|
|
19
|
+
return -1 if layout in ("-[data]", "=[data]", "°[data]") else 1
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
def _display_from_layout(layout: str, formatted: str) -> str:
|
|
23
|
-
if layout == "°M":
|
|
24
|
-
if layout == "H[data]":
|
|
25
|
-
if layout == "[data]H":
|
|
26
|
-
if layout == "[data]=":
|
|
27
|
-
if layout == "[data]-":
|
|
23
|
+
if layout == "°M": return f"{formatted}°M"
|
|
24
|
+
if layout == "H[data]": return f"H{formatted}"
|
|
25
|
+
if layout == "[data]H": return f"{formatted}H"
|
|
26
|
+
if layout == "[data]=": return f"{formatted}="
|
|
27
|
+
if layout == "[data]-": return f"{formatted}-"
|
|
28
|
+
if layout == "[data]°C": return f"{formatted}°C"
|
|
29
|
+
if layout == "[data]°F": return f"{formatted}°F"
|
|
30
|
+
if layout == "[data]°": return f"{formatted}°"
|
|
31
|
+
if layout == "°[data]": return f"°{formatted}"
|
|
28
32
|
return formatted
|
|
29
33
|
|
|
30
34
|
|
|
@@ -283,16 +283,22 @@ SEGMENT_A = {
|
|
|
283
283
|
0xf3: "H[data]", 0x73: "[data]H",
|
|
284
284
|
0x00: " ",
|
|
285
285
|
|
|
286
|
-
# Plain-positive
|
|
287
|
-
0x80: " ", # depth channels
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
286
|
+
# Plain-positive codes — no suffix, confirmed from 7-segment bit decoding
|
|
287
|
+
0x80: " ", # blank (no segments lit) — depth channels
|
|
288
|
+
0x01: " ", # decimal-point only — linear sensor null/zero state
|
|
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
|
|
293
|
+
|
|
294
|
+
# Degree / temperature suffix codes (symbol appears AFTER value)
|
|
295
|
+
0x5c: "[data]°C", # a,c,d,e,f (C-shape) — sea temperature °C
|
|
296
|
+
0x74: "[data]°F", # a,b,d,e,f (F-shape) — sea temperature °F
|
|
297
|
+
0x58: "[data]°", # a,d,g (three bars, ≡) — bearing / compass target, positive
|
|
298
|
+
0x54: "[data]°", # a,d,e (partial) — true wind angle, starboard/positive
|
|
299
|
+
|
|
300
|
+
# Negative counterpart: same three-bar symbol (a,d,g) BEFORE value
|
|
301
|
+
0xd8: "°[data]", # pair of 0x58 — leeway port (negative)
|
|
296
302
|
}
|
|
297
303
|
|
|
298
304
|
SEGMENT_B = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: pyfastnet
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.7
|
|
4
4
|
Summary: A Python library for decoding FastNet protocol data streams.
|
|
5
5
|
Home-page: https://github.com/ghotihook/pyfastnet
|
|
6
6
|
Author: Alex Salmon
|
|
@@ -17,7 +17,6 @@ Dynamic: classifier
|
|
|
17
17
|
Dynamic: description
|
|
18
18
|
Dynamic: description-content-type
|
|
19
19
|
Dynamic: home-page
|
|
20
|
-
Dynamic: license-file
|
|
21
20
|
Dynamic: requires-python
|
|
22
21
|
Dynamic: summary
|
|
23
22
|
|
|
@@ -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.7", # 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.",
|
|
@@ -249,7 +249,6 @@ class TestHeelAndTrim(unittest.TestCase):
|
|
|
249
249
|
class TestSeaTemperature(unittest.TestCase):
|
|
250
250
|
"""
|
|
251
251
|
Stored-log frame also carries sea temperature in Celsius and Fahrenheit.
|
|
252
|
-
Format 0x07 with a segment byte not present in SEGMENT_A → layout '?'.
|
|
253
252
|
Cross-check: 23 °C ≈ 73 °F within 1 degree rounding.
|
|
254
253
|
"""
|
|
255
254
|
FRAME = "ff011801e7cd840000acc7cf84ff0000001f17005c00171e17007400494f"
|
|
@@ -259,11 +258,11 @@ class TestSeaTemperature(unittest.TestCase):
|
|
|
259
258
|
|
|
260
259
|
def test_sea_temp_celsius(self):
|
|
261
260
|
self.assertEqual(self.v["Sea Temperature (°C)"]["value"], 23.0)
|
|
262
|
-
self.assertEqual(self.v["Sea Temperature (°C)"]["display_text"], "23")
|
|
261
|
+
self.assertEqual(self.v["Sea Temperature (°C)"]["display_text"], "23°C")
|
|
263
262
|
|
|
264
263
|
def test_sea_temp_fahrenheit(self):
|
|
265
264
|
self.assertEqual(self.v["Sea Temperature (°F)"]["value"], 73.0)
|
|
266
|
-
self.assertEqual(self.v["Sea Temperature (°F)"]["display_text"], "73")
|
|
265
|
+
self.assertEqual(self.v["Sea Temperature (°F)"]["display_text"], "73°F")
|
|
267
266
|
|
|
268
267
|
def test_cross_unit_consistency(self):
|
|
269
268
|
c = self.v["Sea Temperature (°C)"]["value"]
|
|
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
|