Bugfix
This commit is contained in:
parent
77120dcf04
commit
62c855c56f
2 changed files with 52 additions and 17 deletions
|
@ -70,19 +70,26 @@ var warning = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
warnlight: func() {
|
warnlight: func() {
|
||||||
if (me.light > 1 or me.noRepeat == 1 or (me.active == 0 and me.wasActive == 0)) {return;}
|
if (me.light > 1) { return; }
|
||||||
if (me.active == 1) {
|
if (me.active == 0 and me.wasActive == 1) {
|
||||||
lights[me.light].setBoolValue(1);
|
|
||||||
me.noRepeat = 1;
|
|
||||||
} elsif (me.wasActive) {
|
|
||||||
print("Yesssssss");
|
|
||||||
lights[me.light].setBoolValue(0);
|
lights[me.light].setBoolValue(0);
|
||||||
me.wasActive = 0;
|
me.wasActive = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (me.noRepeat == 1 or me.active == 0) { return; }
|
||||||
|
|
||||||
|
lights[me.light].setBoolValue(1);
|
||||||
|
me.noRepeat = 1;
|
||||||
},
|
},
|
||||||
sound: func() {
|
sound: func() {
|
||||||
if (me.aural > 2 or me.noRepeat2 == 1 or (me.active == 0 and me.wasActive == 0)) {return;}
|
if (me.aural > 2) { return; }
|
||||||
if (me.active == 1) {
|
if (me.active == 0 and me.wasActive == 1) {
|
||||||
|
aural[me.aural].setBoolValue(0);
|
||||||
|
me.wasActive = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (me.noRepeat2 == 1 or me.active == 0) { return; }
|
||||||
|
|
||||||
if (me.aural != 0) {
|
if (me.aural != 0) {
|
||||||
aural[me.aural].setBoolValue(0);
|
aural[me.aural].setBoolValue(0);
|
||||||
}
|
}
|
||||||
|
@ -90,11 +97,6 @@ var warning = {
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
aural[me.aural].setBoolValue(1);
|
aural[me.aural].setBoolValue(1);
|
||||||
}, 0.15);
|
}, 0.15);
|
||||||
} elsif (me.wasActive) {
|
|
||||||
print("Noooooooo");
|
|
||||||
aural[me.aural].setBoolValue(0);
|
|
||||||
me.wasActive = 0;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
callPage: func() {
|
callPage: func() {
|
||||||
if (me.sdPage == "nil" or me.hasCalled == 1) { return; }
|
if (me.sdPage == "nil" or me.hasCalled == 1) { return; }
|
||||||
|
@ -207,6 +209,9 @@ var ECAM_controller = {
|
||||||
w.warnlight();
|
w.warnlight();
|
||||||
w.sound();
|
w.sound();
|
||||||
counter += 1;
|
counter += 1;
|
||||||
|
} elsif (w.wasActive == 1) {
|
||||||
|
w.warnlight();
|
||||||
|
w.sound();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -729,6 +729,36 @@
|
||||||
<gain>1</gain>
|
<gain>1</gain>
|
||||||
</pure_gain>
|
</pure_gain>
|
||||||
|
|
||||||
|
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-1-capt">
|
||||||
|
<input>/systems/navigation/adr/computation/baro-alt-corrected-1-capt</input>
|
||||||
|
<gain>1</gain>
|
||||||
|
</pure_gain>
|
||||||
|
|
||||||
|
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-2-capt">
|
||||||
|
<input>/systems/navigation/adr/computation/baro-alt-corrected-2-capt</input>
|
||||||
|
<gain>1</gain>
|
||||||
|
</pure_gain>
|
||||||
|
|
||||||
|
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-3-capt">
|
||||||
|
<input>/systems/navigation/adr/computation/baro-alt-corrected-3-capt</input>
|
||||||
|
<gain>1</gain>
|
||||||
|
</pure_gain>
|
||||||
|
|
||||||
|
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-1-fo">
|
||||||
|
<input>/systems/navigation/adr/computation/baro-alt-corrected-1-fo</input>
|
||||||
|
<gain>1</gain>
|
||||||
|
</pure_gain>
|
||||||
|
|
||||||
|
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-2-capt">
|
||||||
|
<input>/systems/navigation/adr/computation/baro-alt-corrected-2-fo</input>
|
||||||
|
<gain>1</gain>
|
||||||
|
</pure_gain>
|
||||||
|
|
||||||
|
<pure_gain name="/systems/navigation/adr/output/baro-alt-corrected-3-fo">
|
||||||
|
<input>/systems/navigation/adr/computation/baro-alt-corrected-3-fo</input>
|
||||||
|
<gain>1</gain>
|
||||||
|
</pure_gain>
|
||||||
|
|
||||||
<pure_gain name="/systems/navigation/adr/output/cas-1">
|
<pure_gain name="/systems/navigation/adr/output/cas-1">
|
||||||
<input>/systems/navigation/adr/computation/cas-1</input>
|
<input>/systems/navigation/adr/computation/cas-1</input>
|
||||||
<gain>1</gain>
|
<gain>1</gain>
|
||||||
|
|
Loading…
Add table
Reference in a new issue