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