aboutsummaryrefslogtreecommitdiffstats
path: root/src/ConfigParser.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2022-07-27 12:05:05 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2022-07-27 12:05:05 +0200
commit6087160593e74aff9147153c69ea23849fc8b921 (patch)
treef305db8542f0a073a96bc6c66958a007192cf31d /src/ConfigParser.cpp
parent0f86d6939f022d6fc101fd08f17856d2d7c446cf (diff)
downloaddabmod-6087160593e74aff9147153c69ea23849fc8b921.tar.gz
dabmod-6087160593e74aff9147153c69ea23849fc8b921.tar.bz2
dabmod-6087160593e74aff9147153c69ea23849fc8b921.zip
Add PrecisionWave DEXTER support
Diffstat (limited to 'src/ConfigParser.cpp')
-rw-r--r--src/ConfigParser.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp
index ee7acc3..44d52e6 100644
--- a/src/ConfigParser.cpp
+++ b/src/ConfigParser.cpp
@@ -312,6 +312,30 @@ static void parse_configfile(
mod_settings.useSoapyOutput = true;
}
#endif
+#if defined(HAVE_DEXTER)
+ else if (output_selected == "dexter") {
+ auto& outputdexter_conf = mod_settings.sdr_device_config;
+ outputdexter_conf.txgain = pt.GetReal("dexteroutput.txgain", 0.0);
+ outputdexter_conf.lo_offset = pt.GetReal("dexteroutput.lo_offset", 0.0);
+ outputdexter_conf.frequency = pt.GetReal("dexteroutput.frequency", 0);
+ std::string chan = pt.Get("dexteroutput.channel", "");
+ outputdexter_conf.dabMode = mod_settings.dabMode;
+
+ if (outputdexter_conf.frequency == 0 && chan == "") {
+ std::cerr << " dexter output enabled, but neither frequency nor channel defined.\n";
+ throw std::runtime_error("Configuration error");
+ }
+ else if (outputdexter_conf.frequency == 0) {
+ outputdexter_conf.frequency = parseChannel(chan);
+ }
+ else if (outputdexter_conf.frequency != 0 && chan != "") {
+ std::cerr << " dexter output: cannot define both frequency and channel.\n";
+ throw std::runtime_error("Configuration error");
+ }
+
+ mod_settings.useDexterOutput = true;
+ }
+#endif
#if defined(HAVE_LIMESDR)
else if (output_selected == "limesdr") {
auto& outputlime_conf = mod_settings.sdr_device_config;