Fix(boards): 修复arduino板卡函数创建块参数初始化异常
This commit is contained in:
@@ -182,6 +182,7 @@ export const procedures_defnoreturn = {
|
||||
// to separate params from variables.
|
||||
'name': this.argumentVarModels_[i].name,
|
||||
'id': this.argumentVarModels_[i].getId(),
|
||||
'type': this.argumentstype_[i],
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -198,6 +199,7 @@ export const procedures_defnoreturn = {
|
||||
*/
|
||||
loadExtraState: function (state) {
|
||||
this.arguments_ = [];
|
||||
this.argumentstype_ = [];
|
||||
this.argumentVarModels_ = [];
|
||||
if (state['params']) {
|
||||
for (let i = 0; i < state['params'].length; i++) {
|
||||
@@ -209,6 +211,7 @@ export const procedures_defnoreturn = {
|
||||
'',
|
||||
);
|
||||
this.arguments_.push(variable.name);
|
||||
this.argumentstype_.push(param['type']);
|
||||
this.argumentVarModels_.push(variable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,16 +62,16 @@ export default class FSArduEsp8266Handler extends FSBoardHandler {
|
||||
const fsType = this.getFSType();
|
||||
let arch = 'x64';
|
||||
switch (process.arch) {
|
||||
case 'arm64':
|
||||
case 'arm':
|
||||
arch = 'arm';
|
||||
break;
|
||||
case 'ia32':
|
||||
arch = 'x32';
|
||||
break;
|
||||
case 'x64':
|
||||
default:
|
||||
arch = 'x64';
|
||||
case 'arm64':
|
||||
case 'arm':
|
||||
arch = 'arm';
|
||||
break;
|
||||
case 'ia32':
|
||||
arch = 'x32';
|
||||
break;
|
||||
case 'x64':
|
||||
default:
|
||||
arch = 'x64';
|
||||
}
|
||||
const platform = Env.currentPlatform;
|
||||
const fsToolInfo = FS_INFO[`mk${fsType}`];
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { Workspace, ContextMenu } from 'mixly';
|
||||
import FSArduEsp8266Handler from './fs-board-handler';
|
||||
import { Msg } from 'blockly/core';
|
||||
import * as goog from 'goog';
|
||||
|
||||
|
||||
export default function addBoardFSItem () {
|
||||
const mainWorkspace = Workspace.getMain();
|
||||
|
||||
Reference in New Issue
Block a user