X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FATC%2FATCmgr.hxx;h=d8546add39d4f4b49e732af441dc5a0eb93a4a5d;hb=0adae696aad246f2316e2d1dfea43d3291cec585;hp=be9032128daa1271c6e766357ad0c10cef499857;hpb=96970dcbaf2008bddcbc5b53dc3e077d3855e451;p=flightgear.git diff --git a/src/ATC/ATCmgr.hxx b/src/ATC/ATCmgr.hxx index be9032128..d8546add3 100644 --- a/src/ATC/ATCmgr.hxx +++ b/src/ATC/ATCmgr.hxx @@ -22,7 +22,8 @@ #ifndef _FG_ATCMGR_HXX #define _FG_ATCMGR_HXX -#include
+#include + #include
#include @@ -69,15 +70,16 @@ struct AirportATC { // Flags to ensure the stations don't get wrongly deactivated bool set_by_AI; // true when the AI manager has activated this station unsigned int numAI; // Ref count of the number of AI planes registered - bool set_by_comm_search; // true when the comm_search has activated this station - // Do we need to distingiush comm1 and comm2? + bool set_by_comm[2][ATC_NUM_TYPES]; // true when the relevant comm_freq has activated this station and type }; -class FGATCMgr : public FGSubsystem +class FGATCMgr : public SGSubsystem { private: + bool initDone; // Hack - guard against update getting called before init + // A map of airport ID vs frequencies and ATC provision typedef map < string, AirportATC* > airport_atc_map_type; typedef airport_atc_map_type::iterator airport_atc_map_iterator; @@ -190,7 +192,7 @@ public: bool AIRegisterAirport(string ident); // Register the fact that the comm radio is tuned to an airport - bool CommRegisterAirport(string ident); // Later we'll differentiate between comm 1 and comm2 + bool CommRegisterAirport(string ident, int chan, atc_type tp); private: