diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index 71ad97fb..c19d9bbb 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -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 { diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas index ce87f3c0..f3c2e5d9 100644 --- a/Nasal/ECAM/ECAM-messages.nas +++ b/Nasal/ECAM/ECAM-messages.nas @@ -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), diff --git a/Nasal/Systems/Comm/HF.nas b/Nasal/Systems/Comm/HF.nas index eb180102..e085672b 100644 --- a/Nasal/Systems/Comm/HF.nas +++ b/Nasal/Systems/Comm/HF.nas @@ -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(); } });