update code generation

This commit is contained in:
Mario
2020-09-29 11:33:06 +02:00
parent eceaa91713
commit 44d14687be
2 changed files with 6 additions and 1 deletions
@@ -15,7 +15,7 @@ const setVariableFunction = function (defaultValue) {
const allVars = Blockly.getMainWorkspace().getVariableMap().getAllVariables();
const myVar = allVars.filter(v => v.name === variableName)[0]
Blockly.Arduino.variables_[myVar] = myVar.type + " " + myVar.name + ';\n';
Blockly.Arduino.variables_[myVar + myVar.type] = myVar.type + " " + myVar.name + ';\n';
return variableName + ' = ' + (variableValue || defaultValue) + ';\n';
};
};