From 285da1f974bbfca8b222dada0d4d6ccffba59c50 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sun, 15 May 2022 22:49:53 +0100 Subject: [PATCH] Re-enable delegate sequencing; which will handle radial intercepts through the GPS controller --- Nasal/FMGC/flightplan-delegates.nas | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Nasal/FMGC/flightplan-delegates.nas b/Nasal/FMGC/flightplan-delegates.nas index aebe2bab..2bf1709a 100644 --- a/Nasal/FMGC/flightplan-delegates.nas +++ b/Nasal/FMGC/flightplan-delegates.nas @@ -122,7 +122,20 @@ var A320GPSDelegate = { sequence: func { - return; + if (!me.flightplan.active) + return; + + if (me._modeProp.getValue() == 'leg') { + if (me.flightplan.nextWP().wp_type == 'discontinuity') { + logprint(LOG_INFO, "default GPS sequencing DISCONTINUITY in flightplan, switching to HDG"); + # set HDG mode + } else { + logprint(LOG_INFO, "default GPS sequencing to next WP"); + me.flightplan.current = me.flightplan.current + 1; + } + } else { + # OBS, do nothing + } }, currentWaypointChanged: func