manage TCAS threatlevel == -1
This commit is contained in:
parent
6a0e839c49
commit
09051ee137
1 changed files with 14 additions and 8 deletions
|
@ -205,14 +205,6 @@ var TrafficLayer = {
|
|||
return;
|
||||
}
|
||||
|
||||
var newThrtAll = ATCSwitchThrtAll.getValue();
|
||||
if (newThrtAll == 1) { # AUTO - display only proximate and higher advisories
|
||||
if (item.data['threatLevel']==0) {
|
||||
me.values[path] = {visible: 0};
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (item.prop['lat'] == nil) {
|
||||
item.prop['lat'] = item.prop.master.getNode('position/latitude-deg');
|
||||
item.prop['lon'] = item.prop.master.getNode('position/longitude-deg');
|
||||
|
@ -241,11 +233,25 @@ var TrafficLayer = {
|
|||
item.data[k] = item.prop[k].getValue();
|
||||
}
|
||||
}
|
||||
|
||||
if (item.data['threatLevel'] == -1) { # airplane with TCAS not enabled or supported
|
||||
me.values[path] = {visible: 0};
|
||||
return;
|
||||
}
|
||||
|
||||
if (oldThreatLevel != item.data['threatLevel']) { # or newThrtAll != item.data['thrtAllStore']
|
||||
item.data['threatLevelDirty'] = 1;
|
||||
#item.data['thrtAllStore'] = newThrtAll;
|
||||
}
|
||||
|
||||
var newThrtAll = ATCSwitchThrtAll.getValue();
|
||||
if (newThrtAll == 1) { # AUTO - display only proximate and higher advisories
|
||||
if (item.data['threatLevel']==0) {
|
||||
me.values[path] = {visible: 0};
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var _lat = item.data['lat'];
|
||||
var _lon = item.data['lon'];
|
||||
var alt = item.data['alt'];
|
||||
|
|
Loading…
Reference in a new issue