Add /environment/atmosphere/is-isa
property for ISA METAR
This commit is contained in:
parent
11820f6493
commit
4f7a93d0ba
2 changed files with 12 additions and 0 deletions
|
@ -42,19 +42,25 @@ setlistener("/environment/weather-scenario", func(n) {
|
|||
setprop( "/environment/params/metar-updates-environment", 0 );
|
||||
setprop( "/environment/realwx/enabled", 0 );
|
||||
setprop( "/environment/config/enabled", 0 );
|
||||
setprop( "/environment/climate/is-isa", 0 );
|
||||
} else if( scenarioName == "Live data" ) {
|
||||
setprop( "/environment/params/metar-updates-environment", 1 );
|
||||
setprop( "/environment/realwx/enabled", 1 );
|
||||
setprop( "/environment/config/enabled", 1 );
|
||||
setprop( "/environment/climate/is-isa", 0 );
|
||||
} else if( scenarioName == "Manual input" ) {
|
||||
setprop( "/environment/params/metar-updates-environment", 1 );
|
||||
setprop( "/environment/realwx/enabled", 0 );
|
||||
setprop( "/environment/config/enabled", 1 );
|
||||
setprop( "/environment/climate/is-isa", 0 );
|
||||
} else {
|
||||
setprop( "/environment/params/metar-updates-environment", 1 );
|
||||
setprop( "/environment/realwx/enabled", 0 );
|
||||
setprop( "/environment/config/enabled", 1 );
|
||||
var metar = scenario.getNode("metar",1).getValue();
|
||||
setprop( "environment/metar/data", metar );
|
||||
|
||||
var isISA = scenarioName == "International Standard Atmosphere";
|
||||
setprop( "/environment/climate/is-isa", isISA );
|
||||
}
|
||||
});
|
||||
|
|
|
@ -55,10 +55,16 @@
|
|||
setprop( "/environment/params/metar-updates-environment", 0 );
|
||||
setprop( "/environment/realwx/enabled", 0 );
|
||||
setprop( "/environment/config/enabled", 1 );
|
||||
setprop( "/environment/climate/is-isa", 0 );
|
||||
} else if( scenarioName == "Live data" ) {
|
||||
# If we've selected Live Data we need to force
|
||||
# a refresh of the Live Data setting.
|
||||
setprop( "/environment/realwx/enabled", 1 );
|
||||
setprop( "/environment/climate/is-isa", 0 );
|
||||
} else if( scenarioName == "International Standard Atmosphere" ) {
|
||||
# If we've selected International Standard Atmosphere we need to
|
||||
# enable the ISA setting.
|
||||
setprop( "/environment/climate/is-isa", 1 );
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue