summaryrefslogtreecommitdiffstats
path: root/dpd
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-02-21 11:33:33 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-02-21 11:33:33 +0100
commitfcd2de2abf3fab7573f8e430ebf90822c6eb4bb9 (patch)
tree0385345fbda5f72824509933f71160f5a7173d09 /dpd
parentf9db3bdead5e96fdfc948efa9f3b03482018f923 (diff)
downloaddabmod-fcd2de2abf3fab7573f8e430ebf90822c6eb4bb9.tar.gz
dabmod-fcd2de2abf3fab7573f8e430ebf90822c6eb4bb9.tar.bz2
dabmod-fcd2de2abf3fab7573f8e430ebf90822c6eb4bb9.zip
adapt DPDCE to refactored SDR output RC
Diffstat (limited to 'dpd')
-rwxr-xr-xdpd/main.py4
-rw-r--r--dpd/src/Adapt.py10
2 files changed, 8 insertions, 6 deletions
diff --git a/dpd/main.py b/dpd/main.py
index 093f227..927834a 100755
--- a/dpd/main.py
+++ b/dpd/main.py
@@ -146,7 +146,7 @@ if cli_args.status:
dpddata = dpddata_to_str(adapt.get_predistorter())
logging.info("ODR-DabMod currently running with TXGain {}, RXGain {}, digital gain {} and {}".format(
- rxgain, rxgain, digital_gain, dpddata))
+ txgain, rxgain, digital_gain, dpddata))
sys.exit(0)
if cli_args.lut:
@@ -279,6 +279,8 @@ while i < num_iter:
except:
logging.error('Iteration {} failed.'.format(i))
logging.error(traceback.format_exc())
+ i += 1
+ state = 'measure'
# The MIT License (MIT)
#
diff --git a/dpd/src/Adapt.py b/dpd/src/Adapt.py
index 329ee20..a57602f 100644
--- a/dpd/src/Adapt.py
+++ b/dpd/src/Adapt.py
@@ -108,7 +108,7 @@ class Adapt:
returns the answer ODR-DabMod sends back.
An example message could be
- "get uhd txgain" or "set uhd txgain 50"
+ "get sdr txgain" or "set sdr txgain 50"
Parameter
---------
@@ -141,12 +141,12 @@ class Adapt:
# TODO this is specific to the B200
if gain < 0 or gain > 89:
raise ValueError("Gain has to be in [0,89]")
- return self.send_receive("set uhd txgain %.4f" % float(gain))
+ return self.send_receive("set sdr txgain %.4f" % float(gain))
def get_txgain(self):
"""Get the txgain value in dB for the ODR-DabMod."""
# TODO handle failure
- return float(self.send_receive("get uhd txgain")[0])
+ return float(self.send_receive("get sdr txgain")[0])
def set_rxgain(self, gain):
"""Set a new rxgain for the ODR-DabMod.
@@ -159,12 +159,12 @@ class Adapt:
# TODO this is specific to the B200
if gain < 0 or gain > 89:
raise ValueError("Gain has to be in [0,89]")
- return self.send_receive("set uhd rxgain %.4f" % float(gain))
+ return self.send_receive("set sdr rxgain %.4f" % float(gain))
def get_rxgain(self):
"""Get the rxgain value in dB for the ODR-DabMod."""
# TODO handle failure
- return float(self.send_receive("get uhd rxgain")[0])
+ return float(self.send_receive("get sdr rxgain")[0])
def set_digital_gain(self, gain):
"""Set a new rxgain for the ODR-DabMod.