A320: fix refuelling
t :wq
This commit is contained in:
parent
b7dc1c91e0
commit
a89f2e00d9
3 changed files with 29 additions and 7 deletions
|
@ -6,6 +6,15 @@
|
|||
|
||||
<PropertyList>
|
||||
|
||||
<nasal>
|
||||
|
||||
<close>
|
||||
<![CDATA[
|
||||
systems.FUEL.Nodes.requestLbs.setValue(0);
|
||||
]]>
|
||||
</close>
|
||||
</nasal>
|
||||
|
||||
<name>fuel-dlg</name>
|
||||
<layout>vbox</layout>
|
||||
|
||||
|
@ -132,11 +141,22 @@
|
|||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if ((getprop("/services/fuel-truck/enable") == 1) and (getprop("/services/fuel-truck/connect") == 1)) {
|
||||
systems.fuelSvc.refuel();
|
||||
screen.log.write("Refueling process started.", 0, 0.584, 1);
|
||||
} else
|
||||
screen.log.write("Please Enable and Connect the Fuel Truck First!", 1, 0, 0);
|
||||
<![CDATA[
|
||||
if (systems.fuelSvc.Nodes.requestLbs.getValue() > 0) {
|
||||
if ((getprop("/services/fuel-truck/enable") == 1) and getprop("/services/fuel-truck/connect") == 1) {
|
||||
if (systems.fuelSvc.Nodes.requestTotalLbs.getValue() - pts.Consumables.Fuel.totalFuelLbs.getValue() > 0) {
|
||||
systems.fuelSvc.refuel();
|
||||
screen.log.write("Refueling process started.", 0, 0.584, 1);
|
||||
} else {
|
||||
screen.log.write("Refuelling complete.", 0, 0.584, 1);
|
||||
}
|
||||
} else {
|
||||
screen.log.write("Please Enable and Connect the Fuel Truck First!", 1, 0, 0);
|
||||
}
|
||||
} else {
|
||||
screen.log.write("Refuelling quantity incorrect.", 0, 0.584, 1);
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
|
|
@ -44,6 +44,7 @@ var fuelSvc = {
|
|||
|
||||
stop: func() {
|
||||
systems.FUEL.refuelling.setBoolValue(0);
|
||||
me.Nodes.requestLbs.setValue(0);
|
||||
systems.FUEL.Valves.refuelLeft.setBoolValue(0);
|
||||
systems.FUEL.Valves.refuelCenter.setBoolValue(0);
|
||||
systems.FUEL.Valves.refuelRight.setBoolValue(0);
|
||||
|
@ -80,7 +81,8 @@ var fuelTimer = maketimer(0.25, func() {
|
|||
systems.FUEL.Valves.refuelRight.setBoolValue(0);
|
||||
}
|
||||
|
||||
if (abs(pts.Consumables.Fuel.totalFuelLbs.getValue() - fuelSvc.Nodes.requestTotalLbs.getValue()) < 5) {
|
||||
if (fuelSvc.Nodes.requestTotalLbs.getValue() - pts.Consumables.Fuel.totalFuelLbs.getValue() <= 0) {
|
||||
screen.log.write("Refuelling complete.", 0, 0.584, 1);
|
||||
fuelSvc.stop();
|
||||
fuelTimer.stop();
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
10
|
||||
11
|
Loading…
Add table
Reference in a new issue