1
0
Fork 0

Bugfix, add to ECAM

This commit is contained in:
legoboyvdlp R 2020-04-21 16:07:16 +01:00
parent 1782383168
commit 49d2b0ec1c
3 changed files with 31 additions and 3 deletions

View file

@ -25,6 +25,8 @@ var stallVoice = props.globals.initNode("/sim/sound/warnings/stall-voice", 0, "B
var engOpt = props.globals.getNode("options/eng", 1);
# local variables
var transmitFlag1 = 0;
var transmitFlag2 = 0;
var phaseVar = nil;
var dualFailFACActive = 1;
var emerConfigFACActive = 1;
@ -1291,6 +1293,18 @@ var messages_priority_2 = func {
} else {
ECAM_controller.warningReset(crgFwdFireDetFault);
}
if (hf1Emitting.clearFlag == 0 and transmitFlag1) {
hf1Emitting.active = 1;
} else {
ECAM_controller.warningReset(hf1Emitting);
}
if (hf2Emitting.clearFlag == 0 and transmitFlag2) {
hf2Emitting.active = 1;
} else {
ECAM_controller.warningReset(hf2Emitting);
}
}
var messages_priority_1 = func {

View file

@ -252,6 +252,11 @@ var warnings = std.Vector.new([
var apuLoopBFault = warning.new(msg: "APU FIRE LOOP B FAULT", colour: "a", isMainMsg: 1),
var crgFwdFireDetFault = warning.new(msg: "FWD CRG DET FAULT", colour: "a", isMainMsg: 1),
var crgAftFireDetFault = warning.new(msg: "AFT CRG DET FAULT", colour: "a", isMainMsg: 1),
# Radios
var hf1Emitting = warning.new(msg: "COM HF 1 EMITTING", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var hf2Emitting = warning.new(msg: "COM HF 2 EMITTING", colour: "a", aural: 1, light: 1, isMainMsg: 1),
# Recall
var recallNormal = warning.new(msg: " ", colour: "g", isMainMsg: 1),
var recallNormal1 = warning.new(msg: " ", colour: "g", isMainMsg: 1),

View file

@ -63,7 +63,12 @@ var highFrequencyRadio = {
transmitTimer2.stop();
}
ecam.transmitFlag = 0;
if (me.num == 0) {
ecam.transmitFlag1 = 0;
} else {
ecam.transmitFlag2 = 0;
}
if (me._toneTime == nil) {
me.toneControl.setValue(0);
}
@ -73,7 +78,11 @@ var highFrequencyRadio = {
monitorPTT: func() {
if (me.transmit) {
if (pts.Sim.Time.elapsedSec.getValue() > me._transmitTime + 60) {
ecam.transmitFlag = 1;
if (me.num == 0) {
ecam.transmitFlag1 = 1;
} else {
ecam.transmitFlag2 = 1;
}
}
}
},
@ -119,7 +128,7 @@ var toneTimer2 = maketimer(1, func() {
if (pts.Sim.Time.elapsedSec.getValue() > HFS[1]._toneTime) {
HFS[1].toneControl.setValue(0);
HFS[1]._toneTime = nil;
toneTimer1.stop();
toneTimer2.stop();
}
});