]> git.mxchange.org Git - flightgear.git/commitdiff
Fix compilation bug that only occurred when compiled with weathercm subsystem enabled
authordaveluff <daveluff>
Mon, 13 Jan 2003 19:03:36 +0000 (19:03 +0000)
committerdaveluff <daveluff>
Mon, 13 Jan 2003 19:03:36 +0000 (19:03 +0000)
src/ATC/atis.cxx

index a4653cc610681dbd07235badd2002789d7202f68..25eba6d104d275d9a33b568928690c6861122140 100644 (file)
@@ -147,22 +147,20 @@ void FGATIS::UpdateTransmission() {
        transmission = transmission + " / Weather " + ConvertNumToSpokenDigits((time_str.substr(0,3) + "00")) + " hours zulu";
        
        // Get the temperature
-       // (Hardwire it for now since the global property returns the temperature at the current altitude
-       //temperature = fgGetDouble("/environment/weather/temperature-K");
+       int temp;
        #ifdef FG_WEATHERCM
-       sprintf(buf, "%i", int(stationweather.Temperature - 273.15));
+       temp = int(stationweather.Temperature - 273.15);
        #else
+       temp = (int)stationweather.get_temperature_degc();
+       #endif
+       
        // HACK ALERT - at the moment the new environment subsystem returns bogus temperatures
        // FIXME - take out this hack when this gets fixed upstream
-       int temp = (int)stationweather.get_temperature_degc();
        if((temp < -50) || (temp > 60)) {
                temp = 15;
        }
-       // original:
-       //sprintf(buf, "%d", int(stationweather.get_temperature_degc()));
-       // hack:
-       sprintf(buf, "%d", temp);
-       #endif
+
+       sprintf(buf, "%i", abs(temp));
        transmission += " / Temperature ";
        if(temp < 0) {
                transmission += "minus ";