check if the PTA exists
This commit is contained in:
@@ -558,10 +558,16 @@ void PlugIn::OnGetTagItem(EuroScopePlugIn::CFlightPlan flightPlan, EuroScopePlug
|
|||||||
}
|
}
|
||||||
case TagItemElement::PlannedTimeOfArrival:
|
case TagItemElement::PlannedTimeOfArrival:
|
||||||
{
|
{
|
||||||
if (this->m_inbounds.cend() != it)
|
if (this->m_inbounds.cend() != it) {
|
||||||
message = UtcTime::timeToString(it->second.pta(), "%H:%M");
|
const auto pta = it->second.pta();
|
||||||
else if (true == forced || true == planExpected)
|
if (UtcTime::Point() == pta)
|
||||||
|
message = "??:??";
|
||||||
|
else
|
||||||
|
message = UtcTime::timeToString(it->second.pta(), "%H:%M");
|
||||||
|
}
|
||||||
|
else if (true == forced || true == planExpected) {
|
||||||
message = "??:??";
|
message = "??:??";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TagItemElement::DeltaTime:
|
case TagItemElement::DeltaTime:
|
||||||
|
|||||||
@@ -420,6 +420,8 @@ UtcTime::Point Inbound::eta() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
UtcTime::Point Inbound::pta() const {
|
UtcTime::Point Inbound::pta() const {
|
||||||
|
if (this->m_nextStarWaypoint >= this->m_arrivalRoute.size())
|
||||||
|
return UtcTime::Point();
|
||||||
return gsl::at(this->m_arrivalRoute, this->m_nextStarWaypoint).plannedArrivalTime();
|
return gsl::at(this->m_arrivalRoute, this->m_nextStarWaypoint).plannedArrivalTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user