OTA 完美

This commit is contained in:
zogodo
2020-02-23 20:49:46 +08:00
parent ec6eab737b
commit 3e6ecce8c8
4 changed files with 381 additions and 362 deletions

View File

@@ -671,9 +671,10 @@ ota_status.addEventListener('mdl-componentupgraded', function() {
function OtaStatus() {
HttpGet("/ota", function (re) {
var percent = parseInt(re);
//console.log(re + " " + parseInt(re));
ota_status.MaterialProgress.setProgress(percent);
if (percent == 0) {
//location.reload();
if (percent < 0) {
location.reload();
}
window.setTimeout(OtaStatus, 1000);
});