diff --git a/PythonAPI/examples/manual_control.py b/PythonAPI/examples/manual_control.py index f1d859a1e..6d16013d3 100755 --- a/PythonAPI/examples/manual_control.py +++ b/PythonAPI/examples/manual_control.py @@ -297,7 +297,8 @@ class KeyboardControl(object): world.hud.notification("Press 'H' or '?' for help.", seconds=4.0) def parse_events(self, client, world, clock): - current_lights = self._lights + if isinstance(self._control, carla.VehicleControl): + current_lights = self._lights for event in pygame.event.get(): if event.type == pygame.QUIT: return True @@ -378,6 +379,8 @@ class KeyboardControl(object): world.player.set_autopilot(self._autopilot_enabled) world.hud.notification( 'Autopilot %s' % ('On' if self._autopilot_enabled else 'Off')) + elif event.key == K_l and pygame.key.get_mods() & KMOD_CTRL: + current_lights ^= carla.VehicleLightState.Special1 elif event.key == K_l and pygame.key.get_mods() & KMOD_SHIFT: current_lights ^= carla.VehicleLightState.HighBeam elif event.key == K_l: diff --git a/PythonAPI/util/weather.py b/PythonAPI/util/weather.py index 2a796e726..f1fb8a6bc 100755 --- a/PythonAPI/util/weather.py +++ b/PythonAPI/util/weather.py @@ -20,14 +20,14 @@ except IndexError: import carla SUN_PRESETS = { - 'day': (90.0, 220.0), - 'night': (-90.0, 220.0), - 'sunset': (181.0, 100.0)} + 'day': (60.0, 0.0), + 'night': (-90.0, 0.0), + 'sunset': (0.5, 180.0)} WEATHER_PRESETS = { - 'clear': [10.0, 0.0, 0.0, 5.0, 0.0, 50.0, 0.0], - 'overcast': [80.0, 0.0, 0.0, 50.0, 0.0, 50.0, 10.0], - 'rain': [100.0, 80.0, 90.0, 100.0, 20.0, 50.0, 100.0]} + 'clear': [10.0, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0], + 'overcast': [80.0, 0.0, 0.0, 50.0, 2.0, 0.0, 10.0], + 'rain': [100.0, 80.0, 90.0, 100.0, 20.0, 0.0, 100.0]} def apply_sun_presets(args, weather):