Skip to content

Commit

Permalink
fix GTA assertion failure with time param just before midnight
Browse files Browse the repository at this point in the history
  • Loading branch information
dfremont committed Jan 6, 2024
1 parent 43959f0 commit fa0551a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/scenic/simulators/gta/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ def Config(scene):
cameraHeading = GTA.langToGTAHeading(ego.heading)

params = dict(scene.params)
time = int(round(params.pop("time")))
minute = time % 60
hour = int((time - minute) / 60)
assert hour < 24
time = int(round(params.pop("time"))) % 1440
hour, minute = divmod(time, 60)
assert hour < 24, scene.params["time"]
weather = params.pop("weather")
for param in params:
print(f'WARNING: unused scene parameter "{param}"')
Expand Down

0 comments on commit fa0551a

Please sign in to comment.