-
Notifications
You must be signed in to change notification settings - Fork 11
Add support for reading TMN ESWC replays #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
donadigo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments for now.
average_steer_partitions.py
Outdated
| val >>= int32(8) | ||
| return -val | ||
|
|
||
| def clean_duplicate_events(events: list): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please annotate that this also returns list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
average_steer_partitions.py
Outdated
| """ | ||
| events_cleaned = [] | ||
| for i in range(0, (len(events)-1)): | ||
| if int(events[i+1].time / 10) * 10 != int(events[i].time / 10) * 10: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when there's events like this?
10000 Accelerate (1)
10000 Brake (1)
10010 Accelerate (0)
Is the first accelerate simply skipped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good point. Reworked the function to skip over everything that is not a Steer event
generate_input_file.py
Outdated
| val >>= int32(8) | ||
| return -val | ||
|
|
||
| def clean_duplicate_events(events: list): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
- Only clean steer events and leave other events completely untouched - round up time to next 10 instead of midway rounding
Depends on this change donadigo/pygbx#11 in pygbx.