RobotCasserole1736 / GBC2019

Scouting Application for Robot Casserole for the FRC 2019 game
0 stars 0 forks source link

Create code to preset team numbers for specific scouting computers #3

Open jackTHEnerd opened 5 years ago

jackTHEnerd commented 5 years ago

We had some complaints about people being confused about which team they were supposed to scout. This will take the team numbers from the blue alliance and preset them to specific computers so the scout only has to look for the team number instead of the station number.

imdunne8 commented 5 years ago

You'll probably want to have a field so the scout can set the station they're scouting (B1/2/3, R1/2/3) and have something watching for changes to that or the match number. On match number change, check if match type is Qual, and if so look up the corresponding team number. Assuming we are going to go with an internet connected scouting system this year, you will be able to use The Blue Alliance's API to look this up. Important - make sure you never commit your API keys to github. There are various ways to get around this, just look google it and find something you like. Either way, begin by experimenting with the API outside of your code to understand how it works.

imdunne8 commented 5 years ago

Let's work on this some more tonight and/or tomorrow. We do still need to add a drop down field in the Match Info section where the scout can pick a station. Then we need to add events so that if that selector changes or the match number changes (either typed or automatically) then trigger a lookup for the team number as long as the match type is Qualification.

I set up a free hosting account for use with this and ordered the remaining two Kindles we will need to actually do this web-based and wirelessly. What I'm thinking on the team/match database update is that I'll just have it on my home PC and will trigger the update remotely, but we could also have it on a team laptop and do it there. We'll still want a team laptop for analyzing the data, but we may also want to set up a simple webpage to show some basic team breakdown data for the drivers. That's obviously outside the scope of this specific issue though.

The SQL side of this will be pretty simple, but if you have a couple spare hours, I would recommend at least starting the Codecademy SQL Course. The PHP part of it will be even more simple, but I will just plan on tackling that to help move things along and to guard you from the horrors of PHP...

imdunne8 commented 5 years ago

@robert3827 - Just a reminder to commit the Python code you wrote to generate the list tomorrow. After that, close this out!

imdunne8 commented 5 years ago

@robert3827 committed his API key, oh no! Fortunately, our repo is private right now and the TBA API keys are revocable so it's not too big of a deal at the moment. I'll modify the python code to remove it and add a way to look it up in a separate file that won't be committed (just stored locally).