From a4a8bcad27c7db9028ca27dc8e84d94685242bc7 Mon Sep 17 00:00:00 2001 From: nsubiron Date: Mon, 22 Oct 2018 10:18:47 +0200 Subject: [PATCH] Reduce output log of weather --- Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.h | 3 ++- Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.h b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.h index c9e97d7d1..179ed478d 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.h +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.h @@ -18,6 +18,7 @@ DECLARE_LOG_CATEGORY_EXTERN(LogCarlaServer, Log, All); // #define CARLA_ROAD_GENERATOR_EXTRA_LOG // #define CARLA_SERVER_EXTRA_LOG // #define CARLA_TAGGER_EXTRA_LOG +// #define CARLA_WEATHER_EXTRA_LOG #endif // WITH_EDITOR class FCarlaModule : public IModuleInterface @@ -32,5 +33,5 @@ public: /** IModuleInterface implementation */ virtual void StartupModule() override; virtual void ShutdownModule() override; - + }; diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp index 84aafc773..cad5d3a17 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp @@ -17,6 +17,8 @@ AWeather::AWeather(const FObjectInitializer& ObjectInitializer) void AWeather::ApplyWeather(const FWeatherParameters &InWeather) { Weather = InWeather; + +#ifdef CARLA_WEATHER_EXTRA_LOG UE_LOG(LogCarla, Log, TEXT("Changing weather:")); UE_LOG(LogCarla, Log, TEXT(" - Cloudyness = %.2f"), Weather.Cloudyness); UE_LOG(LogCarla, Log, TEXT(" - Precipitation = %.2f"), Weather.Precipitation); @@ -24,6 +26,7 @@ void AWeather::ApplyWeather(const FWeatherParameters &InWeather) UE_LOG(LogCarla, Log, TEXT(" - WindIntensity = %.2f"), Weather.WindIntensity); UE_LOG(LogCarla, Log, TEXT(" - SunAzimuthAngle = %.2f"), Weather.SunAzimuthAngle); UE_LOG(LogCarla, Log, TEXT(" - SunAltitudeAngle = %.2f"), Weather.SunAltitudeAngle); +#endif // CARLA_WEATHER_EXTRA_LOG // Call the blueprint that actually changes the weather. RefreshWeather(Weather);