add a menu to force set runways

This commit is contained in:
Sven Czarnian
2021-12-19 12:23:23 +01:00
parent c14698bc39
commit c3a75bb900
2 changed files with 123 additions and 24 deletions

View File

@@ -37,10 +37,17 @@ namespace aman {
*/
enum class TagItemFunction {
ForceToBackendMenu = 0, /**< Opens the menu to force tracks */
ForceToBackendSelect = 1 /**< Reacts on controller selection */
ForceToBackendSelect = 1, /**< Reacts on controller selection */
RunwaySelectMenu = 2, /**< Opens the runway selection menu */
RunwaySelect = 3 /**< Selects the runway */
};
private:
struct AirportData {
std::vector<std::string> arrivalRunways;
std::list<std::string> inboundUpdates;
};
enum class TagItemElement {
EstimatedTimeOfArrival = 0,
PlannedTimeOfArrival = 1,
@@ -58,17 +65,18 @@ namespace aman {
static void distanceToPredictedIaf(const EuroScopePlugIn::CRadarTarget& radarTarget, const EuroScopePlugIn::CFlightPlan& flightPlan,
const EuroScopePlugIn::CPosition& iafPosition, aman::AircraftReport* report);
Communication m_configuration;
std::shared_ptr<RadarScreen> m_screen;
std::mutex m_updateQueueLock;
std::map<std::string, std::list<std::string>> m_updateQueue;
std::mutex m_inboundsQueueLock;
std::map<std::string, Inbound> m_inbounds;
std::list<std::string> m_forcedToBackendCallsigns;
bool m_compatible;
bool m_connectedToNetwork;
bool m_sweatboxValid;
bool m_playbackValid;
Communication m_configuration;
std::shared_ptr<RadarScreen> m_screen;
std::mutex m_updateQueueLock;
std::map<std::string, AirportData> m_updateQueue;
std::mutex m_inboundsQueueLock;
std::map<std::string, Inbound> m_inbounds;
std::map<std::string, std::string> m_selectedRunway;
std::list<std::string> m_forcedToBackendCallsigns;
bool m_compatible;
bool m_connectedToNetwork;
bool m_sweatboxValid;
bool m_playbackValid;
public:
/**
@@ -145,5 +153,9 @@ namespace aman {
* @param[in] flightPlan The disconnected flight plan
*/
void OnFlightPlanDisconnect(EuroScopePlugIn::CFlightPlan flightPlan) override;
/**
* @brief Called as soon as a runway configuration changed
*/
void OnAirportRunwayActivityChanged() override;
};
}