Adjusting FG transponder modes

This commit is contained in:
Lars Toenning
2019-03-16 13:37:23 +01:00
committed by Mat Sutcliffe
parent 3a44a729a1
commit 710e10f86f
2 changed files with 4 additions and 4 deletions

View File

@@ -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()

View File

@@ -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?