HuskieRobotics / SPOT

Apache License 2.0
24 stars 21 forks source link

QR Code and Offline Analysis functionality completed #115

Closed NathanPease16 closed 3 months ago

NathanPease16 commented 4 months ago

QR codes are now successfully generated on the client-side in an efficient manner, allowing an entire TMP to be encoded. This all also functions offline, as the appropriate files for QR code generation are properly cached. QR codes can also be scanned at the /qrscanner/ route. When a QR code is scanned, the admin is first prompted with whether or not they want to submit the new data. When they hit submit, it either stores it in local storage if there is no internet connection, or uploads it to the database.

For offline analysis, all of the needed files are cached and the analysis route is accessible offline. All of the raw TMP data is also downloaded to work offline. The analysis pipeline has been cached on the client side so that it can be accessed offline by sending all of the transformers in one file to the client, as well as the DataTransformers class. When offline (or online) the downloaded raw data is merged with the TMPs in local storage and the new analysis is performed using the cached analysis pipeline. If the /qrscanner/ page is accessed while online, any TMPs stored in local storage will be synced with the server and removed from local storage upon success