From a587c388091d7598a13af1b2155683fa8485a26f Mon Sep 17 00:00:00 2001 From: Gabriel Mariano Marcelino Date: Wed, 11 Jan 2023 23:35:41 -0300 Subject: [PATCH] Adding the SpaceLab-Transmitter as an "satellite" option --- .../data/satellites/spacelab-transmitter.json | 2 +- spacelab_decoder/spacelabdecoder.py | 8 ++++++++ spacelab_decoder/version.py | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/spacelab_decoder/data/satellites/spacelab-transmitter.json b/spacelab_decoder/data/satellites/spacelab-transmitter.json index 10e6105..bc385c3 100644 --- a/spacelab_decoder/data/satellites/spacelab-transmitter.json +++ b/spacelab_decoder/data/satellites/spacelab-transmitter.json @@ -1,5 +1,5 @@ { - "name": "SpaceLab Transmitter", + "name": "SpaceLab-Transmitter", "links": [ { "name": "Beacon", diff --git a/spacelab_decoder/spacelabdecoder.py b/spacelab_decoder/spacelabdecoder.py index 32d6b16..11a36be 100644 --- a/spacelab_decoder/spacelabdecoder.py +++ b/spacelab_decoder/spacelabdecoder.py @@ -70,6 +70,8 @@ _SAT_JSON_GOLDS_UFSC_SYSTEM = '/usr/share/spacelab_decoder/golds-ufsc.json' _SAT_JSON_ALDEBARAN_1_LOCAL = os.path.abspath(os.path.dirname(__file__)) + '/data/satellites/aldebaran-1.json' _SAT_JSON_ALDEBARAN_1_SYSTEM = '/usr/share/spacelab_decoder/aldebaran-1.json' +_SAT_JSON_SPACELAB_TXER_LOCAL = os.path.abspath(os.path.dirname(__file__)) + '/data/satellites/spacelab-transmitter.json' +_SAT_JSON_SPACELAB_TXER_SYSTEM = '/usr/share/spacelab_decoder/spacelab-transmitter.json' _DEFAULT_CALLSIGN = 'PP5UF' _DEFAULT_LOCATION = 'Florianópolis' @@ -181,6 +183,7 @@ def _build_widgets(self): self.liststore_satellite.append(["FloripaSat-1"]) self.liststore_satellite.append(["GOLDS-UFSC"]) self.liststore_satellite.append(["Aldebaran-1"]) + self.liststore_satellite.append(["SpaceLab-Transmitter"]) self.combobox_satellite = self.builder.get_object("combobox_satellite") cell = Gtk.CellRendererText() self.combobox_satellite.pack_start(cell, True) @@ -538,6 +541,11 @@ def _decode_packet(self, pkt): sat_json = _SAT_JSON_ALDEBARAN_1_LOCAL else: sat_json = _SAT_JSON_ALDEBARAN_1_SYSTEM + elif self.combobox_satellite.get_active() == 3: + if os.path.isfile(_SAT_JSON_SPACELAB_TXER_LOCAL): + sat_json = _SAT_JSON_SPACELAB_TXER_LOCAL + else: + sat_json = _SAT_JSON_SPACELAB_TXER_SYSTEM p = Packet(sat_json, pkt) pkt_txt = pkt_txt + str(p) pkt_txt = pkt_txt + "========================================================\n" diff --git a/spacelab_decoder/version.py b/spacelab_decoder/version.py index e300144..c911f14 100644 --- a/spacelab_decoder/version.py +++ b/spacelab_decoder/version.py @@ -24,7 +24,7 @@ __copyright__ = "Copyright The SpaceLab-Decoder Contributors" __credits__ = ["Gabriel Mariano Marcelino - PU5GMA"] __license__ = "GPLv3" -__version__ = "0.3.17" +__version__ = "0.3.18" __maintainer__ = "Gabriel Mariano Marcelino - PU5GMA" __email__ = "gabriel.mm8@gmail.com" __status__ = "Development"