Skip to content

Commit

Permalink
changed for MP
Browse files Browse the repository at this point in the history
  • Loading branch information
puttley committed Dec 5, 2023
1 parent 1046ae4 commit 2a9bb69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions msl_generator.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Blockly.Python['program_begin'] = function(block) {
Blockly.Python.definitions_['import'] = 'import MSL_CS as msl' + '\n' + 'msl.waitForStart()' + '\n' + 'msl.setupToF(1)' + '\n' + 'msl.setupToF(2)' + '\n' + 'msl.resetEncoder(1234)' + '\n' + 'msl.setEnableMotors()' +'\n'; // forces statement to top of code generator
Blockly.Python.definitions_['import'] = 'import msl' + '\n' + 'import time' + '\n' +'msl.waitForStart()' + '\n' + 'msl.setupToF(1)' + '\n' + 'msl.setupToF(2)' + '\n' + 'msl.resetEncoder(1234)' + '\n' + 'msl.setEnableMotors()' +'\n'; // forces statement to top of code generator
var code = '\n';
return code;
};
Expand Down Expand Up @@ -219,7 +219,7 @@ Blockly.Python['set_drive_invert'] = function(block) {

Blockly.Python['delay'] = function(block) {
var number_name = block.getFieldValue('NAME');
var code = 'msl.time.sleep(' + number_name + ')\n';
var code = 'time.sleep(' + number_name + ')\n';
return code;
};

Expand Down

0 comments on commit 2a9bb69

Please sign in to comment.