From 74868fee40819c178b2ead5fbdd384db11395005 Mon Sep 17 00:00:00 2001 From: Justin Wai Date: Mon, 22 Jul 2024 23:30:41 +0800 Subject: [PATCH] Only activate missed approach alarm from tag for twr if selected aircraft matches updated aircraft * Avoids trigger from other tower --- MissedApproach/MissedApproachAlarm.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/MissedApproach/MissedApproachAlarm.cpp b/MissedApproach/MissedApproachAlarm.cpp index f0284674..0f46a4b3 100644 --- a/MissedApproach/MissedApproachAlarm.cpp +++ b/MissedApproach/MissedApproachAlarm.cpp @@ -468,9 +468,11 @@ void MissedApproachAlarm::OnFlightPlanControllerAssignedDataUpdate(CFlightPlan F controllerData.SetScratchPadString(scratchPadString.c_str()); } else if (scratchPadString.find("MISAP_") != string::npos) { - // Trigger Alarm (TWR) - actButtonState = 1; - resetButtonState = -1; + // Trigger Alarm (TWR) if selected from tag + if (strcmp(selectedAcftData[0].c_str(), FlightPlan.GetCallsign()) == 0) { + actButtonState = 1; + resetButtonState = -1; + } // Trigger alarm (APP) scratchPadString.erase(0, strlen("MISAP_"));