Fix as per review

This commit is contained in:
Paul Kendall 2022-07-11 16:42:02 +12:00
parent 0fb492a9b6
commit 933380e309

View File

@ -1599,16 +1599,13 @@ class ESPLoader {
// 'run user code' is as close to a soft reset as we can do
this.flash_begin(0, 0);
this.flash_finish(false);
} else if (this.chip.CHIP_NAME != "ESP8266") {
throw("Soft resetting is currently only supported on ESP8266");
} else {
if (this.chip.CHIP_NAME != "ESP8266") {
throw("Soft resetting is currently only supported on ESP8266");
} else {
// running user code from stub loader requires some hacks
// in the stub loader
this.command({op: this.ESP_RUN_USER_CODE, wait_response: false});
}
// running user code from stub loader requires some hacks
// in the stub loader
this.command({op: this.ESP_RUN_USER_CODE, wait_response: false});
}
}
}