Skip to content

galchapman/Scouting-2022

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scouting System for Megiddo Lions in FTC 2022

Usage

Firstly we need to install all the project dependencies.

go get -u github.com/NYTimes/gziphandler github.com/mattn/go-sqlite3 golang.org/x/crypto

After this we need to enter our toa api key to file secrets/secret.go.

package secrets

const TOA_API_KEY = "--- YOUR API KEY ---"

And pass the event key as an argument to NewServer in main.go.
Also you will need to create a directory named robots. Then after all that we finally can start our server.

go run .

Please note that the default port is 80 So if you have a problem with this you are welcome to change it in server.go.
And just like that you are done! The server is running, and you are welcome to use it.

Project Structure

Database

We use SQLite for a database in our project so if you are willing to change it to other SQL server you can change it in the database module. Or if you aren't using SQL just rewrite the module. It's just a drop in replacement.

The orange alliance API

We use it to fill all the teams for an event. However, you can do without it in that case you can drop all it's api code in the project. The code for the integration is in the toa_api module and is a part of the initialization of the server. To remove it just remove the relevant code and remove the arguments NewServer method requires.

The Server

Each web page is implemented by a function in the server module. Some are simple and just serve a file from the www folder. Like main.css or favicon.ico. But most of them require some backend code, so they include a handleFunction. All of them are mentioned in configHTTP. In this function you can see all the available urls and where they are implemented. For more reading about the server use the site documentation.

Final Notes

We didn't have a lot of time to debug this so if you spot a bug please resport it or even better make a pull request with the fix.

Credits

All the backend + Half of the front end - Gal
The other half the front end - Ori
Some random stuff here and then - Mayan

About

The scouting system for Megiddo Lions FTC18833

Resources

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •