Differences in display of parameters between GNU Radio 3.7 and 3.8 - gnuradio

I am porting multi-rtl to GNU Radio 3.8. I've actually done all the porting and I already have a program that works. Now only a few cosmetic changes are missing, such as new examples. When I wanted to make a new example, I realized that the block is displayed for me differently than in the picture. Here is this picture from documentation (original program):
Here is how this block is displayed for me (in my ported program):
It's even expected behavior. Here are parameters of this block (they're generated for each n in this way):
- id: sync_gain${n}
label: "Ch${n}: Sync RF Gain (dB)"
category: Synchronization
dtype: real
default: 10
hide: ${"$"}{ 'part' if nchan > ${n} else 'all' }
- id: freq${n}
label: "Ch${n}: Frequency (Hz)"
category: RF Options
dtype: real
default: 100e6
hide: ${"$"}{ 'none' if nchan > ${n} else 'all' }
- id: gain${n}
label: "Ch${n}: RF Gain (dB)"
category: RF Options
dtype: real
default: 10
hide: ${"$"}{ 'part' if nchan > ${n} else 'all' }
- id: gain_mode${n}
label: "Ch${n}: Gain Mode"
category: RF Options
dtype: bool
default: False
hide: ${"$"}{ 'part' if nchan > ${n} else 'all' }
options: [ False, True ]
option_labels: [ Manual, Automatic ]
- id: id_string${n}
label: "Ch${n}: ID string"
dtype: string
default: "${n}"
hide: ${"$"}{ 'part' if nchan > ${n} else 'all' }
The only parameter with the hide option set to none is "Ch $ {n}: Frequency (Hz)" so it's also only parameter that is displayed "outside". It's normal. However, I do not understand why the equivalent of this code in gnuradio 3.7 is displayed differently. Here's GNU Radio 3.7 code that I think is equivalent:
<param>
<name>Ch$(n): Sync RF Gain (dB)</name>
<key>sync_gain$(n)</key>
<value>10</value>
<type>real</type>
<hide>\#if \$nchan() > $n then 'part' else 'all'#</hide>
<tab>Synchronization</tab>
</param>
<param>
<name>Ch$(n): Frequency (Hz)</name>
<key>freq$(n)</key>
<value>100e6</value>
<type>real</type>
<hide>\#if \$nchan() > $n then 'none' else 'all'#</hide>
<tab>RF Options</tab>
</param>
<param>
<name>Ch$(n): RF Gain (dB)</name>
<key>gain$(n)</key>
<value>10</value>
<type>real</type>
<hide>\#if \$nchan() > $n then 'part' else 'all'#</hide>
<tab>RF Options</tab>
</param>
<param>
<name>Ch$(n): Gain Mode</name>
<key>gain_mode$(n)</key>
<value>False</value>
<type>bool</type>
<hide>\#if \$nchan() > $n then 'part' else 'all'#</hide>
<option>
<name>Manual</name>
<key>False</key>
</option>
<option>
<name>Automatic</name>
<key>True</key>
</option>
<tab>RF Options</tab>
</param>
<param>
<name>Ch$(n): ID string</name>
<key>id_string$(n)</key>
<value>"$(n)"</value>
<type>string</type>
<hide>\#if \$nchan() > $n then 'part' else 'all'#</hide>
</param>
Why are they displayed differently?

Why are they displayed differently?
Probably some bug in your gnuradio 3.7 version. I just tested it with gnuradio 3.7.13.5 and the displayed block is similar to your gnuradio 3.8 example.
If you want to see all parameters change 'part' to 'none'. See also https://wiki.gnuradio.org/index.php/YAML_GRC#Parameters

Related

How to stop Vuelidate validation after any rule returns false?

I have this rules:
username: {
required: helpers.withMessage('Fill in required fields', required),
lettersAndDigitsOnly: helpers.withMessage(
'Username: digits and letters only',
helpers.regex(/^[0-9a-zA-Z]+$/)
),
available: helpers.withMessage(
'Username is already taken',
helpers.withAsync(usernameAvailable)
),
},
usernameAvailable is called even if lettersAndDigitsOnly returns false. I don't want next validation methods to be called if previous one returned false, how can i do this?
I need something similar to .bail() from express-validator, but in Vuelidate

Q: How to display radio horizontally and not vertically on Circuit

I am sending a form to Circuit. But I would like the radio buttons to be displayed horizontally and no vertical.
... form.controls.push({
type: 'LABEL',
text: '<b>' + intents + '</b>'
},{
name: intents,
type: 'RADIO',
options: [
{text:'1', value:'1'},
{text:'2', value:'2'},
{text:'3', value:'3'},
{text:'4', value:'4'},
{text:'5', value:'5'}
]
}) ...
That is not supported to keep the visual design simple and predictable.

