Open ensonic opened 4 years ago
The "protocol" is pretty weird right now as the robot requests the exact files through one REST call each. I think it would be nice to revise it while handling this (for now only ev3dev). The server could tell the robot which files are necessary, instead. This would decouple the actual robot files from the protocol and the robot firmware.
I was actually considering to alway fetch a zip with the python files (2 py files with code and one with the version info). This way the protocol would stay simple - just one file (zip) and the set of files downloaded is atomic.
Sounds nice as well, that way its very simple and variable files are allowed.
I've got the server side parts working: https://gist.github.com/ensonic/b19ee4229185f8923a0e6001fdc786bd
Also on the ev3dev the download is received and updated. I need to do some code cleanups, the restarts of the connector and then making a release.
PR ready. This can be safely merged (won't do anything yet). What we need to discuss is how to add an extra check so that if the ev3dev menuVersion is <1.7.5 we prompt people to reflash the image (with url to image) and only if menuVersion is >=1.7.5 we do the normal updates.
Users of the ev3dev system need to reflash their sdcards to get new features. They also needs to figure by themself that an update is required.
In order to improve this we should do the following:
/update/ev3dev
as a root pathupdate.dir
andmenu.version
in ev3dev.propertiesLinks:
robot.controller.js
.