forked from sdr/gr-osmosdr
use numchan instead of nchan to prevent ambiguity...
..when specifying total number of channels offered by the block
This commit is contained in:
parent
a71fbeeaa5
commit
71d8d02793
|
@ -26,7 +26,7 @@ MAIN_TMPL = """\
|
||||||
<category>$($sourk.title())s</category>
|
<category>$($sourk.title())s</category>
|
||||||
<throttle>1</throttle>
|
<throttle>1</throttle>
|
||||||
<import>import osmosdr</import>
|
<import>import osmosdr</import>
|
||||||
<make>osmosdr.$(sourk)( args="nchan=" + str(\$nchan) + " " + \$args )
|
<make>osmosdr.$(sourk)( args="numchan=" + str(\$nchan) + " " + \$args )
|
||||||
self.\$(id).set_sample_rate(\$sample_rate)
|
self.\$(id).set_sample_rate(\$sample_rate)
|
||||||
#for $n in range($max_nchan)
|
#for $n in range($max_nchan)
|
||||||
\#if \$nchan() > $n
|
\#if \$nchan() > $n
|
||||||
|
|
|
@ -102,7 +102,7 @@ struct is_nchan_argument
|
||||||
{
|
{
|
||||||
bool operator ()(const std::string &str)
|
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 )
|
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 );
|
pair_t pair = param_to_pair( arg );
|
||||||
max_nchan = boost::lexical_cast<size_t>( pair.second );
|
max_nchan = boost::lexical_cast<size_t>( pair.second );
|
||||||
|
|
Loading…
Reference in New Issue