A3XX: Improve PFD Box Logic, Add AP, FD, and A/THR Boxes
This commit is contained in:
parent
0777562bea
commit
1279ebef2d
4 changed files with 353 additions and 27 deletions
|
@ -951,7 +951,7 @@
|
|||
<offsets>
|
||||
<x-m>0.00091828</x-m>
|
||||
<y-m>0.0326226</y-m>
|
||||
<z-m>0.0581781</z-m>
|
||||
<z-m>0.0591781</z-m>
|
||||
</offsets>
|
||||
<alignment>center-center</alignment>
|
||||
<axis-alignment>yz-plane</axis-alignment>
|
||||
|
@ -975,7 +975,7 @@
|
|||
<offsets>
|
||||
<x-m>0.00091828</x-m>
|
||||
<y-m>0.0436226</y-m>
|
||||
<z-m>0.0581781</z-m>
|
||||
<z-m>0.0591781</z-m>
|
||||
</offsets>
|
||||
<alignment>center-center</alignment>
|
||||
<axis-alignment>yz-plane</axis-alignment>
|
||||
|
@ -1715,12 +1715,75 @@
|
|||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>ap-mode-box</object-name>
|
||||
<condition>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/modes/pfd/fma/ap-mode-box</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</and>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>fd-mode-box</object-name>
|
||||
<condition>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/modes/pfd/fma/fd-mode-box</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</and>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>athr-mode-box</object-name>
|
||||
<condition>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/modes/pfd/fma/athr-mode-box</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/athr</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</and>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<text>
|
||||
<name>ap-mode-fma</name>
|
||||
<offsets>
|
||||
<x-m>0.00091828</x-m>
|
||||
<y-m>0.0656226</y-m>
|
||||
<z-m>0.0730781</z-m>
|
||||
<z-m>0.0734781</z-m>
|
||||
</offsets>
|
||||
<alignment>center-center</alignment>
|
||||
<axis-alignment>yz-plane</axis-alignment>
|
||||
|
@ -1744,7 +1807,7 @@
|
|||
<offsets>
|
||||
<x-m>0.00091828</x-m>
|
||||
<y-m>0.0656226</y-m>
|
||||
<z-m>0.0655781</z-m>
|
||||
<z-m>0.0662781</z-m>
|
||||
</offsets>
|
||||
<alignment>center-center</alignment>
|
||||
<axis-alignment>yz-plane</axis-alignment>
|
||||
|
@ -1768,7 +1831,7 @@
|
|||
<offsets>
|
||||
<x-m>0.00091828</x-m>
|
||||
<y-m>0.0656226</y-m>
|
||||
<z-m>0.0581781</z-m>
|
||||
<z-m>0.0591781</z-m>
|
||||
</offsets>
|
||||
<alignment>center-center</alignment>
|
||||
<axis-alignment>yz-plane</axis-alignment>
|
||||
|
@ -1792,7 +1855,7 @@
|
|||
<offsets>
|
||||
<x-m>0.00091828</x-m>
|
||||
<y-m>0.0656226</y-m>
|
||||
<z-m>0.0581781</z-m>
|
||||
<z-m>0.0591781</z-m>
|
||||
</offsets>
|
||||
<alignment>center-center</alignment>
|
||||
<axis-alignment>yz-plane</axis-alignment>
|
||||
|
|
|
@ -951,7 +951,7 @@
|
|||
<offsets>
|
||||
<x-m>0.00091828</x-m>
|
||||
<y-m>0.0326226</y-m>
|
||||
<z-m>0.0581781</z-m>
|
||||
<z-m>0.0591781</z-m>
|
||||
</offsets>
|
||||
<alignment>center-center</alignment>
|
||||
<axis-alignment>yz-plane</axis-alignment>
|
||||
|
@ -975,7 +975,7 @@
|
|||
<offsets>
|
||||
<x-m>0.00091828</x-m>
|
||||
<y-m>0.0436226</y-m>
|
||||
<z-m>0.0581781</z-m>
|
||||
<z-m>0.0591781</z-m>
|
||||
</offsets>
|
||||
<alignment>center-center</alignment>
|
||||
<axis-alignment>yz-plane</axis-alignment>
|
||||
|
@ -1715,12 +1715,75 @@
|
|||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>ap-mode-box</object-name>
|
||||
<condition>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/modes/pfd/fma/ap-mode-box</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</and>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>fd-mode-box</object-name>
|
||||
<condition>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/modes/pfd/fma/fd-mode-box</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</and>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>athr-mode-box</object-name>
|
||||
<condition>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/modes/pfd/fma/athr-mode-box</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/athr</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</and>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<text>
|
||||
<name>ap-mode-fma</name>
|
||||
<offsets>
|
||||
<x-m>0.00091828</x-m>
|
||||
<y-m>0.0656226</y-m>
|
||||
<z-m>0.0730781</z-m>
|
||||
<z-m>0.0734781</z-m>
|
||||
</offsets>
|
||||
<alignment>center-center</alignment>
|
||||
<axis-alignment>yz-plane</axis-alignment>
|
||||
|
@ -1744,7 +1807,7 @@
|
|||
<offsets>
|
||||
<x-m>0.00091828</x-m>
|
||||
<y-m>0.0656226</y-m>
|
||||
<z-m>0.0655781</z-m>
|
||||
<z-m>0.0662781</z-m>
|
||||
</offsets>
|
||||
<alignment>center-center</alignment>
|
||||
<axis-alignment>yz-plane</axis-alignment>
|
||||
|
@ -1768,7 +1831,7 @@
|
|||
<offsets>
|
||||
<x-m>0.00091828</x-m>
|
||||
<y-m>0.0656226</y-m>
|
||||
<z-m>0.0581781</z-m>
|
||||
<z-m>0.0591781</z-m>
|
||||
</offsets>
|
||||
<alignment>center-center</alignment>
|
||||
<axis-alignment>yz-plane</axis-alignment>
|
||||
|
@ -1792,7 +1855,7 @@
|
|||
<offsets>
|
||||
<x-m>0.00091828</x-m>
|
||||
<y-m>0.0656226</y-m>
|
||||
<z-m>0.0581781</z-m>
|
||||
<z-m>0.0591781</z-m>
|
||||
</offsets>
|
||||
<alignment>center-center</alignment>
|
||||
<axis-alignment>yz-plane</axis-alignment>
|
||||
|
|
|
@ -2,7 +2,169 @@ AC3Db
|
|||
MATERIAL "ac3dmat1" rgb 1 1 1 amb 0 0 0 emis 0.658824 0.670588 0.67451 spec 0 0 0 shi 128 trans 0
|
||||
MATERIAL "white" rgb 1 1 1 amb 1 1 1 emis 0.798 0.798 0.798 spec 0 0 0 shi 0 trans 0
|
||||
OBJECT world
|
||||
kids 40
|
||||
kids 43
|
||||
OBJECT poly
|
||||
name "ap-mode-box"
|
||||
loc 0.000380651 0.0723146 -0.0618702
|
||||
data 6
|
||||
Circle
|
||||
texture "box.png"
|
||||
crease 30.000000
|
||||
numvert 16
|
||||
0 -0.00181733 -0.0133333
|
||||
0 -0.00242402 -0.0133333
|
||||
0 -0.00242405 0.0055541
|
||||
0 -0.00181733 0.0055541
|
||||
0 0.00457313 -0.0133093
|
||||
0 0.00396641 -0.0133093
|
||||
0 0.00396641 0.0055497
|
||||
0 0.00457313 0.0055497
|
||||
0 0.00462594 0.00618576
|
||||
0 0.00462594 0.00557906
|
||||
0 -0.00248282 0.00557906
|
||||
0 -0.00248282 0.00618576
|
||||
0 0.00466499 -0.013348
|
||||
0 0.00466499 -0.0139547
|
||||
0 -0.00244378 -0.0139547
|
||||
0 -0.00244378 -0.013348
|
||||
numsurf 4
|
||||
SURF 0x0
|
||||
mat 1
|
||||
refs 4
|
||||
3 0.654297 0.439453
|
||||
2 0.679687 0.439453
|
||||
1 0.679687 0.464844
|
||||
0 0.654297 0.464844
|
||||
SURF 0x0
|
||||
mat 1
|
||||
refs 4
|
||||
7 0.654297 0.439453
|
||||
6 0.679687 0.439453
|
||||
5 0.679687 0.464844
|
||||
4 0.654297 0.464844
|
||||
SURF 0x0
|
||||
mat 1
|
||||
refs 4
|
||||
11 0.654297 0.439453
|
||||
10 0.679687 0.439453
|
||||
9 0.679687 0.464844
|
||||
8 0.654297 0.464844
|
||||
SURF 0x0
|
||||
mat 1
|
||||
refs 4
|
||||
15 0.654297 0.439453
|
||||
14 0.679687 0.439453
|
||||
13 0.679687 0.464844
|
||||
12 0.654297 0.464844
|
||||
kids 0
|
||||
OBJECT poly
|
||||
name "fd-mode-box"
|
||||
loc 0.000380651 0.0652178 -0.0618702
|
||||
data 6
|
||||
Circle
|
||||
texture "box.png"
|
||||
crease 30.000000
|
||||
numvert 16
|
||||
0 -0.00244378 -0.013348
|
||||
0 -0.00244378 -0.0139547
|
||||
0 0.00466499 -0.0139547
|
||||
0 0.00466499 -0.013348
|
||||
0 -0.00248282 0.00618576
|
||||
0 -0.00248282 0.00557906
|
||||
0 0.00462594 0.00557906
|
||||
0 0.00462594 0.00618576
|
||||
0 0.00457313 0.0055497
|
||||
0 0.00396641 0.0055497
|
||||
0 0.00396641 -0.0133093
|
||||
0 0.00457313 -0.0133093
|
||||
0 -0.00181733 0.0055541
|
||||
0 -0.00242405 0.0055541
|
||||
0 -0.00242402 -0.0133333
|
||||
0 -0.00181733 -0.0133333
|
||||
numsurf 4
|
||||
SURF 0x0
|
||||
mat 1
|
||||
refs 4
|
||||
0 0.654297 0.439453
|
||||
1 0.679687 0.439453
|
||||
2 0.679687 0.464844
|
||||
3 0.654297 0.464844
|
||||
SURF 0x0
|
||||
mat 1
|
||||
refs 4
|
||||
4 0.654297 0.439453
|
||||
5 0.679687 0.439453
|
||||
6 0.679687 0.464844
|
||||
7 0.654297 0.464844
|
||||
SURF 0x0
|
||||
mat 1
|
||||
refs 4
|
||||
8 0.654297 0.439453
|
||||
9 0.679687 0.439453
|
||||
10 0.679687 0.464844
|
||||
11 0.654297 0.464844
|
||||
SURF 0x0
|
||||
mat 1
|
||||
refs 4
|
||||
12 0.654297 0.439453
|
||||
13 0.679687 0.439453
|
||||
14 0.679687 0.464844
|
||||
15 0.654297 0.464844
|
||||
kids 0
|
||||
OBJECT poly
|
||||
name "athr-mode-box"
|
||||
loc 0.000380651 0.0581517 -0.0618702
|
||||
data 6
|
||||
Circle
|
||||
texture "box.png"
|
||||
crease 30.000000
|
||||
numvert 16
|
||||
0 -0.00181732 -0.0133333
|
||||
0 -0.00242402 -0.0133333
|
||||
0 -0.00242404 0.0055541
|
||||
0 -0.00181733 0.0055541
|
||||
0 0.00457314 -0.0133093
|
||||
0 0.00396642 -0.0133093
|
||||
0 0.00396642 0.0055497
|
||||
0 0.00457314 0.0055497
|
||||
0 0.00462595 0.00618576
|
||||
0 0.00462595 0.00557906
|
||||
0 -0.00248282 0.00557906
|
||||
0 -0.00248282 0.00618576
|
||||
0 0.004665 -0.013348
|
||||
0 0.004665 -0.0139547
|
||||
0 -0.00244377 -0.0139547
|
||||
0 -0.00244377 -0.013348
|
||||
numsurf 4
|
||||
SURF 0x0
|
||||
mat 1
|
||||
refs 4
|
||||
3 0.654297 0.439453
|
||||
2 0.679687 0.439453
|
||||
1 0.679687 0.464844
|
||||
0 0.654297 0.464844
|
||||
SURF 0x0
|
||||
mat 1
|
||||
refs 4
|
||||
7 0.654297 0.439453
|
||||
6 0.679687 0.439453
|
||||
5 0.679687 0.464844
|
||||
4 0.654297 0.464844
|
||||
SURF 0x0
|
||||
mat 1
|
||||
refs 4
|
||||
11 0.654297 0.439453
|
||||
10 0.679687 0.439453
|
||||
9 0.679687 0.464844
|
||||
8 0.654297 0.464844
|
||||
SURF 0x0
|
||||
mat 1
|
||||
refs 4
|
||||
15 0.654297 0.439453
|
||||
14 0.679687 0.439453
|
||||
13 0.679687 0.464844
|
||||
12 0.654297 0.464844
|
||||
kids 0
|
||||
OBJECT poly
|
||||
name "throttle-mode-box"
|
||||
loc 0.000380651 0.0698612 0.054728
|
||||
|
|
|
@ -208,13 +208,14 @@ setlistener("/it-autoflight/output/appr-armed", func {
|
|||
var ap = func {
|
||||
var ap1 = getprop("/it-autoflight/output/ap1");
|
||||
var ap2 = getprop("/it-autoflight/output/ap2");
|
||||
if (ap1 and ap2) {
|
||||
var newap = getprop("/modes/pfd/fma/ap-mode");
|
||||
if (ap1 and ap2 and newap != "AP1+2") {
|
||||
setprop("/modes/pfd/fma/ap-mode", "AP1+2");
|
||||
} else if (ap1 and !ap2) {
|
||||
} else if (ap1 and !ap2 and newap != "AP1") {
|
||||
setprop("/modes/pfd/fma/ap-mode", "AP1");
|
||||
} else if (ap2 and !ap1) {
|
||||
} else if (ap2 and !ap1 and newap != "AP2") {
|
||||
setprop("/modes/pfd/fma/ap-mode", "AP2");
|
||||
} else {
|
||||
} else if (!ap1 and !ap2) {
|
||||
setprop("/modes/pfd/fma/ap-mode", " ");
|
||||
}
|
||||
}
|
||||
|
@ -223,13 +224,14 @@ var ap = func {
|
|||
var fd = func {
|
||||
var fd1 = getprop("/it-autoflight/output/fd1");
|
||||
var fd2 = getprop("/it-autoflight/output/fd2");
|
||||
if (fd1 and fd2) {
|
||||
var newfd = getprop("/modes/pfd/fma/fd-mode");
|
||||
if (fd1 and fd2 and newfd != "1FD2") {
|
||||
setprop("/modes/pfd/fma/fd-mode", "1FD2");
|
||||
} else if (fd1 and !fd2) {
|
||||
} else if (fd1 and !fd2 and newfd != "1FD-") {
|
||||
setprop("/modes/pfd/fma/fd-mode", "1FD-");
|
||||
} else if (fd2 and !fd1) {
|
||||
} else if (fd2 and !fd1 and newfd != "-FD2") {
|
||||
setprop("/modes/pfd/fma/fd-mode", "-FD2");
|
||||
} else {
|
||||
} else if (!fd1 and !fd2) {
|
||||
setprop("/modes/pfd/fma/fd-mode", " ");
|
||||
}
|
||||
}
|
||||
|
@ -237,9 +239,10 @@ var fd = func {
|
|||
# AT
|
||||
var at = func {
|
||||
var at = getprop("/it-autoflight/output/athr");
|
||||
if (at) {
|
||||
var newat = getprop("/modes/pfd/fma/at-mode");
|
||||
if (at and newat != "A/THR") {
|
||||
setprop("/modes/pfd/fma/at-mode", "A/THR");
|
||||
} else {
|
||||
} else if (!at) {
|
||||
setprop("/modes/pfd/fma/at-mode", " ");
|
||||
}
|
||||
}
|
||||
|
@ -323,11 +326,46 @@ setlistener("/it-autoflight/output/athr", func {
|
|||
});
|
||||
|
||||
# Boxes
|
||||
setlistener("/modes/pfd/fma/ap-mode", func {
|
||||
if (getprop("/modes/pfd/fma/ap-mode") != " ") {
|
||||
setprop("/modes/pfd/fma/ap-mode-box", 1);
|
||||
settimer(func {
|
||||
setprop("/modes/pfd/fma/ap-mode-box", 0);
|
||||
}, 5);
|
||||
}
|
||||
});
|
||||
|
||||
setlistener("/modes/pfd/fma/fd-mode", func {
|
||||
if (getprop("/modes/pfd/fma/fd-mode") != " ") {
|
||||
setprop("/modes/pfd/fma/fd-mode-box", 1);
|
||||
settimer(func {
|
||||
setprop("/modes/pfd/fma/fd-mode-box", 0);
|
||||
}, 5);
|
||||
}
|
||||
});
|
||||
|
||||
setlistener("/modes/pfd/fma/at-mode", func {
|
||||
if (getprop("/modes/pfd/fma/at-mode") != " ") {
|
||||
setprop("/modes/pfd/fma/throttle-mode-box", 1);
|
||||
settimer(func {
|
||||
setprop("/modes/pfd/fma/throttle-mode-box", 0);
|
||||
}, 5);
|
||||
setprop("/modes/pfd/fma/athr-mode-box", 1);
|
||||
settimer(func {
|
||||
setprop("/modes/pfd/fma/athr-mode-box", 0);
|
||||
}, 5);
|
||||
}
|
||||
});
|
||||
|
||||
setlistener("/modes/pfd/fma/throttle-mode", func {
|
||||
setprop("/modes/pfd/fma/throttle-mode-box", 1);
|
||||
settimer(func {
|
||||
setprop("/modes/pfd/fma/throttle-mode-box", 0);
|
||||
}, 5);
|
||||
var state1 = getprop("/systems/thrust/state1");
|
||||
var state2 = getprop("/systems/thrust/state2");
|
||||
if (getprop("/it-autoflight/output/athr") == 1 and state1 != "MCT" and state2 != "MCT" and state1 != "MAN THR" and state2 != "MAN THR" and state1 != "TOGA" and state2 != "TOGA" and state1 != "IDLE" and state2 != "IDLE") {
|
||||
setprop("/modes/pfd/fma/throttle-mode-box", 1);
|
||||
settimer(func {
|
||||
setprop("/modes/pfd/fma/throttle-mode-box", 0);
|
||||
}, 5);
|
||||
}
|
||||
});
|
||||
|
||||
setlistener("/modes/pfd/fma/roll-mode", func {
|
||||
|
|
Reference in a new issue