|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] Pass boolean parameter to gnuradio script from command line |
Date: | Tue, 18 Jul 2017 11:05:06 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
Hi George, you could go into gnuradio/grc/blocks, change parameter.xml to
have <option> <name>Boolean</name> <key>bool</key> <opt>type:bool</opt> </option> and then change grc/core/generator/flow_graph.tmpl and in the #for $param in $parameters loop add an if type == "bool": clause that adds a binary option (something with ..action="", see [1]). great chance to contribute :) . Alternatively, just use an int parameter, and use bool(parameter_id) whereever you need a true or false. You'll have to pass 0 for False, and any other int for True, then. Best regards, Marcus [1]
https://docs.python.org/2/library/optparse.html#standard-option-actions On 18.07.2017 10:40, George Vardakis
wrote:
|
smime.p7s
Description: S/MIME Cryptographic Signature
[Prev in Thread] | Current Thread | [Next in Thread] |