1
0
Fork 0

Navigate to correct waypoint from VERTREV

This commit is contained in:
Matthew Maring 2020-07-30 07:54:02 -04:00
parent 3bd1e28769
commit 981325f646

View file

@ -154,15 +154,17 @@ var vertRev = {
fmgc.windController.accessPage[me.computer] = "VERTREV"; fmgc.windController.accessPage[me.computer] = "VERTREV";
setprop("MCDU[" ~ me.computer ~ "]/page", "WINDDES"); setprop("MCDU[" ~ me.computer ~ "]/page", "WINDDES");
} else if (me.wp.wp_role == nil and me.wp.wp_type == "navaid") { } else if (me.wp.wp_role == nil and me.wp.wp_type == "navaid") {
if (canvas_mcdu.myCRZWIND[me.computer] == nil) {
cur_location = 0; cur_location = 0;
for (i = 0; i < size(fmgc.windController.nav_indicies[me.plan]); i += 1) { for (i = 0; i < size(fmgc.windController.nav_indicies[me.plan]); i += 1) {
if (fmgc.windController.nav_indicies[me.plan][i] == me.index) { if (fmgc.windController.nav_indicies[me.plan][i] == me.index) {
cur_location = i; cur_location = i;
} }
} }
if (canvas_mcdu.myCRZWIND[me.computer] == nil) {
canvas_mcdu.myCRZWIND[me.computer] = windCRZPage.new(me.computer, me.wp, cur_location); canvas_mcdu.myCRZWIND[me.computer] = windCRZPage.new(me.computer, me.wp, cur_location);
} else { } else {
canvas_mcdu.myCRZWIND[me.computer].waypoint = me.wp;
canvas_mcdu.myCRZWIND[me.computer].cur_location = cur_location;
canvas_mcdu.myCRZWIND[me.computer].reload(); canvas_mcdu.myCRZWIND[me.computer].reload();
} }
fmgc.windController.accessPage[me.computer] = "VERTREV"; fmgc.windController.accessPage[me.computer] = "VERTREV";