PDA

View Full Version : Confirming timeout behavior


ChiMiniRc
2013.03.14, 10:43 AM
I wanted to confirm what parts of the code leverage the Timeout feature in freeplay "practice" mode.

Right now I have one behavior (it's a Windows XP machine) where the racers just disappear during practice. I've set the timeout to 600 and 900 seconds but I've seen their names disappear well before the 10 and 15 minute mark.

Another thing which is probably correct. The timeout defaulted to 15 seconds and we were in practice on a track with laptimes greater than 15 seconds. We were trying to get lap times to announce so what we did was run the car back and forth under the bridge to confirm we had laptimes announced (over minimum 7 seconds but under 15 second timeout). But when we started practicing we just heard beeps. Once I increased the timeout the laptimes began to announce correctly. Mind you, from what I could tell, the drivers never disappeared from the screen.

Finally, the ability to announce lap times to 1 decimal place but still hearing all 3 decimal places for personal best laps is AWESOME. Well implemented. If that wasn't on purpose, please be sure not to change it in the future.

pinwc4
2013.03.14, 10:17 PM
I wanted to confirm what parts of the code leverage the Timeout feature in freeplay "practice" mode.


In "Free Play" the timeout is only used to calculate when a racer can automatically be removed from the race. The check runs as part of the main race timer. The logic is this

If currenttime is > than the when the racers most recent lap occurred plus the racers time deviation plus the timeout then remove them from the race.

Each racer gets a separate time deviation based on when they were added to the race. This is needed since they will each have their own clock that starts the first time they are detected. The deviation for the racer is whatever time the race timer says at the moment they were added or whatever time the lap counter sends for the first detection in the case of I-Lap since it has its own built in timer.


Right now I have one behavior (it's a Windows XP machine) where the racers just disappear during practice. I've set the timeout to 600 and 900 seconds but I've seen their names disappear well before the 10 and 15 minute mark.

Another thing which is probably correct. The timeout defaulted to 15 seconds and we were in practice on a track with laptimes greater than 15 seconds. We were trying to get lap times to announce so what we did was run the car back and forth under the bridge to confirm we had laptimes announced (over minimum 7 seconds but under 15 second timeout). But when we started practicing we just heard beeps. Once I increased the timeout the laptimes began to announce correctly. Mind you, from what I could tell, the drivers never disappeared from the screen.


Not quite sure what is going on here. Going to have to say the annoying statement of so far I can not replicate this behavior. The timeout check is pretty simple so my first guess may be that the deviation that is getting calculated wrong some how.

In my case the deviation is based of the race clock, but in your case with the I-Lap I am basing it off the time send from the I-Lap. So maybe I am doing something wrong there, I will dig a bit further. I wish I would not have forgotten to grab that I-Lap sensor Craig offered when I was up there, would help with testing in this case.

I will dig further into this problem and see what I can figure out. If I get stuck maybe I will set an Arduino to emulate sending lap times like an I-Lap to see if I can replicate the problem.


Finally, the ability to announce lap times to 1 decimal place but still hearing all 3 decimal places for personal best laps is AWESOME. Well implemented. If that wasn't on purpose, please be sure not to change it in the future.

Honestly I am not quite sure if this is sarcasm or not, I would not call it awesome but it was a design choice I made intentionally. Some people may disagree but my thought was that it seemed silly to announce best laps to only 1 decimal place.

If I were to do that you would commonly have instances such as there was a best lap of 7.345 seconds, then of 7.333 seconds, then of 7.321 seconds but the software would say each time best lap 7.3 seconds, best lap 7.3 seconds, best lap 7.3 seconds even though each time would be slightly different. This seemed silly to me. However if people disagree I can change it, it was just my opinion.

ChiMiniRc
2013.03.15, 11:37 AM
Honestly I am not quite sure if this is sarcasm or not, I would not call it awesome but it was a design choice I made intentionally. Some people may disagree but my thought was that it seemed silly to announce best laps to only 1 decimal place.

If I were to do that you would commonly have instances such as there was a best lap of 7.345 seconds, then of 7.333 seconds, then of 7.321 seconds but the software would say each time best lap 7.3 seconds, best lap 7.3 seconds, best lap 7.3 seconds even though each time would be slightly different. This seemed silly to me. However if people disagree I can change it, it was just my opinion.
No sarcasm. I think this implementation is perfect. the tenth of second for non fast laps as knowing if you are on pace is what you are usually after. BUT If you get 7.345 instead of 7.390 on the last lap, I *DO* want to know all 3 decimal places.