Commit f95e3a4e authored by carlosperate's avatar carlosperate

Correcting accidental left over from cut and paste.

parent badc28ac
......@@ -54,7 +54,7 @@ Blockly.Blocks['io_digitalread'] = {
/**
* Retrieves the type of return value for the block, in this case an integer.
*/
getType: function(existingVars) {
getType: function() {
return 'int';
}
};
......@@ -82,7 +82,7 @@ Blockly.Blocks['io_builtin_led'] = {
/**
* Retrieves the type of return value for the block, in this case an integer.
*/
getType: function(existingVars) {
getType: function() {
return 'int';
}
};
......@@ -125,7 +125,7 @@ Blockly.Blocks['io_analogread'] = {
/**
* Retrieves the type of return value for the block, in this case an integer.
*/
getType: function(existingVars) {
getType: function() {
return 'int';
}
};
......@@ -148,7 +148,7 @@ Blockly.Blocks['io_highlow'] = {
/**
* Retrieves the type of return value for the block, in this case a boolean.
*/
getType: function(existingVars) {
getType: function() {
return 'int';
}
};
......@@ -40,7 +40,6 @@ Blockly.Blocks['base_map'] = {
/**
* Assigns a type to the block, the current map implementation for Arduino
* takes the inputs a longs and returns a long, so automatic cast to int.
* @this Blockly.Block
*/
getType: function() {
return 'int';
......
......@@ -330,7 +330,6 @@ Blockly.Blocks['logic_compare'] = {
},
/**
* Assigns a type to the block, comparison operations result in booleans.
* @this Blockly.Block
*/
getType: function() {
return 'boolean';
......@@ -368,7 +367,6 @@ Blockly.Blocks['logic_operation'] = {
},
/**
* Assigns a type to the block, logic comparison operations result in bools.
* @this Blockly.Block
*/
getType: function() {
return 'boolean';
......@@ -392,7 +390,6 @@ Blockly.Blocks['logic_negate'] = {
/**
* Assigns a type to the block, not input is meant to be a booleans, so it
* should return the same.
* @this Blockly.Block
*/
getType: function() {
return 'boolean';
......@@ -417,7 +414,6 @@ Blockly.Blocks['logic_boolean'] = {
},
/**
* Assigns a type to the boolean block.
* @this Blockly.Block
*/
getType: function() {
return 'boolean';
......
......@@ -212,7 +212,7 @@ Blockly.Blocks['controls_for'] = {
* Retrieves the type of the selected variable, defined at getVarType.
* @this Blockly.Block
*/
getType: function(existingVars) {
getType: function() {
return this.varType;
}
};
......
......@@ -140,7 +140,6 @@ Blockly.Blocks['math_single'] = {
},
/**
* Assigns a type to the block, all these operations are floats.
* @this Blockly.Block
*/
getType: function() {
return 'float';
......@@ -183,7 +182,6 @@ Blockly.Blocks['math_trig'] = {
},
/**
* Assigns a type to the block, all these operations are floats.
* @this Blockly.Block
*/
getType: function() {
return 'float';
......@@ -212,7 +210,6 @@ Blockly.Blocks['math_constant'] = {
},
/**
* Assigns a type to the block, all these operations are floats.
* @this Blockly.Block
*/
getType: function() {
return 'float';
......@@ -287,7 +284,6 @@ Blockly.Blocks['math_number_property'] = {
},
/**
* Assigns a type to the block, all these operations return booleans.
* @this Blockly.Block
*/
getType: function() {
return 'boolean';
......@@ -381,7 +377,7 @@ Blockly.Blocks['math_change'] = {
* Retrieves the type of the selected variable, defined at getVarType.
* @this Blockly.Block
*/
getType: function(existingVars) {
getType: function() {
return this.varType;
}
};
......@@ -406,7 +402,6 @@ Blockly.Blocks['math_round'] = {
},
/**
* Assigns a type to the block, round always returns a float.
* @this Blockly.Block
*/
getType: function() {
return 'float';
......@@ -480,7 +475,6 @@ Blockly.Blocks['math_modulo'] = {
},
/**
* Assigns a type to the block, modulus only works on integers.
* @this Blockly.Block
*/
getType: function() {
return 'int';
......@@ -525,7 +519,6 @@ Blockly.Blocks['math_random_int'] = {
},
/**
* Assigns a type to the block, always an int.
* @this Blockly.Block
*/
getType: function() {
return 'int';
......@@ -547,7 +540,6 @@ Blockly.Blocks['math_random_float'] = {
},
/**
* Assigns a type to the block, always a float.
* @this Blockly.Block
*/
getType: function() {
return 'float';
......
......@@ -62,7 +62,6 @@ Blockly.Blocks['text'] = {
},
/**
* Assigns a type to the block, it always returns a string.
* @this Blockly.Block
*/
getType: function() {
return 'String';
......@@ -196,7 +195,6 @@ Blockly.Blocks['text_join'] = {
},
/**
* Assigns a type to the block, it always returns a string.
* @this Blockly.Block
*/
getType: function() {
return 'String';
......@@ -329,7 +327,6 @@ Blockly.Blocks['text_length'] = {
},
/**
* Assigns a type to the block, length always returns an integer number.
* @this Blockly.Block
*/
getType: function() {
return 'int';
......@@ -352,7 +349,6 @@ Blockly.Blocks['text_isEmpty'] = {
},
/**
* Assigns a type to the block, empty check always returns a boolean.
* @this Blockly.Block
*/
getType: function() {
return 'boolean';
......@@ -616,7 +612,6 @@ Blockly.Blocks['text_trim'] = {
},
/**
* Assigns a type to the block, trim always takes and returns a string.
* @this Blockly.Block
*/
getType: function() {
return 'String';
......@@ -677,7 +672,6 @@ Blockly.Blocks['text_prompt'] = {
newQuote_: Blockly.Blocks['text'].newQuote_,
/**
* Assigns a type to the block, prompt always returns a string.
* @this Blockly.Block
*/
getType: function() {
return 'String';
......@@ -717,7 +711,6 @@ Blockly.Blocks['text_prompt_ext'] = {
},
/**
* Assigns a type to the block, prompt always returns a string.
* @this Blockly.Block
*/
getType: function() {
return 'String';
......
......@@ -86,8 +86,8 @@ Blockly.Blocks['variables_get'] = {
options.push(option);
},
/**
* Assigns a type to the variable. In this case we need to find the original
* variable set block for the selected variable and set that type.
* Finds the type of the selected variable. Need to find the original
* variable set block to save the type into the varType block variable.
* @this Blockly.Block
* @param {Array<string>} existingVars List of variables already defined.
* @return {string} String to indicate the type if it has not been defined
......@@ -124,7 +124,7 @@ Blockly.Blocks['variables_get'] = {
* Retrieves the type of the selected variable, defined at getVarType.
* @this Blockly.Block
*/
getType: function(existingVars) {
getType: function() {
return this.varType;
}
};
......
......@@ -234,9 +234,9 @@ Blockly.Arduino['math_number_property'] = function(block) {
/**
* Generator to add (Y) to a variable (X).
* If variable X has not been declared before this block it will be declared as
* a (not initialised) global int, however globals are 0 initialised in C/C++.
* Arduino code: loop { X += Y; }
* TODO: Might need to include "#define _USE_MATH_DEFINES"
* The arduino header file already includes math.h
* @param {!Blockly.Block} block Block to generate the code from.
* @return {array} Completed code with order of operation.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment