From 28b2cf8dfc9444ded3812de8886d6d0af2fe8bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=AB=8B=E5=B8=AE?= <3294713004@qq.com> Date: Sun, 23 Mar 2025 13:14:23 +0800 Subject: [PATCH] =?UTF-8?q?Update:=20=E5=9C=A8=E7=BA=BF=E7=89=88ampy?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=89=8D=E4=BB=A5=E5=8F=8Aserial=E6=89=93?= =?UTF-8?q?=E5=BC=80=E6=97=B6=E4=B8=8D=E5=86=8D=E5=AF=B9dtr=E5=92=8Crts?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/mixly-modules/common/statusbar-serial.js | 6 ------ common/modules/mixly-modules/deps.json | 1 - common/modules/mixly-modules/web/ampy.js | 10 ---------- 3 files changed, 17 deletions(-) diff --git a/common/modules/mixly-modules/common/statusbar-serial.js b/common/modules/mixly-modules/common/statusbar-serial.js index d312917c..41e0c66b 100644 --- a/common/modules/mixly-modules/common/statusbar-serial.js +++ b/common/modules/mixly-modules/common/statusbar-serial.js @@ -458,12 +458,6 @@ class StatusBarSerial extends PageBase { async open() { await this.#serial_.open(this.#config_.baud); - 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); await this.#serial_.interrupt(); diff --git a/common/modules/mixly-modules/deps.json b/common/modules/mixly-modules/deps.json index d2f04a36..b8b446e3 100644 --- a/common/modules/mixly-modules/deps.json +++ b/common/modules/mixly-modules/deps.json @@ -1508,7 +1508,6 @@ "Mixly.Env", "Mixly.Msg", "Mixly.Ampy", - "Mixly.Config", "Mixly.Web" ], "provide": [ diff --git a/common/modules/mixly-modules/web/ampy.js b/common/modules/mixly-modules/web/ampy.js index 81f4618e..fc3e8a02 100644 --- a/common/modules/mixly-modules/web/ampy.js +++ b/common/modules/mixly-modules/web/ampy.js @@ -5,7 +5,6 @@ goog.require('Mustache'); goog.require('Mixly.Env'); goog.require('Mixly.Msg'); goog.require('Mixly.Ampy'); -goog.require('Mixly.Config'); goog.require('Mixly.Web'); goog.provide('Mixly.Web.Ampy'); @@ -13,7 +12,6 @@ const { Env, Msg, Ampy, - Config, Web } = Mixly; @@ -185,14 +183,6 @@ class AmpyExt extends Ampy { this.#active_ = true; await this.#device_.open(115200); await this.#device_.sleep(500); - const { SELECTED_BOARD } = Config; - if (SELECTED_BOARD?.serial - && SELECTED_BOARD.serial?.dtr !== undefined - && SELECTED_BOARD.serial?.rts !== undefined) { - const { dtr, rts } = SELECTED_BOARD.serial; - await this.#device_.setDTRAndRTS(dtr, rts); - } - await this.#device_.sleep(500); await this.#device_.sendBuffer([2]); if (!await this.interrupt()) { throw new Error(Msg.Lang['ampy.interruptFailed']);