From c0c8158ca1071b1d3ff620ca48549f4b3d8992c9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Cl=C3=A9ment=20de=20l=27Hamaide?= Date: Thu, 16 Jan 2014 18:15:45 +0100 Subject: [PATCH] FGCom: force 8.33KHz to be handled even if the frequency doesn't exist --- src/Network/fgcom.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Network/fgcom.cxx b/src/Network/fgcom.cxx index cc935071f..3a1f7e1df 100644 --- a/src/Network/fgcom.cxx +++ b/src/Network/fgcom.cxx @@ -546,7 +546,10 @@ std::string FGCom::getAirportCode(const double& freq) flightgear::CommStation* apt = flightgear::CommStation::findByFreq(_currentFreqKhz, aircraftPos); if( !apt ) { - return std::string(); + apt = flightgear::CommStation::findByFreq(_currentFreqKhz-10, aircraftPos); // Check for 8.33KHz + if( !apt ) { + return std::string(); + } } if( apt->type() == FGPositioned::FREQ_TOWER ) { -- 2.39.5