Implement erase-first

This commit is contained in:
Paulus Schoutsen 2021-06-06 21:39:02 -07:00
parent a534ed8fda
commit 9f2d870fca
2 changed files with 7 additions and 1 deletions

View File

@ -56,6 +56,7 @@
your computer and hit the button: your computer and hit the button:
</p> </p>
<esp-web-install-button <esp-web-install-button
erase-first
manifest="firmware_build/manifest.json" manifest="firmware_build/manifest.json"
></esp-web-install-button> ></esp-web-install-button>
<p> <p>

View File

@ -129,7 +129,12 @@ export const startFlash = async (
if (eraseFirst) { if (eraseFirst) {
logEl.addRow({ logEl.addRow({
id: "erase", id: "erase",
content: html`Erasing device`, content: html`Erasing device...`,
});
await espStub.eraseFlash();
logEl.addRow({
id: "erase",
content: html`Device erased`,
}); });
} }