1
0
Fork 0

FG1000 - Fix GDU-1045 Autopilot buttons

Previously the GDU-1045 displays autopilot buttons didn't
work because they were missing a required <offset> element
for the FG1000HardKeyPushed command.  This fixes that, as
well as adding a verification script using xmllint and also
fixing a the NAV button which was incorrectly mapped to FD.
This commit is contained in:
Stuart Buchanan 2023-11-03 16:57:57 +00:00
parent 2b47c8ac61
commit 41ccf88618
6 changed files with 96 additions and 5 deletions

View file

@ -300,6 +300,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>AP</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -320,6 +321,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>FD</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -339,7 +341,8 @@
<binding>
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>FD</notification>
<notification>NAV</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -360,6 +363,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>ALT</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -380,6 +384,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>VS</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -400,6 +405,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>FLC</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -420,6 +426,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>YD</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -440,6 +447,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>HDG</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -460,6 +468,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>APR</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -480,6 +489,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>VNV</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -500,6 +510,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>NOSE_UP</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -520,6 +531,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>NOSE_DOWN</notification>
<offset>1</offset>
</binding>
</action>
<hovered>

View file

@ -300,6 +300,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>AP</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -320,6 +321,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>FD</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -339,7 +341,8 @@
<binding>
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>FD</notification>
<notification>NAV</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -360,6 +363,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>ALT</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -380,6 +384,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>VS</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -400,6 +405,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>FLC</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -420,6 +426,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>YD</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -440,6 +447,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>HDG</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -460,6 +468,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>APR</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -480,6 +489,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>VNV</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -500,6 +510,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>NOSE_UP</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -520,6 +531,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>NOSE_DOWN</notification>
<offset>1</offset>
</binding>
</action>
<hovered>

View file

@ -300,6 +300,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>AP</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -320,6 +321,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>FD</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -339,7 +341,8 @@
<binding>
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>FD</notification>
<notification>NAV</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -360,6 +363,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>ALT</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -380,6 +384,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>VS</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -400,6 +405,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>FLC</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -420,6 +426,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>YD</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -440,6 +447,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>HDG</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -460,6 +468,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>APR</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -480,6 +489,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>VNV</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -500,6 +510,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>NOSE_UP</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -520,6 +531,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>NOSE_DOWN</notification>
<offset>1</offset>
</binding>
</action>
<hovered>

View file

@ -300,6 +300,7 @@
<command>FG1000HardKeyPushed</command>
<device>4</device>
<notification>AP</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -320,6 +321,7 @@
<command>FG1000HardKeyPushed</command>
<device>4</device>
<notification>FD</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -339,7 +341,8 @@
<binding>
<command>FG1000HardKeyPushed</command>
<device>4</device>
<notification>FD</notification>
<notification>NAV</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -360,6 +363,7 @@
<command>FG1000HardKeyPushed</command>
<device>4</device>
<notification>ALT</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -380,6 +384,7 @@
<command>FG1000HardKeyPushed</command>
<device>4</device>
<notification>VS</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -400,6 +405,7 @@
<command>FG1000HardKeyPushed</command>
<device>4</device>
<notification>FLC</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -420,6 +426,7 @@
<command>FG1000HardKeyPushed</command>
<device>4</device>
<notification>YD</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -440,6 +447,7 @@
<command>FG1000HardKeyPushed</command>
<device>4</device>
<notification>HDG</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -460,6 +468,7 @@
<command>FG1000HardKeyPushed</command>
<device>4</device>
<notification>APR</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -467,6 +476,7 @@
<command>set-tooltip</command>
<tooltip-id>AP.R2</tooltip-id>
<label>Select AP Approach mode</label>
<offset>1</offset>
</binding>
</hovered>
</animation>
@ -480,6 +490,7 @@
<command>FG1000HardKeyPushed</command>
<device>4</device>
<notification>VNV</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -500,6 +511,7 @@
<command>FG1000HardKeyPushed</command>
<device>4</device>
<notification>NOSE_UP</notification>
<offset>1</offset>
</binding>
</action>
<hovered>
@ -520,6 +532,7 @@
<command>FG1000HardKeyPushed</command>
<device>4</device>
<notification>NOSE_DOWN</notification>
<offset>1</offset>
</binding>
</action>
<hovered>

View file

@ -0,0 +1,41 @@
#!/usr/bin/bash
#
# Simple check that any animations for FG1000HardKeyPushed have the correct elements
echo "Checking for notification element"
for i in *.xml;
do
foo=$(xmllint --xpath "PropertyList/animation//binding[command[text()=\"FG1000HardKeyPushed\"]][not(notification)]" $i 2>&1)
if [[ $? -eq 0 ]]
then
echo "$i : FG1000HardKeyPushed animation missing \<name\> element."
else
echo "$i : OK"
fi
done
echo "Checking for device element"
for i in *.xml;
do
foo=$(xmllint --xpath "PropertyList/animation//binding[command[text()=\"FG1000HardKeyPushed\"]][not(device)]" $i 2>&1)
if [[ $? -eq 0 ]]
then
echo "$i : FG1000HardKeyPushed animation missing \<device\> element. (Should match \"N\" in GDUXXXX.N.xml"
else
echo "$i : OK"
fi
done
# This checks for offset, which should be present for anything other than a "knob" animation.
echo "Checking for offset element"
for i in *.xml;
do
foo=$(xmllint --xpath "PropertyList/animation[type[text()!=\"knob\"]]//binding[command[text()=\"FG1000HardKeyPushed\"]][not(offset)]" $i 2>&1)
if [[ $? -eq 0 ]]
then
echo "$i : FG1000HardKeyPushed pick animation missing \<offset\>1\</offset\>"
else
echo "$i : OK"
fi
done

View file

@ -23,7 +23,8 @@ addcommand("FG1000HardKeyPushed",
var device = node.getNode("device", 1).getValue();
var name = node.getNode("notification",1).getValue();
# The knob animation stores the value as an offset property
# The knob animation stores the value as an offset property. Other animations need to set this
# explicitly int the animation code.
var value = node.getNode("offset", 1).getValue();
if (name == nil) {