Fix(boards): 修复arduino板卡函数创建块参数初始化异常

This commit is contained in:
王立帮
2025-03-02 00:20:46 +08:00
parent 6b8f28ed8f
commit dc15f0d13f
6 changed files with 18 additions and 13 deletions

View File

@@ -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);
}
}