diff options
author | andreas128 <Andreas> | 2017-09-01 16:39:27 +0200 |
---|---|---|
committer | andreas128 <Andreas> | 2017-09-01 17:05:08 +0200 |
commit | d18dcae4e327ffa4c161d45ae50e08cc76789eab (patch) | |
tree | 111130c0fa2b3dca69cd8ddc1fb25fbb33115009 /dpd/src | |
parent | c5e3714764205f073624d4d44b8bb9dada3f74cb (diff) | |
download | dabmod-d18dcae4e327ffa4c161d45ae50e08cc76789eab.tar.gz dabmod-d18dcae4e327ffa4c161d45ae50e08cc76789eab.tar.bz2 dabmod-d18dcae4e327ffa4c161d45ae50e08cc76789eab.zip |
Add store tx received for debug logging level
Diffstat (limited to 'dpd/src')
-rw-r--r-- | dpd/src/Measure.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/dpd/src/Measure.py b/dpd/src/Measure.py index f6644bb..2450b8a 100644 --- a/dpd/src/Measure.py +++ b/dpd/src/Measure.py @@ -12,6 +12,11 @@ import struct import numpy as np import logging import src.Dab_Util as DU +import os +import datetime + +import logging +logging_path = os.path.dirname(logging.getLoggerClass().root.handlers[0].baseFilename) class Measure: """Collect Measurement from DabMod""" @@ -98,7 +103,10 @@ class Measure: """ txframe, tx_ts, rxframe, rx_ts = self.receive_tcp() - txframe_end = txframe[-100:] + + if logging.getLogger().getEffectiveLevel() == logging.DEBUG: + dt = datetime.datetime.now().isoformat() + txframe.tofile(logging_path + "/txframe_" + dt + ".iq") # Normalize received signal with sent signal rx_median = np.median(np.abs(rxframe)) |