mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 06:45:37 +08:00
Adjusting FG transponder modes
This commit is contained in:
committed by
Mat Sutcliffe
parent
3a44a729a1
commit
710e10f86f
@@ -156,17 +156,17 @@ namespace BlackSimPlugin
|
||||
}
|
||||
|
||||
// convert flightgear squawk mode to swift squawk mode
|
||||
CTransponder::TransponderMode xpdrMode(int xplaneMode, bool ident)
|
||||
CTransponder::TransponderMode xpdrMode(int transponderMode, bool ident)
|
||||
{
|
||||
if (ident) { return CTransponder::StateIdent; }
|
||||
if (xplaneMode == 0 || xplaneMode == 1) { return CTransponder::StateStandby; }
|
||||
if (transponderMode == 0 || transponderMode == 1 || transponderMode == 2) { return CTransponder::StateStandby; }
|
||||
return CTransponder::ModeC;
|
||||
}
|
||||
|
||||
// convert swift squawk mode to flightgear squawk mode
|
||||
int xpdrMode(CTransponder::TransponderMode mode)
|
||||
{
|
||||
return mode == CTransponder::StateStandby ? 1 : 2;
|
||||
return mode == CTransponder::StateStandby ? 1 : 4;
|
||||
}
|
||||
|
||||
void CSimulatorFlightgear::fastTimerTimeout()
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace BlackSimPlugin
|
||||
int com2ActiveKhz; //!< COM2 active [kHz]
|
||||
int com2StandbyKhz; //!< COM2 standby [kHz]
|
||||
int xpdrCode; //!< Transpondder code
|
||||
int xpdrMode; //!< Transponder mode (off=0,stdby=1,on=2,test=3)
|
||||
int xpdrMode; //!< Transponder mode (off=0,stdby=1-2, >2 on)
|
||||
bool xpdrIdent; //!< Is transponder in ident?
|
||||
bool beaconLightsOn; //!< Beacon lights on?
|
||||
bool landingLightsOn; //!< Landing lights on?
|
||||
|
||||
Reference in New Issue
Block a user