From 36707e11a93fb658ac6a7aa9e93b7e6e3a5b7e75 Mon Sep 17 00:00:00 2001 From: Mark Jessop Date: Wed, 15 Jul 2020 18:16:29 +0930 Subject: [PATCH] Add 7N1 support to horusdemodlib python library --- horusdemodlib/__init__.py | 2 +- horusdemodlib/demod.py | 5 ++++- pyproject.toml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/horusdemodlib/__init__.py b/horusdemodlib/__init__.py index fb69db9..f3b4574 100755 --- a/horusdemodlib/__init__.py +++ b/horusdemodlib/__init__.py @@ -1 +1 @@ -__version__ = "0.1.14" +__version__ = "0.1.15" diff --git a/horusdemodlib/demod.py b/horusdemodlib/demod.py index 69ed760..3a5b2cf 100644 --- a/horusdemodlib/demod.py +++ b/horusdemodlib/demod.py @@ -62,6 +62,7 @@ class Mode(Enum): """ BINARY = 0 BINARY_V1 = 0 + RTTY_7N1 = 89 RTTY_7N2 = 90 RTTY = 90 RTTY_8N2 = 91 @@ -306,7 +307,7 @@ class HorusLib(): data_out = ( b"" # check if bytes is just null and return an empty bytes instead ) - elif (self.mode != Mode.RTTY_7N2) and (self.mode != Mode.RTTY_8N2): + elif (self.mode != Mode.RTTY_7N2) and (self.mode != Mode.RTTY_8N2) and (self.mode != Mode.RTTY_7N1): try: data_out = bytes.fromhex(data_out.decode("ascii")) except ValueError: @@ -368,6 +369,8 @@ if __name__ == "__main__": if sys.argv[1] == 'rtty7n2': mode = Mode.RTTY_7N2 + elif sys.argv[1] == 'rtty7n1': + mode = Mode.RTTY_7N1 elif sys.argv[1] == 'rtty8n2': mode = Mode.RTTY_8N2 else: diff --git a/pyproject.toml b/pyproject.toml index 89d1729..14868ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "horusdemodlib" -version = "0.1.14" +version = "0.1.15" description = "Project Horus HAB Telemetry Demodulators" authors = ["Mark Jessop"] license = "LGPL-2.1-or-later"