From d83c934b95c37ec606bab5087bb7484b752a8af7 Mon Sep 17 00:00:00 2001 From: "Mark J. Fine" Date: Sun, 18 Dec 2022 13:50:20 -0500 Subject: [PATCH] Corrected the way gain was being set for SDRPlay. --- nrsc5-dui.py | 4 ++-- res/mainForm.glade | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/nrsc5-dui.py b/nrsc5-dui.py index c8c4c05..f9da4ef 100644 --- a/nrsc5-dui.py +++ b/nrsc5-dui.py @@ -610,7 +610,7 @@ class NRSC5_DUI(object): # set gain if auto gain is not selected if (not self.cbAutoGain.get_active()): - self.streamInfo["Gain"] = self.spinGain.get_value() + self.streamInfo["Gain"] = round(self.spinGain.get_value(),2) self.nrsc5Args.append("-g") self.nrsc5Args.append(str(self.streamInfo["Gain"])) @@ -1119,7 +1119,7 @@ class NRSC5_DUI(object): if (self.cbAutoGain.get_active()): self.spinGain.set_value(self.streamInfo["Gain"]) - self.lblGain.set_label("{:2.1f}dB".format(self.streamInfo["Gain"])) + self.lblGain.set_label("{:2.2f}dB".format(self.streamInfo["Gain"])) # second param is lot id, if -1, show cover, otherwise show cover # technically we should show the file with the matching lot id diff --git a/res/mainForm.glade b/res/mainForm.glade index 1d0aeeb..3c12dde 100644 --- a/res/mainForm.glade +++ b/res/mainForm.glade @@ -10,8 +10,9 @@ 1 + 0.00 49.60 - 0.10 + 0.01 1 @@ -1430,7 +1431,7 @@ False False adjGain - 1 + 2 True True