Hello
i've made some improvement on the TCA sidestick and throttle code (only works with A320)
new AP disconnect button code
- Code: Select all
<button n="3">
<desc type="string">Custom</desc>
<binding>
<command>nasal</command>
<script>
if (getprop("it-autoflight/output/ap-warning") == 1) {
setprop("it-autoflight/output/ap-warning", 0);
setprop("ECAM/warnings/master-warning-light", 0);
}
if (getprop("it-autoflight/sound/apoffsound") == 1 or getprop("it-autoflight/sound/apoffsound2") == 1) {
setprop("it-autoflight/sound/apoffsound", 0);
setprop("it-autoflight/sound/apoffsound2", 0);
}
</script>
</binding>
<binding>
<condition>
<or>
<property>it-autoflight/output/ap1</property>
<property>it-autoflight/output/ap2</property>
</or>
</condition>
<command>nasal</command>
<script>
fcu.FCUController.APDisc();
setprop("/sim/sounde/apdiscbtn", 1);
</script>
</binding>
<repeatable type="double">0</repeatable>
</button>
New reversers code and throttle detents :
- Code: Select all
<button n="11">
<desc type="string">Custom</desc>
<repeatable type="string">false</repeatable>
<binding>
<command type="string">nasal</command>
<script type="string">
if (pts.Systems.Thrust.state[0].getValue() == "IDLE" and pts.Controls.Engines.Engine.reverser[0].getValue() == 0 and pts.Controls.Engines.Engine.reverser[0].getValue() == 0 and pts.Gear.wow[1].getValue() == 1 and pts.Gear.wow[2].getValue() == 1) {
if (pts.Sim.Input.Selected.engine[0].getBoolValue()) {
interpolate("/engines/engine[0]/reverser-pos-norm", 1, 1.4);
pts.Controls.Engines.Engine.reverser[0].setValue(1);
pts.Controls.Engines.Engine.throttleRev[0].setValue(0.65);
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[0].setValue(3.14);
}
}
</script>
</binding>
<mod-up>
<binding>
<command type="string">nasal</command>
<script type="string">
if (pts.Controls.Engines.Engine.reverser[0].getValue() == 1) {
interpolate("/engines/engine[0]/reverser-pos-norm", 0, 1.0);
pts.Controls.Engines.Engine.throttleRev[0].setValue(0);
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[0].setValue(0);
pts.Controls.Engines.Engine.reverser[0].setValue(0);
}
</script>
</binding>
</mod-up>
</button>
<button n="15">
<desc type="string">Custom</desc>
<repeatable type="string">false</repeatable>
<binding>
<command type="string">nasal</command>
<script type="string">
if (pts.Systems.Thrust.state[1].getValue() == "IDLE" and pts.Controls.Engines.Engine.reverser[1].getValue() == 0 and pts.Controls.Engines.Engine.reverser[1].getValue() == 0 and pts.Gear.wow[1].getValue() == 1 and pts.Gear.wow[2].getValue() == 1) {
if (pts.Sim.Input.Selected.engine[1].getBoolValue()) {
interpolate("/engines/engine[1]/reverser-pos-norm", 1, 1.4);
pts.Controls.Engines.Engine.reverser[1].setValue(1);
pts.Controls.Engines.Engine.throttleRev[1].setValue(0.65);
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[1].setValue(3.14);
}
}
</script>
</binding>
<mod-up>
<binding>
<command type="string">nasal</command>
<script type="string">
if (pts.Controls.Engines.Engine.reverser[1].getValue() == 1 or pts.Controls.Engines.Engine.reverser[1].getValue() == 1) {
interpolate("/engines/engine[1]/reverser-pos-norm", 0, 1.0);
pts.Controls.Engines.Engine.throttleRev[1].setValue(0);
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[1].setValue(0);
pts.Controls.Engines.Engine.reverser[1].setValue(0);
}
</script>
</binding>
</mod-up>
</button>
<button n="13">
<desc type="string">Custom</desc>
<repeatable type="string">true</repeatable>
<binding>
<command type="string">nasal</command>
<script>
setprop ("controls/engines/engine[1]/throttle", 0.80);
</script>
</binding>
</button>
<button n="14">
<desc type="string">Custom</desc>
<repeatable type="string">true</repeatable>
<binding>
<command type="string">nasal</command>
<script>
setprop ("controls/engines/engine[1]/throttle", 0.63);
</script>
</binding>
</button>
<button n="9">
<desc type="string">Custom</desc>
<repeatable type="string">true</repeatable>
<binding>
<command type="string">nasal</command>
<script>
setprop ("controls/engines/engine[0]/throttle", 0.80);
</script>
</binding>
</button>
<button n="10">
<desc type="string">Custom</desc>
<repeatable type="string">true</repeatable>
<binding>
<command type="string">nasal</command>
<script>
setprop ("controls/engines/engine[0]/throttle", 0.63);
</script>
</binding>
</button>
New authrottle Disconnect button code:
- Code: Select all
<button>
<desc type="string">Custom</desc>
<binding>
<command type="string">nasal</command>
<script type="string">
if (getprop("it-autoflight/output/athr") == 0 ){
if (getprop("it-autoflight/output/athr-warning") == 1) {
setprop("it-autoflight/output/athr-warning", 0);
setprop("ECAM/warnings/master-caution-light", 0);
}
}
</script>
<module type="string">__js1</module>
</binding>
<binding n="2">
<command type="string">nasal</command>
<script type="string">
if (getprop("it-autoflight/output/athr") == 1){
fcu.FCUController.ATDisc();
}
</script>
<module type="string">__js1</module>
</binding>
<repeatable type="double">0</repeatable>
</button>
<button n="1">
<desc type="string">Custom</desc>
<binding>
<command type="string">nasal</command>
<script type="string">
if (getprop("it-autoflight/output/athr") == 0 ){
if (getprop("it-autoflight/output/athr-warning") == 1) {
setprop("it-autoflight/output/athr-warning", 0);
setprop("ECAM/warnings/master-caution-light", 0);
}
}
</script>
<module type="string">__js1</module>
</binding>
<binding n="2">
<command type="string">nasal</command>
<script type="string">
if (getprop("it-autoflight/output/athr") == 1){
fcu.FCUController.ATDisc();
}
</script>
<module type="string">__js1</module>
</binding>
<repeatable type="double">0</repeatable>
</button>
-mohamed aissa