HF radio: fix nasal typo; improve efficiency of code. ACP: improve behaviour of INT-RAD switch. HF sounds: set to avionics mode
This commit is contained in:
parent
a267dc5823
commit
6af9c61008
4 changed files with 101 additions and 31 deletions
|
@ -29,25 +29,54 @@
|
|||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>controls/audio/acp[0]/int-rad</property>
|
||||
<value>2</value>
|
||||
<value>1</value>
|
||||
<condition>
|
||||
<not>
|
||||
<equals>
|
||||
<property>controls/audio/acp[0]/int-rad</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
</not>
|
||||
</condition>
|
||||
</binding>
|
||||
</action>
|
||||
<action>
|
||||
<button>1</button>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>controls/audio/acp[0]/int-rad</property>
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>controls/audio/acp[0]/int-rad</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
</condition>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>controls/audio/acp[0]/int-rad</property>
|
||||
<value>0</value>
|
||||
<condition>
|
||||
<not>
|
||||
<equals>
|
||||
<property>controls/audio/acp[0]/int-rad</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
</not>
|
||||
</condition>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</action>
|
||||
<action>
|
||||
<button>1</button>
|
||||
<binding>
|
||||
<command>property-cycle</command>
|
||||
<property>controls/audio/acp[0]/int-rad</property>
|
||||
<value>2</value>
|
||||
<value>0</value>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>rotate</type>
|
||||
<object-name>audio_int_rad</object-name>
|
||||
|
|
|
@ -29,25 +29,54 @@
|
|||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>controls/audio/acp[1]/int-rad</property>
|
||||
<value>2</value>
|
||||
<value>1</value>
|
||||
<condition>
|
||||
<not>
|
||||
<equals>
|
||||
<property>controls/audio/acp[1]/int-rad</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
</not>
|
||||
</condition>
|
||||
</binding>
|
||||
</action>
|
||||
<action>
|
||||
<button>1</button>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>controls/audio/acp[1]/int-rad</property>
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>controls/audio/acp[1]/int-rad</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
</condition>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>controls/audio/acp[1]/int-rad</property>
|
||||
<value>0</value>
|
||||
<condition>
|
||||
<not>
|
||||
<equals>
|
||||
<property>controls/audio/acp[1]/int-rad</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
</not>
|
||||
</condition>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</action>
|
||||
<action>
|
||||
<button>1</button>
|
||||
<binding>
|
||||
<command>property-cycle</command>
|
||||
<property>controls/audio/acp[1]/int-rad</property>
|
||||
<value>2</value>
|
||||
<value>0</value>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>rotate</type>
|
||||
<object-name>audio_int_rad</object-name>
|
||||
|
|
|
@ -100,7 +100,7 @@ var highFrequencyRadio = {
|
|||
}
|
||||
},
|
||||
datalink: func() {
|
||||
if (me.powerNode.getValue() < 115) {
|
||||
if (me.powerNode.getValue() < 110) {
|
||||
me.datalinkConnected = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -118,33 +118,41 @@ var HFS = [highFrequencyRadio.new(systems.ELEC.Bus.acEssShed, 0), highFrequencyR
|
|||
# Can't use setlistener on the voltage as it always gets written to by JSB (and changes according to engine rpm)
|
||||
|
||||
var update_items_HF_radio = [
|
||||
props.UpdateManager.FromHashValue("elecACEssShed", 0.1, func(val)
|
||||
props.UpdateManager.FromHashValue("elecACEssShed", 0.2, func(val)
|
||||
{
|
||||
if (val < 110) {
|
||||
HFS[0].transmit = 0;
|
||||
HFS[0].receptionProp.setValue(0);
|
||||
toneTimer1.stop();
|
||||
transmitTimer1.stop();
|
||||
HFS[0].toneControl.setValue(0);
|
||||
HFS[0]._toneTime = nil;
|
||||
ecam.transmitFlag1 = 0;
|
||||
if (HFS[0].receptionProp.getBoolValue()) {
|
||||
HFS[0].transmit = 0;
|
||||
HFS[0].receptionProp.setValue(0);
|
||||
toneTimer1.stop();
|
||||
transmitTimer1.stop();
|
||||
HFS[0].toneControl.setValue(0);
|
||||
HFS[0]._toneTime = nil;
|
||||
ecam.transmitFlag1 = 0;
|
||||
}
|
||||
} else {
|
||||
HFS[0].receptionProp.setValue(1);
|
||||
if (!HFS[0].receptionProp.getBoolValue()) {
|
||||
HFS[0].receptionProp.setValue(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
),
|
||||
props.UpdateManager.FromHashValue("elecAC2", 0.1, func(val)
|
||||
props.UpdateManager.FromHashValue("elecAC2", 0.2, func(val)
|
||||
{
|
||||
if (val) {
|
||||
HFS[1].transmit = 0;
|
||||
HFS[1].receptionProp.setValue(0);
|
||||
toneTimer2.stop();
|
||||
transmitTimer2.stop();
|
||||
HFS[1].toneControl.setValue(0);
|
||||
HFS[1]._toneTime = nil;
|
||||
ecam.transmitFlag2 = 0;
|
||||
if (val < 110) {
|
||||
if (HFS[1].receptionProp.getBoolValue()) {
|
||||
HFS[1].transmit = 0;
|
||||
HFS[1].receptionProp.setValue(0);
|
||||
toneTimer2.stop();
|
||||
transmitTimer2.stop();
|
||||
HFS[1].toneControl.setValue(0);
|
||||
HFS[1]._toneTime = nil;
|
||||
ecam.transmitFlag2 = 0;
|
||||
}
|
||||
} else {
|
||||
HFS[1].receptionProp.setValue(1);
|
||||
if (!HFS[1].receptionProp.getBoolValue()) {
|
||||
HFS[1].receptionProp.setValue(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
),
|
||||
|
@ -178,4 +186,4 @@ var transmitTimer1 = maketimer(1, func() {
|
|||
|
||||
var transmitTimer2 = maketimer(1, func() {
|
||||
HFS[1].monitorPTT();
|
||||
});
|
||||
});
|
|
@ -1618,6 +1618,7 @@
|
|||
<hftone>
|
||||
<name>HF PTT tone</name>
|
||||
<mode>looped</mode>
|
||||
<type>avionics</type>
|
||||
<path>Aircraft/A320-family/Sounds/Cockpit/1000hz.wav</path>
|
||||
<condition>
|
||||
<and>
|
||||
|
@ -1635,6 +1636,7 @@
|
|||
<hftone>
|
||||
<name>HF PTT tone 2</name>
|
||||
<mode>looped</mode>
|
||||
<type>avionics</type>
|
||||
<path>Aircraft/A320-family/Sounds/Cockpit/1000hz.wav</path>
|
||||
<condition>
|
||||
<and>
|
||||
|
@ -1652,6 +1654,7 @@
|
|||
<hfstatic>
|
||||
<name>HF static</name>
|
||||
<mode>looped</mode>
|
||||
<type>avionics</type>
|
||||
<path>Aircraft/A320-family/Sounds/Cockpit/hf-radio-static.wav</path>
|
||||
<condition>
|
||||
<and>
|
||||
|
@ -1670,6 +1673,7 @@
|
|||
<hfstatic>
|
||||
<name>HF static 2</name>
|
||||
<mode>looped</mode>
|
||||
<type>avionics</type>
|
||||
<path>Aircraft/A320-family/Sounds/Cockpit/hf-radio-static.wav</path>
|
||||
<condition>
|
||||
<and>
|
||||
|
|
Loading…
Reference in a new issue