Open abrightwell opened 3 years ago
Thoughts on initial routes for such a server:
GET /auto
-> list auto modes
PUT /auto/{id}
-> enable specific auto mode
GET /pid
-> list pid values
PUT /pid/{id}
-> update specific pid values
Need to determine available ports. Though, not important for this year given we control the network, however, will be good to incorporate for future years if found useful.
For persistence, something like sqlite3 would be ideal, I think. It's lightweight, fast and resilient. All transactions are written to file as well. Could be good for someone to learn how to use it, it's pretty simple.
However, available modes could certainly come from the code itself.
Potential logic might be...
Start up -> load modes (map or something) -> load previous from sqlite -> set previous mode -> send confirmation to dashboard.
If a mode is no longer supported: set default mode -> send confirmation to dashboard.
Related to #8 and #4.
Create a simple http server that can run on the roborio and can be used to configure the robot from the dashboard.
Items to configure should be auto mode, pid values, etc.
Use of https://www.rapidoid.org/ could make this very simple.
As well, it would be useful to persist 'last' settings on the roborio filesystem, location TBD.