Merge pull request #2 from roboticafacil/master

movement block fixed for "walk" option
This commit is contained in:
Lukas Bachschwell 2017-12-16 11:43:31 +01:00 committed by GitHub
commit b10f90a19a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,7 +178,7 @@ Blockly.Arduino['LARS_movement'] = function() {
try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_PERIOD'),'TEXT2');}catch (e) {}
if (this._inp3_removed)
{
this.appendDummyInput('INP3').appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_DIR'),'TEXT3').appendField(new Blockly.FieldDropdown([['Forward','0'],['Backward','1']]),'FIELD3').setAlign(Blockly.ALIGN_RIGHT);
this.appendDummyInput('INP3').appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_DIR'),'TEXT3').appendField(new Blockly.FieldDropdown([[Facilino.locales.getKey('LANG_LARS_MOVEMENT_FORWARD'),'0'],[Facilino.locales.getKey('LANG_LARS_MOVEMENT_BACKWARD'),'1']]),'FIELD3').setAlign(Blockly.ALIGN_RIGHT);
this._inp3_removed=false;
}
else
@ -201,7 +201,7 @@ Blockly.Arduino['LARS_movement'] = function() {
try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_PERIOD'),'TEXT2');}catch (e) {}
if (this._inp3_removed)
{
this.appendDummyInput('INP3').appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_DIR'),'TEXT3').appendField(new Blockly.FieldDropdown([['Yes','true'],['No','false']]),'FIELD3').setAlign(Blockly.ALIGN_RIGHT);
this.appendDummyInput('INP3').appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_DIR'),'TEXT3').appendField(new Blockly.FieldDropdown([[Facilino.locales.getKey('LANG_LARS_MOVEMENT_YES'),'true'],[Facilino.locales.getKey('LANG_LARS_MOVEMENT_NO'),'false']]),'FIELD3').setAlign(Blockly.ALIGN_RIGHT);
this._inp3_removed=false;
}
else