Hey guys, I found an issue that sometimes I will lose all data on the storage. I use websocket to get new code from the server and write it into the storage. At first, I simply erase and write, but then I realized free space becomes less and less so I add compact between erase and write, it works normally most of the time, but it did lost all data sometimes.
I would like to know how to prevent this, I'm a noob, thanks.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hey guys, I found an issue that sometimes I will lose all data on the storage. I use websocket to get new code from the server and write it into the storage. At first, I simply erase and write, but then I realized free space becomes less and less so I add compact between erase and write, it works normally most of the time, but it did lost all data sometimes.
I would like to know how to prevent this, I'm a noob, thanks.