From 18c860281d980211d8b351ddd7d082939e48534a Mon Sep 17 00:00:00 2001 From: Dimitri Stolnikov Date: Sun, 20 Jan 2013 15:45:22 +0100 Subject: [PATCH] file: set repeat and throttle device args to true by default --- lib/file/file_source_c.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/file/file_source_c.cc b/lib/file/file_source_c.cc index 16b56be..2816716 100644 --- a/lib/file/file_source_c.cc +++ b/lib/file/file_source_c.cc @@ -45,8 +45,8 @@ file_source_c::file_source_c(const std::string &args) : gr_make_io_signature (1, 1, sizeof (gr_complex))) { std::string filename; - bool repeat = false; - bool throttle = false; + bool repeat = true; + bool throttle = true; _freq = 0; _rate = 0; @@ -62,10 +62,10 @@ file_source_c::file_source_c(const std::string &args) : _rate = boost::lexical_cast< double >( dict["rate"] ); if (dict.count("repeat")) - repeat = "true" == dict["repeat"] ? true : false; + repeat = ("true" == dict["repeat"] ? true : false); if (dict.count("throttle")) - throttle = "true" == dict["throttle"] ? true : false; + throttle = ("true" == dict["throttle"] ? true : false); if (!filename.length()) throw std::runtime_error("No file name specified."); @@ -108,7 +108,7 @@ std::vector file_source_c::get_devices() { std::vector devices; - std::string args = "file=your.file,freq=100e6,rate=1e6,repeat=false,throttle=true"; + std::string args = "file='/path/to/your/file',rate=1e6,freq=100e6,repeat=true,throttle=true"; args += ",label='Complex Sampled (IQ) File'"; devices.push_back( args );