From 8eb2b6842570af606c797d1bc8da55bb27487b99 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 25 Feb 2017 12:05:34 +0100 Subject: Add ability to set UHD LO offset --- src/DabMod.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/DabMod.cpp') diff --git a/src/DabMod.cpp b/src/DabMod.cpp index 37db71a..741ac73 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -503,6 +503,7 @@ int launch_modulator(int argc, char* argv[]) throw std::runtime_error("Configuration error"); } + outputuhd_conf.lo_offset = pt.get("uhdoutput.lo_offset", 0); outputuhd_conf.refclk_src = pt.get("uhdoutput.refclk_source", "internal"); outputuhd_conf.pps_src = pt.get("uhdoutput.pps_source", "none"); -- cgit v1.2.3 From 1478ff198878db23e8417aecfc936e31e3e9bec9 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 25 Feb 2017 12:13:03 +0100 Subject: Move setenv earlier the glibc manual says in chapter 25.4.1 Environment Access 'Modifications of environment variables are not allowed in multi-threaded programs.' So we do it before we become multi-threaded. --- src/DabMod.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/DabMod.cpp') diff --git a/src/DabMod.cpp b/src/DabMod.cpp index 741ac73..bc3ee30 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -209,10 +209,6 @@ int launch_modulator(int argc, char* argv[]) return EXIT_FAILURE; } - // Set timezone to UTC - setenv("TZ", "", 1); - tzset(); - while (true) { int c = getopt(argc, argv, "a:C:c:f:F:g:G:hlm:o:O:r:T:u:V"); if (c == -1) { @@ -1015,6 +1011,10 @@ run_modulator_state_t run_modulator(modulator_data& m) int main(int argc, char* argv[]) { + // Set timezone to UTC + setenv("TZ", "", 1); + tzset(); + try { return launch_modulator(argc, argv); } -- cgit v1.2.3