How do you set <select> value/option in edit/new template - ExpressJS

I'm trying to use a partial to share a _form.html across an new.html and edit.html templates in ExpressJS. The problem is with the select tag.
How do you get a select HTML element to have the correct option selected in an edit form? If you use
<select value="#{blob.kind || ''}">
The select doesn't show the option whose value is equal to the blob.kind.
In order to specify a selected option, a selected attribute needs to be added to the option element: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select
Assuming the blob.kind property is a value string, you could write the Jade for your select and option elements as follows:
-
var options = [
{value: 'option1', text: 'Option 1'},
{value: 'option2', text: 'Option 2'},
{value: 'option3', text: 'Option 3'},
{value: 'option4', text: 'Option 4'}
];
select
each obj in options
if (blob.kind === obj.value)
option(value= obj.value, selected)= obj.text
else
option(value= obj.value)= obj.text
For future reference, Jade has been renamed to Pug.
I used to do this as follows:
select
each obj in options
option(value= obj.value, selected=blob.kind === obj.value ? true : false)=
obj.text
Sean's suggestion is excellent, but his syntax didn't quite work for me. Here's what I ended up with:
- const stateOptions = [{value:'AL', text:'Alabama'}, ...]
select#state(name='state' required)
each option in stateOptions
if (option.value === meeting.state)
option(value=(option.value) selected) #{option.text}
else
option(value=(option.value)) #{option.text}

Loading date/time into Sencha Touch Model

I'm using Sencha Touch 1.1. I have the following model and store:
Ext.regModel(TrafficResponse.Models.IncidentReports, {
idProperty: 'Id',
fields: [
{name: 'Id', type: 'int'},
{name: 'TMCRequestedTime', type: 'date'},
{name: 'TRUDetectedTime', type: 'date'},
{name: 'SiteArrivalTime', type: 'date'},
{name: 'SiteDepartedTime', type: 'date'}
],
proxy: {
type: 'localstorage',
id: TrafficResponse.Stores.IncidentReports
},
writer: {
type: 'json'
}
});
truApp.stores.incidentReportStore = new Ext.data.Store({
model: TrafficResponse.Models.IncidentReports,
id: TrafficResponse.Stores.IncidentReports,
autoLoad: true
});
I set the date value using a date/time picker (not a standard Sencha control) and use the updateRecord method of the form to update the model with the values on the form.
After sync() has been done the record in localstorage has the date value in the following format:
2012-02-09T22:15:00.000Z
The value on the date/time picker is Friday, February 10 2012 08:15 so it appears as though the GMT value is being stored.
After refreshing the browser and loading the model from localstorage, the value in localstorage is retained as above but it is not loaded into the model. The value in the model is null.
If I change the model and add dateFormat: 'c' to the field configuration, the date is loaded into the model with the following value:
Thu Feb 09 2012 22:15:00 GMT+1000 (E. Australia Standard Time)
The date is displayed on the form with that value as well which is 10 hours before the date that was set originally.
What can I do to get the date to load correctly and retain the timezone?
After a lot of stepping though code I discovered that the issue was caused by date-js. I removed date-js and used Sencha Date functions and everything now works correctly.

the keyAttr of data-dojo-props doesn't work

here is my html file :
...
<span data-dojo-id="staffStore" data-dojo-type="dojo.data.ItemFileReadStore" data-dojo-props='data:../../staff.json'></span>
<input data-dojo-type="dijit.form.ComboBox"
data-dojo-props="store: staffStore,
keyAttr: 'id',
searchAttr: 'staff_name',
autoComplete: true,
id: 'staff_name',
name:'staff_name',
value: '' "/>
...
and the json data goes as follows:
{
identifier: "id";,
label: "id",
items: [{id: 982483700, staff_name: "guanyu";},{id: 582057769, staff_name: "zhangfei";},{id: 166802994, staff_name: "zhaoyun";}]
}
here is my problem:
when i use post method i have got 'staff_name' in the searchAttr: 'staff_name' passed to the background-appication ,but i want to have the 'id' in the keyAttr: 'id' passed to background-application.in a word,i have passed made a wrong post action.can someone help me get out of this problem?
Use dijit/form/FilteringSelect not dijit/form/ComboBox.
You can enter any text into a ComboBox therefore it cannot return id which is the reason it returns text (or label or searchAttr). FilteringSelect allows only to chose one of options and therefore it can return id, which it does.
See it in action and experiment at jsFiddle: http://jsfiddle.net/phusick/QzQ38/