Skip to content

Commit

Permalink
Only activate missed approach alarm from tag for twr if selected airc…
Browse files Browse the repository at this point in the history
…raft matches updated aircraft

* Avoids trigger from other tower
  • Loading branch information
EightSmart committed Jul 22, 2024
1 parent b6d7e16 commit 74868fe
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions MissedApproach/MissedApproachAlarm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_"));
Expand Down

0 comments on commit 74868fe

Please sign in to comment.