<!DOCTYPE html>
<html lang="en">
  <head>
    <link rel="stylesheet" href="max80.css" />
    <title class="update">MAX80: Update</title>
    <script src="max80.js"></script>
  </head>
  <body>
    <x-inc src="head.html"></x-inc>
    <h1 class="update">Update</h1>
    <form id="upload" action="sys/fwupdate" method="post"
	  onsubmit="uploadform()" data-ref="10" data-ref-url="status.html">
      <fieldset class="fw">
	<legend>Firmware</legend>
	<input type="file" name="file" hidden accept=".fw" onchange="uploadform()" />
	<button type="submit" class="fromfile" id="upload.start"
		onclick="sib(this,'input').value=''">Update from file</button>
	<progress value="0"></progress>
      </fieldset>
      <output></output>
      <div class="onerr">
	<h3>Possible troubleshooting steps:</h3>
	<ol>
	  <li class="retry">Try again</li>
	  <li class="jtag">Make sure no JTAG cable is plugged in</li>
	  <li class="power">Power cycle board (remove both USB and power off ABC host)</li>
	  <li class="esp">Separately update ESP32 over USB before trying again</li>
	  <li class="console">Check serial console for more detailed status messages</li>
	</ol>
      </div>
    </form>
  </body>
</html>