Skip to content

Commit

Permalink
Change in rangefingers and wheels blocks. Disable google analitic in …
Browse files Browse the repository at this point in the history
…blockfactory
  • Loading branch information
vertigra committed Aug 30, 2022
1 parent ff67443 commit f390cbc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions source/blocks/adam_two.js
Original file line number Diff line number Diff line change
Expand Up @@ -1196,10 +1196,10 @@ Blockly.defineBlocksWithJsonArray([
*/
{
"type": "import_adam_rangefinders",
"message0": "инициализация дальномеров",
"message0": "инициализация дальномеров и колес",
"output": null,
"colour": 230,
"tooltip": "Инициализация экземпляра класса для работы с дальномерами",
"tooltip": "Инициализация экземпляра класса для работы с дальномерами и колесами",
"helpUrl": ""
}

Expand Down
2 changes: 1 addition & 1 deletion source/demos/blockfactory/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<script>
var blocklyFactory;
var init = function() {
BlocklyDevTools.Analytics.init();
<!--BlocklyDevTools.Analytics.init();-->

blocklyFactory = new AppController();
blocklyFactory.init();
Expand Down
8 changes: 4 additions & 4 deletions source/generators/python/adam_two.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ Blockly.Python['wheels_left_leg'] = function(block) {
var variable_imu = Blockly.Python.nameDB_.getName(block.getFieldValue('imu'), Blockly.Variables.NAME_TYPE);
var value_first_motor = Blockly.Python.valueToCode(block, 'first_motor', Blockly.Python.ORDER_ATOMIC);
var value_second_motor = Blockly.Python.valueToCode(block, 'second_motor', Blockly.Python.ORDER_ATOMIC);
var code = variable_imu + '.motor(' + value_first_motor + ', ' + value_second_motor + ', 17, 0)\n';
var code = variable_imu + '.setMotion(17, ' + value_first_motor + ', ' + value_second_motor + ')\n';
return code;
};

Expand All @@ -298,7 +298,7 @@ Blockly.Python['wheels_right_leg'] = function(block) {
var variable_imu = Blockly.Python.nameDB_.getName(block.getFieldValue('imu'), Blockly.Variables.NAME_TYPE);
var value_first_motor = Blockly.Python.valueToCode(block, 'first_motor', Blockly.Python.ORDER_ATOMIC);
var value_second_motor = Blockly.Python.valueToCode(block, 'second_motor', Blockly.Python.ORDER_ATOMIC);
var code = variable_imu + '.motor(' + value_first_motor + ', ' + value_second_motor + ', 103, 0)\n';
var code = variable_imu + '.setMotion(103, ' + value_first_motor + ', ' + value_second_motor + ')\n';
return code;
};

Expand All @@ -310,7 +310,7 @@ Blockly.Python['wheels_left_leg_extended'] = function(block) {
var variable_imu = Blockly.Python.nameDB_.getName(block.getFieldValue('imu'), Blockly.Variables.NAME_TYPE);
var value_first_motor = Blockly.Python.valueToCode(block, 'first_motor', Blockly.Python.ORDER_ATOMIC);
var value_second_motor = Blockly.Python.valueToCode(block, 'second_motor', Blockly.Python.ORDER_ATOMIC);
var code = variable_imu + '.motor(' + value_first_motor + ', ' + value_second_motor + ', 17, 255)';
var code = variable_imu + '.setMotion(17, ' + value_first_motor + ', ' + value_second_motor + ', True)';
return [code, Blockly.Python.ORDER_NONE];
};

Expand All @@ -322,7 +322,7 @@ Blockly.Python['wheels_right_leg_extended'] = function(block) {
var variable_imu = Blockly.Python.nameDB_.getName(block.getFieldValue('imu'), Blockly.Variables.NAME_TYPE);
var value_first_motor = Blockly.Python.valueToCode(block, 'first_motor', Blockly.Python.ORDER_ATOMIC);
var value_second_motor = Blockly.Python.valueToCode(block, 'second_motor', Blockly.Python.ORDER_ATOMIC);
var code = variable_imu + '.motor(' + value_first_motor + ', ' + value_second_motor + ', 103, 255)';
var code = variable_imu + '.setMotion(103, ' + value_first_motor + ', ' + value_second_motor + ', True)';
return [code, Blockly.Python.ORDER_NONE];
};

Expand Down

0 comments on commit f390cbc

Please sign in to comment.