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_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");
|
var dcdu_test_amount = props.globals.initNode("/instrumentation/du/dcdu-test-amount", 0.0, "DOUBLE");
|
||||||
|
|
||||||
|
# todo 16.5 watts
|
||||||
|
|
||||||
var canvas_DCDU_base = {
|
var canvas_DCDU_base = {
|
||||||
init: func(canvas_group, file) {
|
init: func(canvas_group, file) {
|
||||||
var font_mapper = func(family, weight) {
|
var font_mapper = func(family, weight) {
|
||||||
|
@ -117,7 +119,7 @@ var canvas_DCDU = {
|
||||||
me["MessageTimeStamp"].hide();
|
me["MessageTimeStamp"].hide();
|
||||||
me["RecallMode"].hide();
|
me["RecallMode"].hide();
|
||||||
me["LinkLost"].hide();
|
me["LinkLost"].hide();
|
||||||
me["Recall"].hide();
|
me["Recall"].show();
|
||||||
me["Close"].hide();
|
me["Close"].hide();
|
||||||
|
|
||||||
if (atsu.ADS.getCount() != me.cache.adsCount) {
|
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() {
|
setlistener("/network/cpdlc/rx/new-message", func() {
|
||||||
if (CPDLCnewMsgFlag.getBoolValue()) {
|
if (CPDLCnewMsgFlag.getBoolValue()) {
|
||||||
# add to DCDU message buffer to display
|
# add to DCDU message buffer to display
|
||||||
|
|
||||||
ATCMSGRingCancel = 0;
|
ATCMSGRingCancel = 0;
|
||||||
ATCMSGRing();
|
var messageType = 0; # urgent or normal
|
||||||
|
ATCMSGRing(messageType);
|
||||||
ATCMsgFlashCancel = 0;
|
ATCMsgFlashCancel = 0;
|
||||||
ATCMSGFlash();
|
ATCMSGFlash();
|
||||||
# ATC MSG pushbutton: flashes, ringtone after 15 secs, therafter every 15 secs
|
# 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
|
# 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 ATCMSGRingCancel = 0;
|
||||||
var ATCMSGRing = func() {
|
var ATCMSGRing = func(messageType) {
|
||||||
CPDLCnewMsgAlert.setBoolValue(0);
|
print("Going to ring");
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
if (!ATCMSGRingCancel) {
|
if (!ATCMSGRingCancel) {
|
||||||
CPDLCnewMsgAlert.setBoolValue(1);
|
print("Rang, will ring 15 seconds later again");
|
||||||
ATCMSGRing();
|
CPDLCnewMsgAlert.setBoolValue(0);
|
||||||
|
settimer(func() {
|
||||||
|
CPDLCnewMsgAlert.setBoolValue(1);
|
||||||
|
ATCMSGRing(messageType);
|
||||||
|
}, 0.1);
|
||||||
}
|
}
|
||||||
}, 15);
|
}, (messageType == 0 ? 15 : 5));
|
||||||
};
|
};
|
||||||
|
|
||||||
var ATCMsgFlashCancel = 0;
|
var ATCMsgFlashCancel = 0;
|
||||||
|
|
|
@ -1913,6 +1913,22 @@
|
||||||
</volume>
|
</volume>
|
||||||
</announcements>
|
</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>
|
<chime>
|
||||||
<name>Chime</name>
|
<name>Chime</name>
|
||||||
<path>Aircraft/A320-family/Sounds/Cockpit/chime.wav</path>
|
<path>Aircraft/A320-family/Sounds/Cockpit/chime.wav</path>
|
||||||
|
@ -1946,7 +1962,7 @@
|
||||||
<reference-dist>10</reference-dist>
|
<reference-dist>10</reference-dist>
|
||||||
<max-dist>100</max-dist>
|
<max-dist>100</max-dist>
|
||||||
</crc>
|
</crc>
|
||||||
|
|
||||||
<cricket>
|
<cricket>
|
||||||
<name>Cricket</name>
|
<name>Cricket</name>
|
||||||
<path>Aircraft/A320-family/Sounds/Cockpit/cricket.wav</path>
|
<path>Aircraft/A320-family/Sounds/Cockpit/cricket.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