Skip to content
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

FTC Support #50

Open
wants to merge 2 commits into
base: alpha
Choose a base branch
from
Open

FTC Support #50

wants to merge 2 commits into from

Conversation

maths22
Copy link

@maths22 maths22 commented Feb 28, 2024

This adds support for pulling FTC data from the official FIRST api for match start and result post times. Note that the official FIRST api rules do not allow publishing an API key, so any users will need to request their own key and input it: I added a dialog that appears on first attempt at loading FTC matches for people to enter their credentials which then saves them in localstorage for future usage.
image

Because many larger FTC events run as two field events where the match on e.g. field 2 will be played before the results from the previous match on field 1 are ready and posted, the behavior from version 3 of the splitter, where it separately extracts the match play and the result post and then merges them together, is essentially a requirement for those FTC events to work right (otherwise every match video actually has two matches and two results in it). I therefore added an option for "Clip Match Results Separately" (I don't love the name-open to suggestions of better names) that when selected has the timing parameters of the old version (with match length automatically selected based on program). When in that mode, as with version 3, a user finds the start time of a match, marks that, and then autofill will fill in the match clip and results clip start times based on the start time.
image
image
I'm very open to suggestions to improve the UX on this part-it's not hard to use, but there's a lot going on which makes it a bit confusing.

I added react-viewport-list to make the event picker dropdown performant, as FTC has a lot more events than FRC and the naive implementation was unusably slow with FTC event counts. I also took the liberty of fixing some file-path related bugs that likely don't appear on windows, as I was working on a mac (the file separator on outputs and issues with loading the video for preview without using a proper file:// URL).

@tytremblay
Copy link
Owner

Thanks for opening this! I can build an API key into the published executable by putting it in my github secrets. Let's work offline on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants