Update: 在线版ampy上传前以及serial打开时不再对dtr和rts进行设置

This commit is contained in:
王立帮
2025-03-23 13:14:23 +08:00
parent 4f3f00bb22
commit 28b2cf8dfc
3 changed files with 0 additions and 17 deletions

View File

@@ -458,12 +458,6 @@ class StatusBarSerial extends PageBase {
async open() { async open() {
await this.#serial_.open(this.#config_.baud); 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) { if (SELECTED_BOARD?.serial?.ctrlCBtn) {
await this.#serial_.sleep(500); await this.#serial_.sleep(500);
await this.#serial_.interrupt(); await this.#serial_.interrupt();

View File

@@ -1508,7 +1508,6 @@
"Mixly.Env", "Mixly.Env",
"Mixly.Msg", "Mixly.Msg",
"Mixly.Ampy", "Mixly.Ampy",
"Mixly.Config",
"Mixly.Web" "Mixly.Web"
], ],
"provide": [ "provide": [

View File

@@ -5,7 +5,6 @@ goog.require('Mustache');
goog.require('Mixly.Env'); goog.require('Mixly.Env');
goog.require('Mixly.Msg'); goog.require('Mixly.Msg');
goog.require('Mixly.Ampy'); goog.require('Mixly.Ampy');
goog.require('Mixly.Config');
goog.require('Mixly.Web'); goog.require('Mixly.Web');
goog.provide('Mixly.Web.Ampy'); goog.provide('Mixly.Web.Ampy');
@@ -13,7 +12,6 @@ const {
Env, Env,
Msg, Msg,
Ampy, Ampy,
Config,
Web Web
} = Mixly; } = Mixly;
@@ -185,14 +183,6 @@ class AmpyExt extends Ampy {
this.#active_ = true; this.#active_ = true;
await this.#device_.open(115200); await this.#device_.open(115200);
await this.#device_.sleep(500); 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]); await this.#device_.sendBuffer([2]);
if (!await this.interrupt()) { if (!await this.interrupt()) {
throw new Error(Msg.Lang['ampy.interruptFailed']); throw new Error(Msg.Lang['ampy.interruptFailed']);