From cf46de6e9faa6628650217f53bae72059475c63e Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 2 Nov 2014 21:07:08 +0100 Subject: Change UHD txgain to double --- doc/example.ini | 2 +- src/DabMod.cpp | 4 ++-- src/OutputUHD.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/example.ini b/doc/example.ini index 9cdfe03..38a856c 100644 --- a/doc/example.ini +++ b/doc/example.ini @@ -107,7 +107,7 @@ filename=/dev/stdout ; ; Settings for a USRP B100: device=master_clock_rate=32768000,type=b100 -txgain=2 +txgain=2.0 ; Try first with small gain values ; Also set rate to 2048000 diff --git a/src/DabMod.cpp b/src/DabMod.cpp index a4ef228..b0a7a2c 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -259,7 +259,7 @@ int main(int argc, char* argv[]) break; case 'G': #if defined(HAVE_OUTPUT_UHD) - outputuhd_conf.txgain = (int)strtol(optarg, NULL, 10); + outputuhd_conf.txgain = strtod(optarg, NULL); #endif break; case 'l': @@ -453,7 +453,7 @@ int main(int argc, char* argv[]) "setting type in [uhd] device is deprecated !\n"; } - outputuhd_conf.txgain = pt.get("uhdoutput.txgain", 0); + outputuhd_conf.txgain = pt.get("uhdoutput.txgain", 0.0); outputuhd_conf.frequency = pt.get("uhdoutput.frequency", 0); std::string chan = pt.get("uhdoutput.channel", ""); diff --git a/src/OutputUHD.h b/src/OutputUHD.h index 3a047bf..ef9740d 100644 --- a/src/OutputUHD.h +++ b/src/OutputUHD.h @@ -166,7 +166,7 @@ struct OutputUHDConfig { long masterClockRate; unsigned sampleRate; double frequency; - int txgain; + double txgain; bool enableSync; bool muteNoTimestamps; -- cgit v1.2.3