Skip to content

Commit

Permalink
Changing the SDR gain range according to the choosen SDR device #110
Browse files Browse the repository at this point in the history
  • Loading branch information
mgm8 committed Aug 23, 2024
1 parent cdf3d5c commit f3b7e0d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions spacelab_transmitter/spacelabtransmitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def _build_widgets(self):
cell = Gtk.CellRendererText()
self.combobox_sdr.pack_start(cell, True)
self.combobox_sdr.add_attribute(cell, "text", 0)
self.combobox_sdr.connect("changed", self.on_combobox_sdr_changed)
self.entry_carrier_frequency = self.builder.get_object("entry_carrier_frequency")
self.entry_sample_rate = self.builder.get_object("entry_sample_rate")
self.spinbutton_tx_gain = self.builder.get_object("spinbutton_tx_gain")
Expand Down Expand Up @@ -766,6 +767,12 @@ def on_switch_button_clicked(self, false, button):
self.button_deactivate_payload.set_sensitive(True)
self.button_get_payload_data.set_sensitive(True)

def on_combobox_sdr_changed(self, combobox):
if self.combobox_sdr.get_active() == 0: # USRP
self.spinbutton_tx_gain.set_range(0, 90)
elif self.combobox_sdr.get_active() == 1: # Pluto SDR
self.spinbutton_tx_gain.set_range(-90, 0)

def _get_link_info(self):
sat_config_file = str()

Expand Down
2 changes: 1 addition & 1 deletion spacelab_transmitter/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
__copyright__ = "Copyright The SpaceLab-Transmitter Contributors"
__credits__ = ["Gabriel Mariano Marcelino, Vitória Beatriz Bianchin"]
__license__ = "GPLv3"
__version__ = "0.4.8"
__version__ = "0.4.9"
__maintainer__ = "Gabriel Mariano Marcelino - PU5GMA"
__email__ = "gabriel.mm8@gmail.com"
__status__ = "Development"

0 comments on commit f3b7e0d

Please sign in to comment.