aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-01-23 10:34:27 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-01-23 10:34:27 +0100
commit40ca2394606324c763dca61f71c0cf8224b4ddc2 (patch)
treeeb58b34cbe2034ae08970a2bed5370ee7ac2c426 /python
parent0da6202199ceb03d6d83042695c53b7c8b2a7f04 (diff)
downloaddabmod-40ca2394606324c763dca61f71c0cf8224b4ddc2.tar.gz
dabmod-40ca2394606324c763dca61f71c0cf8224b4ddc2.tar.bz2
dabmod-40ca2394606324c763dca61f71c0cf8224b4ddc2.zip
DPDCE: reduce rxgain to 30 in case of calibration failure
Diffstat (limited to 'python')
-rw-r--r--python/dpd/RX_Agc.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/dpd/RX_Agc.py b/python/dpd/RX_Agc.py
index 911f3c9..bb940be 100644
--- a/python/dpd/RX_Agc.py
+++ b/python/dpd/RX_Agc.py
@@ -73,6 +73,11 @@ class Agc:
w = "Warning: calculated RX Gain={} is higher than maximum={}. RX feedback power should be increased.".format(
self.rxgain, self.max_rxgain)
logging.warning(w)
+ try:
+ # Reset to a low value, as we expect the user to reduce external attenuation
+ self.adapt.set_rxgain(30)
+ except ValueError as e:
+ return (False, "\n".join([measurements, w, "Setting RX gain to {} failed: {}".format(self.rxgain, e)]))
return (False, "\n".join([measurements, w]))
else:
try: