Update: 在线版ampy上传前以及serial打开时不再对dtr和rts进行设置
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -1508,7 +1508,6 @@
|
||||
"Mixly.Env",
|
||||
"Mixly.Msg",
|
||||
"Mixly.Ampy",
|
||||
"Mixly.Config",
|
||||
"Mixly.Web"
|
||||
],
|
||||
"provide": [
|
||||
|
||||
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user