diff options
author | Dimitri Stolnikov <horiz0n@gmx.net> | 2013-10-25 23:39:17 +0200 |
---|---|---|
committer | Dimitri Stolnikov <horiz0n@gmx.net> | 2013-10-25 23:50:49 +0200 |
commit | 18ed13ef05925c057f8bcc93f3b61ec6b346dfe7 (patch) | |
tree | 17e9eae37de891983744b0bb346d900e5903dd4f | |
parent | 6252b4144a10f0971f2620eefadb60b0747b0257 (diff) |
use numchan instead of nchan to prevent ambiguity...
..when specifying total number of channels offered by the block
-rw-r--r-- | grc/gen_osmosdr_blocks.py | 2 | ||||
-rw-r--r-- | lib/osmosdr_arg_helpers.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/grc/gen_osmosdr_blocks.py b/grc/gen_osmosdr_blocks.py index 4ea02e3..5053d25 100644 --- a/grc/gen_osmosdr_blocks.py +++ b/grc/gen_osmosdr_blocks.py @@ -26,7 +26,7 @@ MAIN_TMPL = """\ <category>$($sourk.title())s</category> <throttle>1</throttle> <import>import osmosdr</import> - <make>osmosdr.$(sourk)_c( args="nchan=" + str(\$nchan) + " " + \$args ) + <make>osmosdr.$(sourk)_c( args="numchan=" + str(\$nchan) + " " + \$args ) self.\$(id).set_sample_rate(\$sample_rate) #for $n in range($max_nchan) \#if \$nchan() > $n diff --git a/lib/osmosdr_arg_helpers.h b/lib/osmosdr_arg_helpers.h index 2261524..08e64d4 100644 --- a/lib/osmosdr_arg_helpers.h +++ b/lib/osmosdr_arg_helpers.h @@ -102,7 +102,7 @@ struct is_nchan_argument { bool operator ()(const std::string &str) { - return str.find("nchan=") == 0; + return str.find("numchan=") == 0; } }; @@ -114,7 +114,7 @@ inline gr_io_signature_sptr args_to_io_signature( const std::string &args ) BOOST_FOREACH( std::string arg, arg_list ) { - if ( arg.find( "nchan=" ) == 0 ) // try to parse global nchan value + if ( arg.find( "numchan=" ) == 0 ) // try to parse global nchan value { pair_t pair = param_to_pair( arg ); max_nchan = boost::lexical_cast<size_t>( pair.second ); |