diff options
author | Matthias P. Braendli (think) <matthias@mpb.li> | 2012-08-16 18:28:13 +0200 |
---|---|---|
committer | Matthias P. Braendli (think) <matthias@mpb.li> | 2012-08-16 18:28:13 +0200 |
commit | 06fe89bd86fc709908c5882a2c48d03fc0977a25 (patch) | |
tree | c2b39935d99e841e350af95c3d878155875f0a6a /src/DabMod.cpp | |
parent | b946ff6bceef6150f19da0a86950ed9ebbf0c2cb (diff) | |
download | dabmod-06fe89bd86fc709908c5882a2c48d03fc0977a25.tar.gz dabmod-06fe89bd86fc709908c5882a2c48d03fc0977a25.tar.bz2 dabmod-06fe89bd86fc709908c5882a2c48d03fc0977a25.zip |
crc-dabmod: added UHD tx gain remote control
Diffstat (limited to 'src/DabMod.cpp')
-rw-r--r-- | src/DabMod.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp index d3cc877..dbfc885 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -37,6 +37,7 @@ #include "PcDebug.h" #include "TimestampDecoder.h" #include "FIRFilter.h" +#include "RemoteControl.h" #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/ini_parser.hpp> @@ -150,7 +151,7 @@ int main(int argc, char* argv[]) { int ret = 0; bool loop = false; - char* inputName = NULL; + const char* inputName = NULL; const char* outputName; const char* outputDevice; @@ -191,6 +192,9 @@ int main(int argc, char* argv[]) InputMemory* input = NULL; ModOutput* output = NULL; + RemoteControllerTelnet rc (2121); + rc.start(); + Logger logger; signal(SIGINT, signalHandler); @@ -306,6 +310,14 @@ int main(int argc, char* argv[]) read_ini(configuration_file, pt); + // input params: + if (pt.get("input.loop", 0) == 1) { + loop = true; + } + + string input_filename = pt.get("input.filename", "/dev/stdin"); + inputName = input_filename.c_str(); + // log parameters: if (pt.get("log.syslog", 0) == 1) { LogToSyslog* log_syslog = new LogToSyslog(); @@ -501,6 +513,7 @@ int main(int argc, char* argv[]) uhdFrequency, uhdTxGain, uhd_enable_sync, uhd_mute_no_timestamps, logger); + ((OutputUHD*)output)->enrol_at(rc); } catch (std::exception& e) { logger(error, "UHD initialisation failed"); |