Merge branch 'master' of https://gitee.com/bnu_mixly/mixly3
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -36,7 +36,7 @@ except Exception as e:
|
||||
'''IMU-Sensor'''
|
||||
try :
|
||||
import qmi8658
|
||||
onboard_imu = qmi8658.QMI8658(onboard_i2c, 0x6A)
|
||||
onboard_imu = qmi8658.QMI8658(onboard_i2c)
|
||||
except Exception as e:
|
||||
print("Warning: Failed to communicate with QMI8658 (IMU) or",e)
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -171,7 +171,6 @@ export const turtle_setxy = {
|
||||
};
|
||||
|
||||
export const turtle_pos_shape = {
|
||||
|
||||
init: function () {
|
||||
this.setColour(TURTLE_HUE);
|
||||
var pos_shape =
|
||||
@@ -200,6 +199,18 @@ export const turtle_pos_shape = {
|
||||
}
|
||||
};
|
||||
|
||||
export const turtle_stamp = {
|
||||
init: function () {
|
||||
this.setColour(TURTLE_HUE);
|
||||
this.appendValueInput('TUR')
|
||||
.setCheck('Turtle')
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.TURTLE_STAMP);
|
||||
this.setInputsInline(true);
|
||||
this.setPreviousStatement(true);
|
||||
this.setNextStatement(true);
|
||||
}
|
||||
};
|
||||
|
||||
export const turtle_clear = {
|
||||
init: function () {
|
||||
@@ -211,8 +222,6 @@ export const turtle_clear = {
|
||||
this.setColour(TURTLE_HUE);
|
||||
this.appendDummyInput("")
|
||||
.appendField(new Blockly.FieldDropdown(clear_reset), 'DIR')
|
||||
|
||||
|
||||
this.setInputsInline(true);
|
||||
this.setPreviousStatement(true);
|
||||
this.setNextStatement(true);
|
||||
|
||||
@@ -75,6 +75,13 @@ export const turtle_pos_shape = function (_, generator) {
|
||||
return [code, generator.ORDER_ATOMIC];
|
||||
}
|
||||
|
||||
export const turtle_stamp = function (_, generator) {
|
||||
generator.definitions_.import_turtle = "import turtle";
|
||||
var varName = generator.valueToCode(this, 'TUR', generator.ORDER_ASSIGNMENT) || '0';
|
||||
var code = varName + '.stamp()\n';
|
||||
return code;
|
||||
}
|
||||
|
||||
export const turtle_clear = function (_, generator) {
|
||||
generator.definitions_.import_turtle = "import turtle";
|
||||
var varName = generator.valueToCode(this, 'TUR', generator.ORDER_ASSIGNMENT) || '0';
|
||||
|
||||
@@ -1814,6 +1814,13 @@
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="turtle_stamp">
|
||||
<value name="TUR">
|
||||
<shadow type="variables_get">
|
||||
<field name="VAR">tina</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="turtle_clear">
|
||||
<value name="TUR">
|
||||
<shadow type="variables_get">
|
||||
|
||||
@@ -1777,6 +1777,13 @@
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="turtle_stamp">
|
||||
<value name="TUR">
|
||||
<shadow type="variables_get">
|
||||
<field name="VAR">tina</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="turtle_clear">
|
||||
<value name="TUR">
|
||||
<shadow type="variables_get">
|
||||
|
||||
@@ -1445,6 +1445,13 @@
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="turtle_stamp">
|
||||
<value name="TUR">
|
||||
<shadow type="variables_get">
|
||||
<field name="VAR">tina</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="turtle_clear">
|
||||
<value name="TUR">
|
||||
<shadow type="variables_get">
|
||||
|
||||
Reference in New Issue
Block a user