Merge branch 'dev' into 3D
This commit is contained in:
commit
daa5bc5bcc
3 changed files with 59 additions and 47 deletions
|
@ -1608,8 +1608,8 @@
|
|||
<instrumentation n="0">
|
||||
<altimeter n="0">
|
||||
<inhg type="bool">0</inhg>
|
||||
<indicated-altitude-ft tyep="double">0</indicated-altitude-ft>
|
||||
<indicated-altitude-ft-pfd tyep="double">0</indicated-altitude-ft-pfd>
|
||||
<indicated-altitude-ft type="double">0</indicated-altitude-ft>
|
||||
<indicated-altitude-ft-pfd type="double">0</indicated-altitude-ft-pfd>
|
||||
<oldqnh type="double">29.92</oldqnh>
|
||||
<serviceable type="bool">true</serviceable>
|
||||
<std type="bool">0</std>
|
||||
|
|
|
@ -367,10 +367,26 @@
|
|||
<property>systems/hydraulic/brakes/pressure-left-psi</property>
|
||||
<factor>-0.03</factor>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>systems/hydraulic/brakes/mode</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
<or>
|
||||
<equals>
|
||||
<property>systems/hydraulic/brakes/mode</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<and>
|
||||
<equals>
|
||||
<property>systems/hydraulic/brakes/mode</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>systems/hydraulic/brakes/pressure-left-psi</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</and>
|
||||
<equals>
|
||||
<property>systems/hydraulic/brakes/mode</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
<axis>
|
||||
<object-name>brakes_lb_psi.axis</object-name>
|
||||
|
@ -383,10 +399,26 @@
|
|||
<property>systems/hydraulic/brakes/pressure-right-psi</property>
|
||||
<factor>0.03</factor>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>systems/hydraulic/brakes/mode</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
<or>
|
||||
<equals>
|
||||
<property>systems/hydraulic/brakes/mode</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<and>
|
||||
<equals>
|
||||
<property>systems/hydraulic/brakes/mode</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>systems/hydraulic/brakes/pressure-right-psi</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</and>
|
||||
<equals>
|
||||
<property>systems/hydraulic/brakes/mode</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
<axis>
|
||||
<object-name>brakes_rb_psi.axis</object-name>
|
||||
|
@ -399,16 +431,10 @@
|
|||
<property>systems/hydraulic/brakes/accumulator-pressure-psi</property>
|
||||
<interpolation>
|
||||
<entry><ind>0</ind><dep>0</dep></entry>
|
||||
<entry><ind>700</ind><dep>-66</dep></entry>
|
||||
<entry><ind>2000</ind><dep>-78</dep></entry>
|
||||
<entry><ind>3000</ind><dep>-90</dep></entry>
|
||||
<entry><ind>700</ind><dep>-20</dep></entry>
|
||||
<entry><ind>2000</ind><dep>-44</dep></entry>
|
||||
<entry><ind>3000</ind><dep>-66</dep></entry>
|
||||
</interpolation>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>systems/hydraulic/brakes/mode</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<axis>
|
||||
<object-name>brakes_accum_psi.axis</object-name>
|
||||
</axis>
|
||||
|
|
|
@ -14,8 +14,6 @@ var HYD = {
|
|||
mode: props.globals.initNode("/systems/hydraulic/brakes/mode", 0, "INT"),
|
||||
leftbrake: props.globals.getNode("/controls/gear/brake-left"),
|
||||
rightbrake: props.globals.getNode("/controls/gear/brake-right"),
|
||||
lbrake: props.globals.initNode("/systems/hydraulic/brakes/lbrake", 0, "INT"),
|
||||
rbrake: props.globals.initNode("/systems/hydraulic/brakes/rbrake", 0, "INT"),
|
||||
noserubber: props.globals.initNode("/systems/hydraulic/brakes/nose-rubber", 0, "INT"),
|
||||
},
|
||||
Fail: {
|
||||
|
@ -88,34 +86,22 @@ var HYD = {
|
|||
me.Fail.yellowLeak.setBoolValue(0);
|
||||
},
|
||||
loop: func() {
|
||||
if (me.Brakes.leftbrake.getValue() == 1) {
|
||||
me.Brakes.lbrake.setValue(1);
|
||||
} else {
|
||||
me.Brakes.lbrake.setValue(0);
|
||||
}
|
||||
if (me.Brakes.rightbrake.getValue() == 1) {
|
||||
me.Brakes.rbrake.setValue(1);
|
||||
} else {
|
||||
me.Brakes.rbrake.setValue(0);
|
||||
}
|
||||
if (props.globals.getValue("/controls/gear/nws-switch") == 1) {
|
||||
me.Brakes.askidSw.setBoolValue(1); #true
|
||||
} else {
|
||||
me.Brakes.askidSw.setBoolValue(0); #false
|
||||
}
|
||||
if (me.Brakes.mode.getValue() == 2) {
|
||||
if (me.Psi.yellow.getValue() > 2500 and me.Brakes.accumPressPsi.getValue() < 700) {
|
||||
if (me.Psi.yellow.getValue() > 0 and me.Brakes.accumPressPsi.getValue() < 3000 and me.Psi.yellow.getValue() > me.Brakes.accumPressPsi.getValue()) {
|
||||
me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() + 50);
|
||||
}
|
||||
}
|
||||
|
||||
# Decrease accumPressPsi when green and yellow hydraulic's aren't pressurized
|
||||
if (me.Brakes.leftbrake.getValue() > 0) {
|
||||
if (me.Brakes.leftbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
|
||||
lcont = lcont + 1;
|
||||
} else {
|
||||
lcont = 0;
|
||||
}
|
||||
if (me.Brakes.rightbrake.getValue() > 0) {
|
||||
if (me.Brakes.rightbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
|
||||
rcont = rcont + 1;
|
||||
} else {
|
||||
rcont = 0;
|
||||
|
@ -123,11 +109,11 @@ var HYD = {
|
|||
if ((me.Psi.green.getValue() == 0) and (me.Psi.yellow.getValue() == 0) and (me.Brakes.accumPressPsi.getValue()) > 0) {
|
||||
if (lcont == 1) {
|
||||
#me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - (35 * me.Brakes.leftbrake.getValue()));
|
||||
me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - 35);
|
||||
me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - 200);
|
||||
}
|
||||
if (rcont == 1) {
|
||||
#me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - (35 * me.Brakes.leftbrake.getValue()));
|
||||
me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - 35);
|
||||
me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - 200);
|
||||
}
|
||||
if (me.Brakes.accumPressPsi.getValue() < 0) {
|
||||
me.Brakes.accumPressPsi.setValue(0);
|
||||
|
@ -137,26 +123,26 @@ var HYD = {
|
|||
# Braking Pressure
|
||||
if (me.Brakes.mode.getValue() == 1 or (me.Brakes.mode.getValue() == 2 and me.Psi.green.getValue() >= 2500)) {
|
||||
# Normal braking - Green OK
|
||||
if (me.Brakes.lbrake.getValue() > 0) {
|
||||
if (me.Brakes.leftbrake.getValue() > 0) {
|
||||
me.Brakes.leftPressPsi.setValue(props.globals.getValue("/systems/hydraulic/green-psi-ptu"));
|
||||
} else {
|
||||
me.Brakes.leftPressPsi.setValue(0);
|
||||
}
|
||||
if (me.Brakes.rbrake.getValue() > 0) {
|
||||
if (me.Brakes.rightbrake.getValue() > 0) {
|
||||
me.Brakes.rightPressPsi.setValue(props.globals.getValue("/systems/hydraulic/green-psi-ptu"));
|
||||
} else {
|
||||
me.Brakes.rightPressPsi.setValue(0);
|
||||
}
|
||||
} else {
|
||||
if (me.Brakes.mode.getValue() == 2 and me.Psi.green.getValue() < 2500) {
|
||||
if ((me.Brakes.mode.getValue() == 2 and me.Psi.green.getValue() < 2500) or me.Brakes.mode.getValue() == 0) {
|
||||
# Alternate Braking (Yellow OK + Antiskid ON + electric OK) - missing condition: BSCU OK-KO
|
||||
if (me.Psi.yellow.getValue() >= 2500 and me.Brakes.askidSw.getValue() and props.globals.getValue("/systems/electrical/serviceable")) {
|
||||
if (me.Brakes.lbrake.getValue() > 0) {
|
||||
if (me.Brakes.leftbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
|
||||
me.Brakes.leftPressPsi.setValue(props.globals.getValue("/systems/hydraulic/yellow-psi-ptu"));
|
||||
} else {
|
||||
me.Brakes.leftPressPsi.setValue(0);
|
||||
}
|
||||
if (me.Brakes.rbrake.getValue() > 0) {
|
||||
if (me.Brakes.rightbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
|
||||
me.Brakes.rightPressPsi.setValue(props.globals.getValue("/systems/hydraulic/yellow-psi-ptu"));
|
||||
} else {
|
||||
me.Brakes.rightPressPsi.setValue(0);
|
||||
|
@ -164,12 +150,12 @@ var HYD = {
|
|||
} else {
|
||||
# Alternate Braking (Yellow OK + Antiskid OFF + electric OK) - missing condition: BSCU OK-KO
|
||||
if (me.Psi.yellow.getValue() >= 2500 and !me.Brakes.askidSw.getValue() and props.globals.getValue("/systems/electrical/serviceable")) {
|
||||
if (me.Brakes.lbrake.getValue() > 0) {
|
||||
if (me.Brakes.leftbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
|
||||
me.Brakes.leftPressPsi.setValue(1000);
|
||||
} else {
|
||||
me.Brakes.leftPressPsi.setValue(0);
|
||||
}
|
||||
if (me.Brakes.rbrake.getValue() > 0) {
|
||||
if (me.Brakes.rightbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
|
||||
me.Brakes.rightPressPsi.setValue(1000);
|
||||
} else {
|
||||
me.Brakes.rightPressPsi.setValue(0);
|
||||
|
@ -177,12 +163,12 @@ var HYD = {
|
|||
} else {
|
||||
# Alternate Braking (Yellow KO or Antiskid KO or electric KO) - missing condition: BSCU OK-KO
|
||||
if (me.Psi.yellow.getValue() < 2500 or !me.Brakes.askidSw.getValue() or !props.globals.getValue("/systems/electrical/serviceable")) {
|
||||
if (me.Brakes.lbrake.getValue() > 0) {
|
||||
if (me.Brakes.leftbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
|
||||
me.Brakes.leftPressPsi.setValue(me.Brakes.accumPressPsi.getValue());
|
||||
} else {
|
||||
me.Brakes.leftPressPsi.setValue(0);
|
||||
}
|
||||
if (me.Brakes.rbrake.getValue() > 0) {
|
||||
if (me.Brakes.rightbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
|
||||
me.Brakes.rightPressPsi.setValue(me.Brakes.accumPressPsi.getValue());
|
||||
} else {
|
||||
me.Brakes.rightPressPsi.setValue(0);
|
||||
|
|
Loading…
Reference in a new issue