1
0
Fork 0

Correct acconfig.nas failures resetting; brake guague --> use lag_filter instead of property rules filter

This commit is contained in:
legoboyvdlp R 2021-06-08 16:53:09 +01:00
parent 113b2264f3
commit 0dd4f55400
5 changed files with 38 additions and 57 deletions

View file

@ -23,39 +23,15 @@ var spinning = maketimer(0.05, func {
var failReset = func { var failReset = func {
systems.ELEC.resetFail(); systems.ELEC.resetFail();
systems.PNEU.resetFail(); systems.PNEU.resetFail();
fbw.FBW.resetFail();
systems.HYD.resetFail();
} }
var failResetOld = func { var failResetOld = func {
setprop("/systems/failures/fctl/elac1", 0);
setprop("/systems/failures/fctl/elac2", 0);
setprop("/systems/failures/fctl/sec1", 0);
setprop("/systems/failures/fctl/sec2", 0);
setprop("/systems/failures/fctl/sec3", 0);
setprop("/systems/failures/fctl/fac1", 0);
setprop("/systems/failures/fctl/fac2", 0);
setprop("/systems/failures/fctl/rtlu-1", 0);
setprop("/systems/failures/fctl/rtlu-2", 0);
setprop("/systems/failures/aileron-left", 0); setprop("/systems/failures/aileron-left", 0);
setprop("/systems/failures/aileron-right", 0); setprop("/systems/failures/aileron-right", 0);
setprop("/systems/failures/elevator-left", 0); setprop("/systems/failures/elevator-left", 0);
setprop("/systems/failures/elevator-right", 0); setprop("/systems/failures/elevator-right", 0);
setprop("/systems/failures/spoilers/spoiler-l1", 0);
setprop("/systems/failures/spoilers/spoiler-l2", 0);
setprop("/systems/failures/spoilers/spoiler-l3", 0);
setprop("/systems/failures/spoilers/spoiler-l4", 0);
setprop("/systems/failures/spoilers/spoiler-l5", 0);
setprop("/systems/failures/spoilers/spoiler-r1", 0);
setprop("/systems/failures/spoilers/spoiler-r2", 0);
setprop("/systems/failures/spoilers/spoiler-r3", 0);
setprop("/systems/failures/spoilers/spoiler-r4", 0);
setprop("/systems/failures/spoilers/spoiler-r5", 0);
setprop("/systems/failures/hyd-blue", 0);
setprop("/systems/failures/hyd-green", 0);
setprop("/systems/failures/hyd-yellow", 0);
setprop("/systems/failures/pump-blue", 0);
setprop("/systems/failures/pump-green", 0);
setprop("/systems/failures/pump-yellow-eng", 0);
setprop("/systems/failures/pump-yellow-elec", 0);
setprop("/systems/failures/fire/cargo-aft-fire", 0); setprop("/systems/failures/fire/cargo-aft-fire", 0);
setprop("/systems/failures/fire/cargo-fwd-fire", 0); setprop("/systems/failures/fire/cargo-fwd-fire", 0);
setprop("/systems/failures/fire/engine-left-fire", 0); setprop("/systems/failures/fire/engine-left-fire", 0);
@ -65,6 +41,7 @@ var failResetOld = func {
} }
failResetOld(); failResetOld();
setprop("/systems/acconfig/autoconfig-running", 0); setprop("/systems/acconfig/autoconfig-running", 0);
setprop("/systems/acconfig/spinning", 0); setprop("/systems/acconfig/spinning", 0);
setprop("/systems/acconfig/spin", "-"); setprop("/systems/acconfig/spin", "-");

View file

@ -360,7 +360,7 @@
<value>1</value> <value>1</value>
</equals> </equals>
<equals> <equals>
<property>systems/hydraulic/brakes/pressure-left-psi-output</property> <property>systems/hydraulic/brakes/pressure-left-psi</property>
<value>0</value> <value>0</value>
</equals> </equals>
</and> </and>
@ -392,7 +392,7 @@
<value>1</value> <value>1</value>
</equals> </equals>
<equals> <equals>
<property>systems/hydraulic/brakes/pressure-right-psi-output</property> <property>systems/hydraulic/brakes/pressure-right-psi</property>
<value>0</value> <value>0</value>
</equals> </equals>
</and> </and>

View file

@ -64,6 +64,9 @@ var FBW = {
sec3: props.globals.getNode("/systems/failures/fctl/sec3"), sec3: props.globals.getNode("/systems/failures/fctl/sec3"),
fac1: props.globals.getNode("/systems/failures/fctl/fac1"), fac1: props.globals.getNode("/systems/failures/fctl/fac1"),
fac2: props.globals.getNode("/systems/failures/fctl/fac2"), fac2: props.globals.getNode("/systems/failures/fctl/fac2"),
rtlu1: props.globals.getNode("/systems/failures/fctl/rtlu-1"),
rtlu2: props.globals.getNode("/systems/failures/fctl/rtlu-2"),
rtlu2: props.globals.getNode("/systems/failures/fctl/rtlu-2"),
ths: props.globals.getNode("/systems/failures/fctl/ths-jam"), ths: props.globals.getNode("/systems/failures/fctl/ths-jam"),
spoilerl1: props.globals.getNode("/systems/failures/spoilers/spoiler-l1"), spoilerl1: props.globals.getNode("/systems/failures/spoilers/spoiler-l1"),
spoilerl2: props.globals.getNode("/systems/failures/spoilers/spoiler-l2"), spoilerl2: props.globals.getNode("/systems/failures/spoilers/spoiler-l2"),

View file

@ -541,6 +541,36 @@
/systems/hydraulic/yellow-accumulator-psi-cmd ge 0 /systems/hydraulic/yellow-accumulator-psi-cmd ge 0
</test> </test>
</switch> </switch>
<lag_filter name="/systems/hydraulic/yellow-accumulator-psi-output">
<input>/systems/hydraulic/yellow-accumulator-psi</input>
<c1>9</c1>
</lag_filter>
<switch name="/systems/hydraulic/brakes/pressure-left-psi-input">
<default value="0"/>
<test logic="AND" value="/systems/hydraulic/brakes/pressure-left-psi">
/systems/hydraulic/brakes/mode ne 1
</test>
</switch>
<switch name="/systems/hydraulic/brakes/pressure-right-psi-input">
<default value="0"/>
<test logic="AND" value="/systems/hydraulic/brakes/pressure-right-psi">
/systems/hydraulic/brakes/mode ne 1
</test>
</switch>
<lag_filter name="/systems/hydraulic/brakes/pressure-left-psi-output">
<input>/systems/hydraulic/brakes/pressure-left-psi-input</input>
<c1>9</c1>
</lag_filter>
<lag_filter name="/systems/hydraulic/brakes/pressure-right-psi-output">
<input>/systems/hydraulic/brakes/pressure-right-psi-input</input>
<c1>9</c1>
</lag_filter>
</channel> </channel>
<channel name="Lights" execrate="8"> <channel name="Lights" execrate="8">

View file

@ -1325,33 +1325,4 @@
</input> </input>
<output>/instrumentation/mk-viii/inputs/discretes/landing-flaps</output> <output>/instrumentation/mk-viii/inputs/discretes/landing-flaps</output>
</logic> </logic>
<!-- Brake Pressure Guague -->
<filter>
<type>noise-spike</type>
<input>
<property>/systems/hydraulic/yellow-accumulator-psi</property>
</input>
<output>/systems/hydraulic/yellow-accumulator-psi-output</output>
<max-rate-of-change>3000</max-rate-of-change>
</filter>
<filter>
<type>noise-spike</type>
<input>
<property>/systems/hydraulic/brakes/pressure-left-psi</property>
</input>
<output>/systems/hydraulic/brakes/pressure-left-psi-output</output>
<max-rate-of-change>3000</max-rate-of-change>
</filter>
<filter>
<type>noise-spike</type>
<input>
<property>/systems/hydraulic/brakes/pressure-right-psi</property>
</input>
<output>/systems/hydraulic/brakes/pressure-right-psi-output</output>
<max-rate-of-change>3000</max-rate-of-change>
</filter>
</PropertyList> </PropertyList>