Fix: 修复在线版下mixgo和mpython板卡使用ampy无法上载代码

This commit is contained in:
王立帮
2025-03-09 16:15:58 +08:00
parent c18326aca4
commit f224d7b3da
9 changed files with 55 additions and 29 deletions

View File

@@ -458,13 +458,11 @@ class StatusBarSerial extends PageBase {
async open() {
await this.#serial_.open(this.#config_.baud);
if (goog.isElectron || Env.hasSocketServer) {
await this.#serial_.sleep(200);
try {
await this.#serial_.setDTRAndRTS(this.#config_.dtr, this.#config_.rts);
} catch (error) {
Debug.error(error);
}
await this.#serial_.sleep(200);
try {
await this.#serial_.setDTRAndRTS(this.#config_.dtr, this.#config_.rts);
} catch (error) {
Debug.error(error);
}
if (SELECTED_BOARD?.serial?.ctrlCBtn) {
await this.#serial_.sleep(500);