1 parent d875713 commit cb5d792Copy full SHA for cb5d792
1 file changed
blocks/webduino.js
@@ -1017,7 +1017,13 @@ Blockly.Blocks['board'] = {
1017
onchange: function(ev) {
1018
switch(ev.name) {
1019
case 'board_':
1020
- Blockly.Blocks['board']['board_type'] = ev.newValue;
+ var newValue = ev.newValue;
1021
+ Blockly.Blocks['board']['board_type'] = newValue;
1022
+ if (newValue == '1') {
1023
+ this.getField('rate_').setValue('250');
1024
+ } else if (newValue == '2') {
1025
+ this.getField('rate_').setValue('50');
1026
+ }
1027
this.getField('type_').setValue('1')
1028
break;
1029
}
0 commit comments