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