nilclass / jumperlab

A UI for @Architeuthis-Flux's awesome Jumperless breadboard
Other
12 stars 4 forks source link

Load and Store sketches #10

Open nilclass opened 8 months ago

nilclass commented 8 months ago

Currently the sketch is cleared when refreshing the page. It's not possible to export them anywhere (except by loading a single sketch onto the board and getting it back from there later).

Let's allow at least:

Architeuthis-Flux commented 8 months ago

So, on the Jumperless itself, it does save the list of bridges in that simple [1-2,3-4] format on the filesystem. But now that we have control of net colors and stuff, maybe I should also save the last netlist in the machine readable format too.

But yeah for storing more than one file it should be on the computer.

Just a thought that doesn't really apply here, I really like how Falstad circuit simulator deals with this, it looks like they just base64 the whole setup and pass that in the url.

Screenshot 2024-02-03 at 8 08 54 AM Screenshot 2024-02-03 at 8 09 07 AM Screenshot 2024-02-03 at 8 09 16 AM

But also this will be run locally so we could just save the response to ::getnets in a txt file with headers for each one with names and stuff. Which is probably better because they'll be human readable.

nilclass commented 7 months ago

I like how falstad does it, but using a link does not really work when stuff runs locally, since the port may vary, or the user may be on a different machine than where jumperlab is served from.

For now I added the ability to save to a file (like a download, similar to falstad's "export to text") and load from a file again (the user needs to select it, like a file upload).

The data saved is the entire netlist as JSON, so the same format that jlctl uses internally (which should be more or less the same that's accepted by ::netlist).