Closed Yaty closed 5 years ago
We could allow users to save firmware parameters in the browser local storage to be able to switch quickly between them. We could also allow users to share firmware parameters with a link. What do you think ?
When you generate the firmware you download it from a link like:
http://m365.botox.bz/cfw?version=DRV138&kers_min_speed=40.0&normal_max_speed=30&eco_max_speed=26&motor_start_speed=3.0&motor_power_constant=38000&instant_eco_switch=on&voltage_limit=52.00&remove_hard_speed_limit=on
This link is also in the generated ZIP file description.
However if you want you could make this work on the main page (simple javascript in the HTML) so it sets the fields in the HTML.
Oh nice ! I can add that in the PR if you're ok with it :)
Yep, that sounds like a good feature and probably also not too hard to implement.
And maybe make a link or button under / next to the Patch button that is called 'Share' which can be used to generate/copy that link?
Sounds good !
I added the share button. So now in this PR there are :
I think it could also be nice to be able to copy a link that will launch the web app with pre-filled parameters (from query strings per example).
So there would be :
Maybe the Import/Export feature is now useless, I can remove it.
I was actually thinking that the share button would not share the download thing but act like the import/export feature. So if you hit share you get https://m365.botox.bz/?version=DRV138&kers_min_speed=40.0&normal_max_speed=30 etc. without the /cfw part. And the javascript on the page takes those URL params to fill the forms. This is much easier to share than a json file
Done !
Can I ask question - is this good for ES2 (ninebot) ?
Wrong place to ask. And no I am not planning on supporting the Ninebot ES2 as I only have a Xiaomi M365 and it's the better scooter anyways :p But I've seen somebody else work on ES2 support, I don't know any details however or who it is.
My fork supports the ES2 It is accessible at https://ninebot.scooterhacking.org/ Also, Yaty, we graduated from the same high school, funny ;)
@scooterhacking what is actually the link between your fork and the import/export function?
36
I also added some constants and minor improvements.