fix(core): 修复web compiler下烧录esp32固件异常
This commit is contained in:
@@ -1787,6 +1787,7 @@
|
|||||||
"Mixly.Workspace",
|
"Mixly.Workspace",
|
||||||
"Mixly.LayerProgress",
|
"Mixly.LayerProgress",
|
||||||
"Mixly.Web.Serial",
|
"Mixly.Web.Serial",
|
||||||
|
"Mixly.Web.SerialTransport",
|
||||||
"Mixly.WebCompiler"
|
"Mixly.WebCompiler"
|
||||||
],
|
],
|
||||||
"provide": [
|
"provide": [
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ goog.require('Mixly.Msg');
|
|||||||
goog.require('Mixly.Workspace');
|
goog.require('Mixly.Workspace');
|
||||||
goog.require('Mixly.LayerProgress');
|
goog.require('Mixly.LayerProgress');
|
||||||
goog.require('Mixly.Web.Serial');
|
goog.require('Mixly.Web.Serial');
|
||||||
|
goog.require('Mixly.Web.SerialTransport');
|
||||||
goog.require('Mixly.WebCompiler');
|
goog.require('Mixly.WebCompiler');
|
||||||
goog.provide('Mixly.WebCompiler.ArduShell');
|
goog.provide('Mixly.WebCompiler.ArduShell');
|
||||||
|
|
||||||
@@ -26,7 +27,7 @@ const {
|
|||||||
WebCompiler
|
WebCompiler
|
||||||
} = Mixly;
|
} = Mixly;
|
||||||
|
|
||||||
const { Serial } = Web;
|
const { Serial, SerialTransport } = Web;
|
||||||
const { layer } = layui;
|
const { layer } = layui;
|
||||||
const { ESPLoader, Transport } = esptooljs;
|
const { ESPLoader, Transport } = esptooljs;
|
||||||
|
|
||||||
@@ -278,13 +279,14 @@ class WebCompilerArduShell {
|
|||||||
try {
|
try {
|
||||||
const keys = Boards.getSelectedBoardKey().split(':');
|
const keys = Boards.getSelectedBoardKey().split(':');
|
||||||
if (`${keys[0]}:${keys[1]}` === 'esp32:esp32') {
|
if (`${keys[0]}:${keys[1]}` === 'esp32:esp32') {
|
||||||
baudrate = Boards.getSelectedBoardConfigParam('UploadSpeed');
|
baudrate = Boards.getSelectedBoardConfigParam('UploadSpeed') || 115200;
|
||||||
eraseAll = Boards.getSelectedBoardConfigParam('EraseFlash') === 'all';
|
eraseAll = Boards.getSelectedBoardConfigParam('EraseFlash') === 'all';
|
||||||
} else {
|
} else {
|
||||||
baudrate = Boards.getSelectedBoardConfigParam('baud');
|
baudrate = Boards.getSelectedBoardConfigParam('baud') || 115200;
|
||||||
eraseAll = Boards.getSelectedBoardConfigParam('wipe') === 'all';
|
eraseAll = Boards.getSelectedBoardConfigParam('wipe') === 'all';
|
||||||
}
|
}
|
||||||
transport = new Transport(Serial.getPort(port), false);
|
const serial = new Serial(port);
|
||||||
|
transport = new SerialTransport(serial, false);
|
||||||
esploader = new ESPLoader({
|
esploader = new ESPLoader({
|
||||||
transport,
|
transport,
|
||||||
baudrate,
|
baudrate,
|
||||||
|
|||||||
Reference in New Issue
Block a user