minor cleanup & optmization
aar.nas disables $FG_ROOT/Nasal/fuel.nas' main loop, as it should be able to fully replace it. Ideally, there would be no aar.nas at all, and fuel.nas would do the job for YASim & JSBSim. Unfortunately, there's a problem with fuel.nas that's not easy to fix ...
This commit is contained in:
parent
8994a4df3f
commit
f6c6eaf5b7
1 changed files with 2 additions and 3 deletions
|
@ -88,7 +88,6 @@ update_loop = func {
|
|||
total -= received;
|
||||
}
|
||||
|
||||
var tanks = props.globals.getNode("consumables/fuel", 1).getChildren("tank");
|
||||
|
||||
# make list of selected tanks
|
||||
var selected_tanks = [];
|
||||
|
@ -189,7 +188,7 @@ update_loop = func {
|
|||
|
||||
|
||||
initialize = func {
|
||||
fuel.updateFuel = func {}
|
||||
fuel.updateFuel = func {} # kill $FG_ROOT/Nasal/fuel.nas' loop
|
||||
|
||||
refuelingN = props.globals.getNode("/systems/refuel/contact", 1);
|
||||
refuelingN.setBoolValue(0);
|
||||
|
@ -213,7 +212,6 @@ initialize = func {
|
|||
|
||||
setlistener("sim/freeze/fuel", func { fuel_freeze = cmdarg().getBoolValue() }, 1);
|
||||
setlistener("sim/ai/enabled", func { ai_enabled = cmdarg().getBoolValue() }, 1);
|
||||
update_loop();
|
||||
}
|
||||
|
||||
|
||||
|
@ -221,6 +219,7 @@ initialize = func {
|
|||
wait_for_fdm = func {
|
||||
if (getprop("/position/altitude-agl-ft")) { # is there a better indicator?
|
||||
initialize();
|
||||
update_loop();
|
||||
} else {
|
||||
settimer(wait_for_fdm, 1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue