Add a quickly generated sound which plays after 15 / 5 seconds when you receive a CPDLC message
This commit is contained in:
parent
0410a0fc91
commit
6debf52e8c
4 changed files with 32 additions and 11 deletions
|
@ -16,6 +16,8 @@ var dcdu_test_time = props.globals.initNode("/instrumentation/du/dcdu-test-time"
|
|||
var dcdu_offtime = props.globals.initNode("/instrumentation/du/dcdu-off-time", 0.0, "DOUBLE");
|
||||
var dcdu_test_amount = props.globals.initNode("/instrumentation/du/dcdu-test-amount", 0.0, "DOUBLE");
|
||||
|
||||
# todo 16.5 watts
|
||||
|
||||
var canvas_DCDU_base = {
|
||||
init: func(canvas_group, file) {
|
||||
var font_mapper = func(family, weight) {
|
||||
|
@ -117,7 +119,7 @@ var canvas_DCDU = {
|
|||
me["MessageTimeStamp"].hide();
|
||||
me["RecallMode"].hide();
|
||||
me["LinkLost"].hide();
|
||||
me["Recall"].hide();
|
||||
me["Recall"].show();
|
||||
me["Close"].hide();
|
||||
|
||||
if (atsu.ADS.getCount() != me.cache.adsCount) {
|
||||
|
|
|
@ -18,26 +18,29 @@ var CPDLCnewMsgLight = props.globals.initNode("/network/cpdlc/new-message-light"
|
|||
setlistener("/network/cpdlc/rx/new-message", func() {
|
||||
if (CPDLCnewMsgFlag.getBoolValue()) {
|
||||
# add to DCDU message buffer to display
|
||||
|
||||
ATCMSGRingCancel = 0;
|
||||
ATCMSGRing();
|
||||
var messageType = 0; # urgent or normal
|
||||
ATCMSGRing(messageType);
|
||||
ATCMsgFlashCancel = 0;
|
||||
ATCMSGFlash();
|
||||
# ATC MSG pushbutton: flashes, ringtone after 15 secs, therafter every 15 secs
|
||||
# add DCDU prompts (wilco, etc) associated to message --> so the CPDLC message object must store the correct response for the actual message
|
||||
CPDLCnewMsgFlag.setBoolValue(0);
|
||||
}
|
||||
}, 0, 0);
|
||||
}, 0, 1);
|
||||
|
||||
var ATCMSGRingCancel = 0;
|
||||
var ATCMSGRing = func() {
|
||||
CPDLCnewMsgAlert.setBoolValue(0);
|
||||
var ATCMSGRing = func(messageType) {
|
||||
print("Going to ring");
|
||||
settimer(func() {
|
||||
if (!ATCMSGRingCancel) {
|
||||
print("Rang, will ring 15 seconds later again");
|
||||
CPDLCnewMsgAlert.setBoolValue(0);
|
||||
settimer(func() {
|
||||
CPDLCnewMsgAlert.setBoolValue(1);
|
||||
ATCMSGRing();
|
||||
ATCMSGRing(messageType);
|
||||
}, 0.1);
|
||||
}
|
||||
}, 15);
|
||||
}, (messageType == 0 ? 15 : 5));
|
||||
};
|
||||
|
||||
var ATCMsgFlashCancel = 0;
|
||||
|
|
|
@ -1913,6 +1913,22 @@
|
|||
</volume>
|
||||
</announcements>
|
||||
|
||||
<atc-msg>
|
||||
<name>ATC MSG</name>
|
||||
<path>Aircraft/A320-family/Sounds/Cockpit/ATC-msg-ring.wav</path>
|
||||
<mode>once</mode>
|
||||
<type>avionics</type>
|
||||
<condition>
|
||||
<property>/network/cpdlc/new-message-ringtone</property>
|
||||
</condition>
|
||||
<volume>
|
||||
<property>/sim/current-view/internal</property>
|
||||
<factor>1.5</factor>
|
||||
</volume>
|
||||
<reference-dist>10</reference-dist>
|
||||
<max-dist>100</max-dist>
|
||||
</atc-msg>
|
||||
|
||||
<chime>
|
||||
<name>Chime</name>
|
||||
<path>Aircraft/A320-family/Sounds/Cockpit/chime.wav</path>
|
||||
|
|
BIN
Sounds/Cockpit/ATC-msg-ring.wav
Normal file
BIN
Sounds/Cockpit/ATC-msg-ring.wav
Normal file
Binary file not shown.
Loading…
Reference in a new issue