This repository has been archived on 2021-09-26. You can view files and clone it, but cannot push or open issues or pull requests.
IDG-A32X/Models/Instruments/mCDU/f-pln/index_f1.xml

197 lines
5.6 KiB
XML
Raw Normal View History

<?xml version="1.0"?>
<PropertyList>
<path>index_f1.ac</path>
<!-- mCDU Display Brightness -->
<animation>
<type>material</type>
<object-name>white</object-name>
<emission>
<red>1</red>
<green>1</green>
<blue>1</blue>
<factor-prop>/instrumentation/mcdu/brt</factor-prop>
</emission>
</animation>
<!-- Button Pick Animations -->
<animation>
<type>pick</type>
<object-name>l1</object-name>
<action>
<button>0</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>nasal</command>
<script>
var f_pln_disp = "/instrumentation/mcdu/f-pln/disp/";
var cur = getprop(f_pln_disp~ 'current-flightplan');
if(cur == 'temporary'){
setprop(f_pln_disp~ 'current-flightplan', '');
fmgc.RouteManager.deleteFlightPlan('temporary');
setprop("/instrumentation/mcdu/page", "f-pln");
setprop("/instrumentation/mcdu/f-pln/enabling-altn", 0);
mcdu.f_pln.update_disp();
} else {
setprop("/autopilot/route-manager/destination/airport", "");
setprop("/instrumentation/mcdu/f-pln/enabling-altn", 0);
setprop("/autopilot/route-manager/input", "@CLEAR");
}
mcdu.lat_rev.tmpy_fplan = nil;
</script>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>l6</object-name>
<action>
<button>0</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>nasal</command>
<script>
setprop("/instrumentation/mcdu/page", "f-pln");
mcdu.f_pln.update_disp();
</script>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>l2</object-name>
<action>
<button>0</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>nasal</command>
<script>
var last_wp = getprop("/autopilot/route-manager/route/num") - 1;
setprop("/autopilot/route-manager/input", "@INSERT" ~ last_wp ~ ":" ~ getprop("/instrumentation/mcdu/input"));
mcdu.clear_inp();
</script>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>l3</object-name>
<action>
<button>0</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>nasal</command>
<script>
var actv = getprop('autopilot/route-manager/active');
if(!actv){
setprop("/autopilot/route-manager/input", "@ACTIVATE");
setprop("/autopilot/route-manager/input", "@JUMP1"); # Assumes WP0 is Departure ICAO
setprop("/flight-management/current-wp", 1); # Backup Waypoint holder for confirmed transition
setprop('/flight-management/dir-to', 0);
setprop('/instrumentation/mcdu/f-pln/dir-to-mode', 1);
if(getprop("/flight-management/control/lat-ctrl") == 'fmgc')
setprop("/flight-management/control/lat-ctrl", 'man-set');
setprop("/flight-management/control/lat-ctrl", 'fmgc');
} else {
var f_pln_disp = "/instrumentation/mcdu/f-pln/disp/";
var cur_fp = getprop(f_pln_disp~ 'current-flightplan');
if(cur_fp == 'temporary'){
#setprop("/autopilot/route-manager/input", "@CLEAR");
if(getprop("/instrumentation/mcdu/f-pln/enabling-altn")){
fmgc.RouteManager.deleteAlternateDestination();
setprop("/instrumentation/mcdu/f-pln/enabling-altn", 0);
}
fmgc.RouteManager.copyFlightPlanToActive('temporary', 1);
mcdu.f_pln.tmpy_fplan = nil;
mcdu.lat_rev.tmpy_fplan = nil;
setprop(f_pln_disp~ 'current-flightplan', '');
if(getprop('/instrumentation/mcdu/f-pln/dir-to-mode')){
setprop('/instrumentation/mcdu/f-pln/dir-to-mode', 0);
var dir_to = getprop('/flight-management/dir-to');
if(dir_to) {
setprop("/autopilot/route-manager/input", "@JUMP"~ dir_to);
setprop("/flight-management/current-wp", 1);
}
setprop('/flight-management/dir-to',0);
}
if(getprop("/flight-management/control/lat-ctrl") == 'fmgc'){
setprop("/flight-management/control/lat-ctrl", 'man-set');
setprop("/flight-management/control/lat-ctrl", 'fmgc');
}
#setprop("/autopilot/route-manager/input", "@ACTIVATE");
}
}
</script>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>r1</object-name>
<action>
<button>0</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>nasal</command>
<script>
mcdu.user.load_rte_list();
setprop("/instrumentation/mcdu/page", "load_rtes");
</script>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>r2</object-name>
<action>
<button>0</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>nasal</command>
<script>
var input = getprop("/instrumentation/mcdu/input");
if ((input != nil) and (input != "f-pln")) {
mcdu.user.save_user_rte(input);
}
setprop("/instrumentation/mcdu/page", "f-pln");
</script>
</binding>
</action>
</animation>
<animation>
<type>select</type>
<object-name>active</object-name>
<condition>
<or>
<not>
<property>/autopilot/route-manager/active</property>
</not>
<equals>
<property>/instrumentation/mcdu/f-pln/disp/current-flightplan</property>
<value>temporary</value>
</equals>
</or>
</condition>
</animation>
</PropertyList>