Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable route and approach selection if destination is not defined #25

Merged
merged 1 commit into from
Jul 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 44 additions & 33 deletions AT3/AT3Tags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,13 @@ void AT3Tags::OnFunctionCall(int FunctionId, const char* sItemString, POINT Pt,
}

switch (FunctionId) {
case TAG_FUNC_APP_SEL_MENU:
case TAG_FUNC_APP_SEL_MENU:
if (arptSet.find(FlightPlan.GetFlightPlanData().GetDestination()) != arptSet.end()) {
OpenPopupList(Area, APPMenuName.c_str(), 1);
if (appsVec.size() > 0) {
AddPopupListElement(appsVec[0].c_str(), "", TAG_FUNC_APP_SEL_ITEM_1, false, 2, false);
} else {
}
else {
AddPopupListElement("BAD DATA ", "", TAG_FUNC_APP_SEL_DUMMY, false, 2, false);
break;
}
Expand Down Expand Up @@ -340,40 +342,45 @@ void AT3Tags::OnFunctionCall(int FunctionId, const char* sItemString, POINT Pt,
else {
break;
}

case TAG_FUNC_APP_SEL_ITEM_1: {
SetApp(0, FlightPlan, appsVec);
break;
}
case TAG_FUNC_APP_SEL_ITEM_2: {
SetApp(1, FlightPlan, appsVec);
break;
}
case TAG_FUNC_APP_SEL_ITEM_3: {
SetApp(2, FlightPlan, appsVec);
break;
}
case TAG_FUNC_APP_SEL_ITEM_4: {
SetApp(3, FlightPlan, appsVec);
break;
}
case TAG_FUNC_APP_SEL_ITEM_5: {
SetApp(4, FlightPlan, appsVec);
break;
}
case TAG_FUNC_APP_SEL_ITEM_6: {
SetApp(5, FlightPlan, appsVec);
break;
}
case TAG_FUNC_APP_SEL_ITEM_7: {
SetApp(6, FlightPlan, appsVec);
break;
}
case TAG_FUNC_APP_SEL_ITEM_8: {
SetApp(7, FlightPlan, appsVec);
else {
break;
}
case TAG_FUNC_RTE_SEL_MENU:

case TAG_FUNC_APP_SEL_ITEM_1: {
SetApp(0, FlightPlan, appsVec);
break;
}
case TAG_FUNC_APP_SEL_ITEM_2: {
SetApp(1, FlightPlan, appsVec);
break;
}
case TAG_FUNC_APP_SEL_ITEM_3: {
SetApp(2, FlightPlan, appsVec);
break;
}
case TAG_FUNC_APP_SEL_ITEM_4: {
SetApp(3, FlightPlan, appsVec);
break;
}
case TAG_FUNC_APP_SEL_ITEM_5: {
SetApp(4, FlightPlan, appsVec);
break;
}
case TAG_FUNC_APP_SEL_ITEM_6: {
SetApp(5, FlightPlan, appsVec);
break;
}
case TAG_FUNC_APP_SEL_ITEM_7: {
SetApp(6, FlightPlan, appsVec);
break;
}
case TAG_FUNC_APP_SEL_ITEM_8: {
SetApp(7, FlightPlan, appsVec);
break;
}
case TAG_FUNC_RTE_SEL_MENU:
if (arptSet.find(FlightPlan.GetFlightPlanData().GetDestination()) != arptSet.end()) {
OpenPopupList(Area, RteMenuName.c_str(), 1);
if (rteVec.size() > 0) {
AddPopupListElement(rteVec[0].c_str(), "", TAG_FUNC_RTE_SEL_ITEM_1, false, 2, false);
Expand Down Expand Up @@ -431,6 +438,10 @@ void AT3Tags::OnFunctionCall(int FunctionId, const char* sItemString, POINT Pt,
else {
break;
}
}
else {
break;
}
case TAG_FUNC_RTE_SEL_ITEM_1: {
SetRte(0, FlightPlan, rteVec, dest, destRunway);
break;
Expand Down
Loading