Selaa lähdekoodia

Implement erase-first

Paulus Schoutsen 4 vuotta sitten
vanhempi
commit
9f2d870fca
2 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 1 0
      index.html
  2. 6 1
      src/start-flash.ts

+ 1 - 0
index.html

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

+ 6 - 1
src/start-flash.ts

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