kyle-west / racer.pi

Time derby car races with a raspberry pi
1 stars 1 forks source link

[race] handle when more lanes than expected are given #32

Closed kyle-west closed 11 months ago

kyle-west commented 11 months ago

We found a couple bugs where if more lane events than expected are given, then the application halts. This PR fixes that problem by filtering out spurious lane events on the client before we try to process them.

Additionally, I show the Redo button as soon as we get any lane data. This handles the case of a car running off the edge and we need to rerun the race.

kyle-west commented 11 months ago

I tested it alongside python mainmock.py and it is working nicely. You can even send lane events outside of the track like for lane 14 or something and it won't crash halt anymore.