feat(boards): 调整micropython下板载RFID图形块
This commit is contained in:
@@ -796,6 +796,21 @@ export const rfid_write_return = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const rfid_status = {
|
||||||
|
init: function () {
|
||||||
|
this.setColour(SENSOR_ONBOARD_HUE);
|
||||||
|
this.appendDummyInput("")
|
||||||
|
.appendField("RFID")
|
||||||
|
.appendField(new Blockly.FieldDropdown([
|
||||||
|
[Blockly.Msg.MIXLY_RFID_SCAN_OK, "True"],
|
||||||
|
[Blockly.Msg.MIXLY_RFID_SCAN_NOTAGERR, "None"],
|
||||||
|
[Blockly.Msg.MIXLY_RFID_SCAN_ERROR, "False"]
|
||||||
|
]), "key");
|
||||||
|
this.setOutput(true, Number);
|
||||||
|
this.setInputsInline(true);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
export const sensor_get_acceleration = {
|
export const sensor_get_acceleration = {
|
||||||
init: function () {
|
init: function () {
|
||||||
this.setColour(SENSOR_ONBOARD_HUE);
|
this.setColour(SENSOR_ONBOARD_HUE);
|
||||||
|
|||||||
@@ -268,28 +268,16 @@ export const sensor_get_temperature = function (_, generator) {
|
|||||||
|
|
||||||
export const rfid_readid = function (_, generator) {
|
export const rfid_readid = function (_, generator) {
|
||||||
var version = Boards.getSelectedBoardKey().split(':')[2];
|
var version = Boards.getSelectedBoardKey().split(':')[2];
|
||||||
if(version == 'mixgo_mini'){
|
generator.definitions_[`import_${version}_onboard_rfid`] = `from ${version} import onboard_rfid`;
|
||||||
generator.definitions_['import_mini_g2'] = 'import mini_g2';
|
|
||||||
generator.definitions_['import_mini_g2_ext_rfid'] = 'from mini_g2 import ext_rfid';
|
|
||||||
var code = 'ext_rfid.read_card(0, x="id")';
|
|
||||||
}else{
|
|
||||||
generator.definitions_['import_' + version + '_onboard_rfid'] = "from " + version + " import onboard_rfid";
|
|
||||||
var code = 'onboard_rfid.read_card(0, x="id")';
|
var code = 'onboard_rfid.read_card(0, x="id")';
|
||||||
}
|
|
||||||
return [code, generator.ORDER_ATOMIC];
|
return [code, generator.ORDER_ATOMIC];
|
||||||
}
|
}
|
||||||
|
|
||||||
export const rfid_readcontent = function (_, generator) {
|
export const rfid_readcontent = function (_, generator) {
|
||||||
var version = Boards.getSelectedBoardKey().split(':')[2];
|
var version = Boards.getSelectedBoardKey().split(':')[2];
|
||||||
var sector = generator.valueToCode(this, 'SECTOR', generator.ORDER_ATOMIC);
|
var sector = generator.valueToCode(this, 'SECTOR', generator.ORDER_ATOMIC);
|
||||||
if(version == 'mixgo_mini'){
|
generator.definitions_[`import_${version}_onboard_rfid`] = `from ${version} import onboard_rfid`;
|
||||||
generator.definitions_['import_mini_g2'] = 'import mini_g2';
|
var code = `onboard_rfid.read_card(${sector}, x="content")`;
|
||||||
generator.definitions_['import_mini_g2_ext_rfid'] = 'from mini_g2 import ext_rfid';
|
|
||||||
var code = 'ext_rfid.read_card(' + sector + ')';
|
|
||||||
}else{
|
|
||||||
generator.definitions_['import_' + version + '_onboard_rfid'] = "from " + version + " import onboard_rfid";
|
|
||||||
var code = 'onboard_rfid.read_card(' + sector + ', x="content")';
|
|
||||||
}
|
|
||||||
return [code, generator.ORDER_ATOMIC];
|
return [code, generator.ORDER_ATOMIC];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -297,14 +285,8 @@ export const rfid_write = function (_, generator) {
|
|||||||
var version = Boards.getSelectedBoardKey().split(':')[2];
|
var version = Boards.getSelectedBoardKey().split(':')[2];
|
||||||
var sector = generator.valueToCode(this, 'SECTOR', generator.ORDER_ATOMIC);
|
var sector = generator.valueToCode(this, 'SECTOR', generator.ORDER_ATOMIC);
|
||||||
var cnt = generator.valueToCode(this, 'CONTENT', generator.ORDER_ATOMIC);
|
var cnt = generator.valueToCode(this, 'CONTENT', generator.ORDER_ATOMIC);
|
||||||
if(version == 'mixgo_mini'){
|
generator.definitions_[`import_${version}_onboard_rfid`] = `from ${version} import onboard_rfid`;
|
||||||
generator.definitions_['import_mini_g2'] = 'import mini_g2';
|
var code = `onboard_rfid.write_card(${cnt}, ${sector})\n`;
|
||||||
generator.definitions_['import_mini_g2_ext_rfid'] = 'from mini_g2 import ext_rfid';
|
|
||||||
var code = 'ext_rfid.write_card(' + cnt + ',' + sector + ')\n';
|
|
||||||
}else{
|
|
||||||
generator.definitions_['import_' + version + '_onboard_rfid'] = "from " + version + " import onboard_rfid";
|
|
||||||
var code = 'onboard_rfid.write_card(' + cnt + ', ' + sector + ')\n';
|
|
||||||
}
|
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,13 +294,16 @@ export const rfid_write_return = function (_, generator) {
|
|||||||
var version = Boards.getSelectedBoardKey().split(':')[2];
|
var version = Boards.getSelectedBoardKey().split(':')[2];
|
||||||
var sector = generator.valueToCode(this, 'SECTOR', generator.ORDER_ATOMIC);
|
var sector = generator.valueToCode(this, 'SECTOR', generator.ORDER_ATOMIC);
|
||||||
var cnt = generator.valueToCode(this, 'CONTENT', generator.ORDER_ATOMIC);
|
var cnt = generator.valueToCode(this, 'CONTENT', generator.ORDER_ATOMIC);
|
||||||
if (version == "mixgo_mini") {
|
generator.definitions_[`import_${version}_onboard_rfid`] = `from ${version} import onboard_rfid`;
|
||||||
generator.definitions_['import_mini_g2_ext_rfid'] = 'from mini_g2 import ext_rfid';
|
var code = `onboard_rfid.write_card(${cnt}, ${sector})`;
|
||||||
var code = 'ext_rfid.write_card(' + cnt + ',' + sector + ')';
|
return [code, generator.ORDER_ATOMIC];
|
||||||
} else {
|
}
|
||||||
generator.definitions_['import_' + version + '_onboard_rfid'] = "from " + version + " import onboard_rfid";
|
|
||||||
var code = 'onboard_rfid.write_card(' + cnt + ', ' + sector + ')';
|
export const rfid_status = function (_, generator) {
|
||||||
}
|
var version = Boards.getSelectedBoardKey().split(':')[2];
|
||||||
|
var key = this.getFieldValue('key');
|
||||||
|
generator.definitions_[`import_${version}_onboard_rfid`] = `from ${version} import onboard_rfid`;
|
||||||
|
var code = `onboard_rfid.scan_card() == ${key}`;
|
||||||
return [code, generator.ORDER_ATOMIC];
|
return [code, generator.ORDER_ATOMIC];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1522,13 +1522,8 @@
|
|||||||
<block type="sensor_mixgo_cc_mmc5603_calibrate_compass" m-show="micropython:esp32c2:mixgo_mini"></block>
|
<block type="sensor_mixgo_cc_mmc5603_calibrate_compass" m-show="micropython:esp32c2:mixgo_mini"></block>
|
||||||
<block type="sensor_mixgo_cc_mmc5603_get_magnetic" m-show="micropython:esp32c2:mixgo_mini"></block>
|
<block type="sensor_mixgo_cc_mmc5603_get_magnetic" m-show="micropython:esp32c2:mixgo_mini"></block>
|
||||||
<block type="sensor_mixgo_cc_mmc5603_get_angle" m-show="micropython:esp32c2:mixgo_mini"></block>
|
<block type="sensor_mixgo_cc_mmc5603_get_angle" m-show="micropython:esp32c2:mixgo_mini"></block>
|
||||||
<block type="rfid_readid" m-show='micropython:esp32c3:mixgo_cc'>
|
<block type="rfid_status" m-show='micropython:esp32c3:mixgo_cc'></block>
|
||||||
<value name="SUB">
|
<block type="rfid_readid" m-show='micropython:esp32c3:mixgo_cc'></block>
|
||||||
<shadow type="variables_get">
|
|
||||||
<field name="VAR">rfid</field>
|
|
||||||
</shadow>
|
|
||||||
</value>
|
|
||||||
</block>
|
|
||||||
<block type="rfid_readcontent" m-show='micropython:esp32c3:mixgo_cc'>
|
<block type="rfid_readcontent" m-show='micropython:esp32c3:mixgo_cc'>
|
||||||
<value name="SECTOR">
|
<value name="SECTOR">
|
||||||
<shadow type="math_number">
|
<shadow type="math_number">
|
||||||
@@ -4108,7 +4103,14 @@
|
|||||||
</next>
|
</next>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<block type="extern_rfid_readcontent" m-hide='micropython:esp32c3:mixgocar_c3'>
|
<block type="extern_rfid_status" m-hide='micropython:esp32c3:mixgocar_c3'>
|
||||||
|
<value name="SUB">
|
||||||
|
<shadow type="variables_get">
|
||||||
|
<field name="VAR">ysensor</field>
|
||||||
|
</shadow>
|
||||||
|
</value>
|
||||||
|
</block>
|
||||||
|
<block type="extern_rfid_readid" m-hide='micropython:esp32c3:mixgocar_c3'>
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
<field name="VAR">ysensor</field>
|
<field name="VAR">ysensor</field>
|
||||||
@@ -4120,7 +4122,7 @@
|
|||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="extern_rfid_readid" m-hide='micropython:esp32c3:mixgocar_c3'>
|
<block type="extern_rfid_readcontent" m-hide='micropython:esp32c3:mixgocar_c3'>
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
<field name="VAR">ysensor</field>
|
<field name="VAR">ysensor</field>
|
||||||
@@ -4167,14 +4169,6 @@
|
|||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<block type="extern_rfid_status" m-hide='micropython:esp32c3:mixgocar_c3'>
|
|
||||||
<value name="SUB">
|
|
||||||
<shadow type="variables_get">
|
|
||||||
<field name="VAR">ysensor</field>
|
|
||||||
</shadow>
|
|
||||||
</value>
|
|
||||||
</block>
|
|
||||||
|
|
||||||
<block type="weather_have_data" m-hide='micropython:esp32c3:mixgocar_c3'>
|
<block type="weather_have_data" m-hide='micropython:esp32c3:mixgocar_c3'>
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
|
|||||||
@@ -4006,8 +4006,14 @@
|
|||||||
</block>
|
</block>
|
||||||
</next>
|
</next>
|
||||||
</block>
|
</block>
|
||||||
|
<block type="extern_rfid_status">
|
||||||
<block type="extern_rfid_readcontent">
|
<value name="SUB">
|
||||||
|
<shadow type="variables_get">
|
||||||
|
<field name="VAR">ysensor</field>
|
||||||
|
</shadow>
|
||||||
|
</value>
|
||||||
|
</block>
|
||||||
|
<block type="extern_rfid_readid">
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
<field name="VAR">ysensor</field>
|
<field name="VAR">ysensor</field>
|
||||||
@@ -4019,7 +4025,7 @@
|
|||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="extern_rfid_readid">
|
<block type="extern_rfid_readcontent">
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
<field name="VAR">ysensor</field>
|
<field name="VAR">ysensor</field>
|
||||||
@@ -4065,13 +4071,6 @@
|
|||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="extern_rfid_status">
|
|
||||||
<value name="SUB">
|
|
||||||
<shadow type="variables_get">
|
|
||||||
<field name="VAR">ysensor</field>
|
|
||||||
</shadow>
|
|
||||||
</value>
|
|
||||||
</block>
|
|
||||||
<block type="weather_have_data">
|
<block type="weather_have_data">
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import * as Blockly from 'blockly/core';
|
import * as Blockly from 'blockly/core';
|
||||||
import { Boards } from 'mixly';
|
import { Boards } from 'mixly';
|
||||||
|
import { MicroPythonSensorOnBoardBlocks } from '@mixly/micropython';
|
||||||
|
|
||||||
const MEG1_HUE = 40;
|
const MEG1_HUE = 40;
|
||||||
|
|
||||||
@@ -60,6 +61,69 @@ export const mini_g2_varistor = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @override override "@micropython.MicroPythonSensorOnBoardBlocks.rfid_readid"
|
||||||
|
*/
|
||||||
|
export const rfid_readid = {
|
||||||
|
init: function () {
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField('MINI G2');
|
||||||
|
MicroPythonSensorOnBoardBlocks.rfid_readid.init.call(this);
|
||||||
|
this.setColour(MEG1_HUE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @override override "@micropython.MicroPythonSensorOnBoardBlocks.rfid_readcontent"
|
||||||
|
*/
|
||||||
|
export const rfid_readcontent = {
|
||||||
|
init: function () {
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField('MINI G2');
|
||||||
|
MicroPythonSensorOnBoardBlocks.rfid_readcontent.init.call(this);
|
||||||
|
this.setColour(MEG1_HUE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @override override "@micropython.MicroPythonSensorOnBoardBlocks.rfid_write"
|
||||||
|
*/
|
||||||
|
export const rfid_write = {
|
||||||
|
init: function () {
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField('MINI G2');
|
||||||
|
MicroPythonSensorOnBoardBlocks.rfid_write.init.call(this);
|
||||||
|
this.setColour(MEG1_HUE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @override override "@micropython.MicroPythonSensorOnBoardBlocks.rfid_write_return"
|
||||||
|
*/
|
||||||
|
export const rfid_write_return = {
|
||||||
|
init: function () {
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField('MINI G2');
|
||||||
|
MicroPythonSensorOnBoardBlocks.rfid_write_return.init.call(this);
|
||||||
|
this.setColour(MEG1_HUE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @override override "@micropython.MicroPythonSensorOnBoardBlocks.rfid_status"
|
||||||
|
*/
|
||||||
|
export const rfid_status = {
|
||||||
|
init: function () {
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField('MINI G2');
|
||||||
|
MicroPythonSensorOnBoardBlocks.rfid_status.init.call(this);
|
||||||
|
this.setColour(MEG1_HUE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated To be removed in the future
|
||||||
|
*/
|
||||||
export const mini_g2_rfid_readid = {
|
export const mini_g2_rfid_readid = {
|
||||||
init: function () {
|
init: function () {
|
||||||
var version = Boards.getSelectedBoardKey().split(':')[2]
|
var version = Boards.getSelectedBoardKey().split(':')[2]
|
||||||
@@ -70,11 +134,17 @@ export const mini_g2_rfid_readid = {
|
|||||||
.appendField("RFID" + Blockly.Msg.MIXLY_RFID_READ_CARD);
|
.appendField("RFID" + Blockly.Msg.MIXLY_RFID_READ_CARD);
|
||||||
this.appendDummyInput("")
|
this.appendDummyInput("")
|
||||||
.appendField(Blockly.Msg.MIXLY_RFID_READ_CARD_UID);
|
.appendField(Blockly.Msg.MIXLY_RFID_READ_CARD_UID);
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
|
||||||
this.setOutput(true, Number);
|
this.setOutput(true, Number);
|
||||||
this.setInputsInline(true);
|
this.setInputsInline(true);
|
||||||
|
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated To be removed in the future
|
||||||
|
*/
|
||||||
export const mini_g2_rfid_readcontent = {
|
export const mini_g2_rfid_readcontent = {
|
||||||
init: function () {
|
init: function () {
|
||||||
var version = Boards.getSelectedBoardKey().split(':')[2]
|
var version = Boards.getSelectedBoardKey().split(':')[2]
|
||||||
@@ -87,11 +157,17 @@ export const mini_g2_rfid_readcontent = {
|
|||||||
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
|
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
|
||||||
this.appendDummyInput("")
|
this.appendDummyInput("")
|
||||||
.appendField(Blockly.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL);
|
.appendField(Blockly.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL);
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
|
||||||
this.setOutput(true, Number);
|
this.setOutput(true, Number);
|
||||||
this.setInputsInline(true);
|
this.setInputsInline(true);
|
||||||
|
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated To be removed in the future
|
||||||
|
*/
|
||||||
export const mini_g2_rfid_write = {
|
export const mini_g2_rfid_write = {
|
||||||
init: function () {
|
init: function () {
|
||||||
var version = Boards.getSelectedBoardKey().split(':')[2]
|
var version = Boards.getSelectedBoardKey().split(':')[2]
|
||||||
@@ -103,13 +179,19 @@ export const mini_g2_rfid_write = {
|
|||||||
this.appendValueInput('SECTOR')
|
this.appendValueInput('SECTOR')
|
||||||
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
|
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
|
||||||
this.appendValueInput('CONTENT')
|
this.appendValueInput('CONTENT')
|
||||||
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_WRITE_NUM)
|
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_WRITE_NUM);
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
|
||||||
this.setInputsInline(true);
|
this.setInputsInline(true);
|
||||||
this.setPreviousStatement(true, null);
|
this.setPreviousStatement(true, null);
|
||||||
this.setNextStatement(true, null);
|
this.setNextStatement(true, null);
|
||||||
|
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated To be removed in the future
|
||||||
|
*/
|
||||||
export const mini_g2_rfid_write_outcome = {
|
export const mini_g2_rfid_write_outcome = {
|
||||||
init: function () {
|
init: function () {
|
||||||
var version = Boards.getSelectedBoardKey().split(':')[2]
|
var version = Boards.getSelectedBoardKey().split(':')[2]
|
||||||
@@ -119,16 +201,22 @@ export const mini_g2_rfid_write_outcome = {
|
|||||||
.appendField(name)
|
.appendField(name)
|
||||||
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_RFID_WRITE);
|
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_RFID_WRITE);
|
||||||
this.appendValueInput('SECTOR')
|
this.appendValueInput('SECTOR')
|
||||||
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
|
.appendField(Blockly.Msg.MIXLY_LIST_INDEX);
|
||||||
this.appendValueInput('CONTENT')
|
this.appendValueInput('CONTENT')
|
||||||
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_WRITE_NUM)
|
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_WRITE_NUM);
|
||||||
this.appendDummyInput()
|
this.appendDummyInput()
|
||||||
.appendField(Blockly.Msg.RETURN_SUCCESS_OR_NOT)
|
.appendField(Blockly.Msg.RETURN_SUCCESS_OR_NOT);
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
|
||||||
this.setInputsInline(true);
|
this.setInputsInline(true);
|
||||||
this.setOutput(true);
|
this.setOutput(true);
|
||||||
|
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated To be removed in the future
|
||||||
|
*/
|
||||||
export const mini_g2_rfid_status = {
|
export const mini_g2_rfid_status = {
|
||||||
init: function () {
|
init: function () {
|
||||||
var version = Boards.getSelectedBoardKey().split(':')[2]
|
var version = Boards.getSelectedBoardKey().split(':')[2]
|
||||||
@@ -143,7 +231,10 @@ export const mini_g2_rfid_status = {
|
|||||||
[Blockly.Msg.MIXLY_RFID_SCAN_NOTAGERR, "None"],
|
[Blockly.Msg.MIXLY_RFID_SCAN_NOTAGERR, "None"],
|
||||||
[Blockly.Msg.MIXLY_RFID_SCAN_ERROR, "False"]
|
[Blockly.Msg.MIXLY_RFID_SCAN_ERROR, "False"]
|
||||||
]), "key");
|
]), "key");
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
|
||||||
this.setOutput(true, Number);
|
this.setOutput(true, Number);
|
||||||
this.setInputsInline(true);
|
this.setInputsInline(true);
|
||||||
|
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -1986,15 +1986,16 @@
|
|||||||
<block type="cc_g1_turnoff"></block>
|
<block type="cc_g1_turnoff"></block>
|
||||||
</category>
|
</category>
|
||||||
<category id="catMINI_G2" colour="40" m-show='micropython:esp32c2:mixgo_mini'>
|
<category id="catMINI_G2" colour="40" m-show='micropython:esp32c2:mixgo_mini'>
|
||||||
<block type="mini_g2_rfid_readid"></block>
|
<block type="rfid_status"></block>
|
||||||
<block type="mini_g2_rfid_readcontent">
|
<block type="rfid_readid"></block>
|
||||||
|
<block type="rfid_readcontent">
|
||||||
<value name="SECTOR">
|
<value name="SECTOR">
|
||||||
<shadow type="math_number">
|
<shadow type="math_number">
|
||||||
<field name="NUM">0</field>
|
<field name="NUM">0</field>
|
||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="mini_g2_rfid_write">
|
<block type="rfid_write">
|
||||||
<value name="SECTOR">
|
<value name="SECTOR">
|
||||||
<shadow type="math_number">
|
<shadow type="math_number">
|
||||||
<field name="NUM">0</field>
|
<field name="NUM">0</field>
|
||||||
@@ -2006,7 +2007,7 @@
|
|||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="mini_g2_rfid_write_outcome">
|
<block type="rfid_write_return">
|
||||||
<value name="SECTOR">
|
<value name="SECTOR">
|
||||||
<shadow type="math_number">
|
<shadow type="math_number">
|
||||||
<field name="NUM">0</field>
|
<field name="NUM">0</field>
|
||||||
@@ -2018,7 +2019,6 @@
|
|||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="mini_g2_rfid_status"></block>
|
|
||||||
</category>
|
</category>
|
||||||
<category id="catIot" colour="#2FAD7A">
|
<category id="catIot" colour="#2FAD7A">
|
||||||
<category id="catBlynk" colour="#2FAD7A">
|
<category id="catBlynk" colour="#2FAD7A">
|
||||||
@@ -3854,7 +3854,14 @@
|
|||||||
</next>
|
</next>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<block type="extern_rfid_readcontent" m-hide='micropython:esp32c3:mixgocar_c3'>
|
<block type="extern_rfid_status" m-hide='micropython:esp32c3:mixgocar_c3'>
|
||||||
|
<value name="SUB">
|
||||||
|
<shadow type="variables_get">
|
||||||
|
<field name="VAR">ysensor</field>
|
||||||
|
</shadow>
|
||||||
|
</value>
|
||||||
|
</block>
|
||||||
|
<block type="extern_rfid_readid" m-hide='micropython:esp32c3:mixgocar_c3'>
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
<field name="VAR">ysensor</field>
|
<field name="VAR">ysensor</field>
|
||||||
@@ -3866,7 +3873,7 @@
|
|||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="extern_rfid_readid" m-hide='micropython:esp32c3:mixgocar_c3'>
|
<block type="extern_rfid_readcontent" m-hide='micropython:esp32c3:mixgocar_c3'>
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
<field name="VAR">ysensor</field>
|
<field name="VAR">ysensor</field>
|
||||||
@@ -3913,14 +3920,6 @@
|
|||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<block type="extern_rfid_status" m-hide='micropython:esp32c3:mixgocar_c3'>
|
|
||||||
<value name="SUB">
|
|
||||||
<shadow type="variables_get">
|
|
||||||
<field name="VAR">ysensor</field>
|
|
||||||
</shadow>
|
|
||||||
</value>
|
|
||||||
</block>
|
|
||||||
|
|
||||||
<block type="weather_have_data" m-hide='micropython:esp32c3:mixgocar_c3'>
|
<block type="weather_have_data" m-hide='micropython:esp32c3:mixgocar_c3'>
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import * as Blockly from 'blockly/core';
|
import * as Blockly from 'blockly/core';
|
||||||
import * as Mixly from 'mixly';
|
import * as Mixly from 'mixly';
|
||||||
|
import { MicroPythonSensorOnBoardBlocks } from '@mixly/micropython';
|
||||||
|
|
||||||
const MEG1_HUE = 40;
|
const MEG1_HUE = 40;
|
||||||
|
|
||||||
@@ -60,6 +61,69 @@ export const me_g1_varistor = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @override override "@micropython.MicroPythonSensorOnBoardBlocks.rfid_readid"
|
||||||
|
*/
|
||||||
|
export const rfid_readid = {
|
||||||
|
init: function () {
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField('ME G1');
|
||||||
|
MicroPythonSensorOnBoardBlocks.rfid_readid.init.call(this);
|
||||||
|
this.setColour(MEG1_HUE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @override override "@micropython.MicroPythonSensorOnBoardBlocks.rfid_readcontent"
|
||||||
|
*/
|
||||||
|
export const rfid_readcontent = {
|
||||||
|
init: function () {
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField('ME G1');
|
||||||
|
MicroPythonSensorOnBoardBlocks.rfid_readcontent.init.call(this);
|
||||||
|
this.setColour(MEG1_HUE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @override override "@micropython.MicroPythonSensorOnBoardBlocks.rfid_write"
|
||||||
|
*/
|
||||||
|
export const rfid_write = {
|
||||||
|
init: function () {
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField('ME G1');
|
||||||
|
MicroPythonSensorOnBoardBlocks.rfid_write.init.call(this);
|
||||||
|
this.setColour(MEG1_HUE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @override override "@micropython.MicroPythonSensorOnBoardBlocks.rfid_write_return"
|
||||||
|
*/
|
||||||
|
export const rfid_write_return = {
|
||||||
|
init: function () {
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField('ME G1');
|
||||||
|
MicroPythonSensorOnBoardBlocks.rfid_write_return.init.call(this);
|
||||||
|
this.setColour(MEG1_HUE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @override override "@micropython.MicroPythonSensorOnBoardBlocks.rfid_status"
|
||||||
|
*/
|
||||||
|
export const rfid_status = {
|
||||||
|
init: function () {
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField('ME G1');
|
||||||
|
MicroPythonSensorOnBoardBlocks.rfid_status.init.call(this);
|
||||||
|
this.setColour(MEG1_HUE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated To be removed in the future
|
||||||
|
*/
|
||||||
export const me_g1_rfid_readid = {
|
export const me_g1_rfid_readid = {
|
||||||
init: function () {
|
init: function () {
|
||||||
var version = Mixly.Boards.getSelectedBoardKey().split(':')[2]
|
var version = Mixly.Boards.getSelectedBoardKey().split(':')[2]
|
||||||
@@ -70,11 +134,17 @@ export const me_g1_rfid_readid = {
|
|||||||
.appendField("RFID" + Blockly.Msg.MIXLY_RFID_READ_CARD);
|
.appendField("RFID" + Blockly.Msg.MIXLY_RFID_READ_CARD);
|
||||||
this.appendDummyInput("")
|
this.appendDummyInput("")
|
||||||
.appendField(Blockly.Msg.MIXLY_RFID_READ_CARD_UID);
|
.appendField(Blockly.Msg.MIXLY_RFID_READ_CARD_UID);
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
|
||||||
this.setOutput(true, Number);
|
this.setOutput(true, Number);
|
||||||
this.setInputsInline(true);
|
this.setInputsInline(true);
|
||||||
|
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated To be removed in the future
|
||||||
|
*/
|
||||||
export const me_g1_rfid_readcontent = {
|
export const me_g1_rfid_readcontent = {
|
||||||
init: function () {
|
init: function () {
|
||||||
var version = Mixly.Boards.getSelectedBoardKey().split(':')[2]
|
var version = Mixly.Boards.getSelectedBoardKey().split(':')[2]
|
||||||
@@ -87,12 +157,42 @@ export const me_g1_rfid_readcontent = {
|
|||||||
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
|
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
|
||||||
this.appendDummyInput("")
|
this.appendDummyInput("")
|
||||||
.appendField(Blockly.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL);
|
.appendField(Blockly.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL);
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
|
||||||
this.setOutput(true, Number);
|
this.setOutput(true, Number);
|
||||||
this.setInputsInline(true);
|
this.setInputsInline(true);
|
||||||
|
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated To be removed in the future
|
||||||
|
*/
|
||||||
export const me_g1_rfid_write = {
|
export const me_g1_rfid_write = {
|
||||||
|
init: function () {
|
||||||
|
var version = Mixly.Boards.getSelectedBoardKey().split(':')[2]
|
||||||
|
if (version == "mixgo_me") { var name = 'ME G1' }
|
||||||
|
this.setColour(MEG1_HUE);
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField(name)
|
||||||
|
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_RFID_WRITE);
|
||||||
|
this.appendValueInput('SECTOR')
|
||||||
|
.appendField(Blockly.Msg.MIXLY_LIST_INDEX);
|
||||||
|
this.appendValueInput('CONTENT')
|
||||||
|
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_WRITE_NUM);
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
|
||||||
|
this.setInputsInline(true);
|
||||||
|
this.setPreviousStatement(true, null);
|
||||||
|
this.setNextStatement(true, null);
|
||||||
|
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated To be removed in the future
|
||||||
|
*/
|
||||||
|
export const me_g1_rfid_write_outcome = {
|
||||||
init: function () {
|
init: function () {
|
||||||
var version = Mixly.Boards.getSelectedBoardKey().split(':')[2]
|
var version = Mixly.Boards.getSelectedBoardKey().split(':')[2]
|
||||||
if (version == "mixgo_me") { var name = 'ME G1' }
|
if (version == "mixgo_me") { var name = 'ME G1' }
|
||||||
@@ -103,32 +203,20 @@ export const me_g1_rfid_write = {
|
|||||||
this.appendValueInput('SECTOR')
|
this.appendValueInput('SECTOR')
|
||||||
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
|
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
|
||||||
this.appendValueInput('CONTENT')
|
this.appendValueInput('CONTENT')
|
||||||
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_WRITE_NUM)
|
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_WRITE_NUM);
|
||||||
this.setInputsInline(true);
|
|
||||||
this.setPreviousStatement(true, null);
|
|
||||||
this.setNextStatement(true, null);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export const me_g1_rfid_write_outcome = {
|
|
||||||
init: function(){
|
|
||||||
var version=Mixly.Boards.getSelectedBoardKey().split(':')[2]
|
|
||||||
if(version=="mixgo_me"){var name='ME G1'}
|
|
||||||
this.setColour(MEG1_HUE);
|
|
||||||
this.appendDummyInput()
|
this.appendDummyInput()
|
||||||
.appendField(name)
|
.appendField(Blockly.Msg.RETURN_SUCCESS_OR_NOT);
|
||||||
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_RFID_WRITE);
|
|
||||||
this.appendValueInput('SECTOR')
|
|
||||||
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
|
|
||||||
this.appendValueInput('CONTENT')
|
|
||||||
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_WRITE_NUM)
|
|
||||||
this.appendDummyInput()
|
this.appendDummyInput()
|
||||||
.appendField(Blockly.Msg.RETURN_SUCCESS_OR_NOT)
|
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
|
||||||
this.setInputsInline(true);
|
this.setInputsInline(true);
|
||||||
this.setOutput(true);
|
this.setOutput(true);
|
||||||
|
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated To be removed in the future
|
||||||
|
*/
|
||||||
export const me_g1_rfid_status = {
|
export const me_g1_rfid_status = {
|
||||||
init: function () {
|
init: function () {
|
||||||
var version = Mixly.Boards.getSelectedBoardKey().split(':')[2]
|
var version = Mixly.Boards.getSelectedBoardKey().split(':')[2]
|
||||||
@@ -143,7 +231,10 @@ export const me_g1_rfid_status = {
|
|||||||
[Blockly.Msg.MIXLY_RFID_SCAN_NOTAGERR, "1"],
|
[Blockly.Msg.MIXLY_RFID_SCAN_NOTAGERR, "1"],
|
||||||
[Blockly.Msg.MIXLY_RFID_SCAN_ERROR, "2"]
|
[Blockly.Msg.MIXLY_RFID_SCAN_ERROR, "2"]
|
||||||
]), "key");
|
]), "key");
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
|
||||||
this.setOutput(true, Number);
|
this.setOutput(true, Number);
|
||||||
this.setInputsInline(true);
|
this.setInputsInline(true);
|
||||||
|
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -1929,15 +1929,16 @@
|
|||||||
<block type="me_g1_aht11"></block>
|
<block type="me_g1_aht11"></block>
|
||||||
<block type="me_g1_hp203"></block>
|
<block type="me_g1_hp203"></block>
|
||||||
<block type="me_g1_varistor"></block>
|
<block type="me_g1_varistor"></block>
|
||||||
<block type="me_g1_rfid_readcontent">
|
<block type="rfid_status"></block>
|
||||||
|
<block type="rfid_readid"></block>
|
||||||
|
<block type="rfid_readcontent">
|
||||||
<value name="SECTOR">
|
<value name="SECTOR">
|
||||||
<shadow type="math_number">
|
<shadow type="math_number">
|
||||||
<field name="NUM">0</field>
|
<field name="NUM">0</field>
|
||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="me_g1_rfid_readid"></block>
|
<block type="rfid_write">
|
||||||
<block type="me_g1_rfid_write">
|
|
||||||
<value name="SECTOR">
|
<value name="SECTOR">
|
||||||
<shadow type="math_number">
|
<shadow type="math_number">
|
||||||
<field name="NUM">0</field>
|
<field name="NUM">0</field>
|
||||||
@@ -1949,7 +1950,7 @@
|
|||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="me_g1_rfid_write_outcome">
|
<block type="rfid_write_return">
|
||||||
<value name="SECTOR">
|
<value name="SECTOR">
|
||||||
<shadow type="math_number">
|
<shadow type="math_number">
|
||||||
<field name="NUM">0</field>
|
<field name="NUM">0</field>
|
||||||
@@ -1961,7 +1962,6 @@
|
|||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="me_g1_rfid_status"></block>
|
|
||||||
</category>
|
</category>
|
||||||
<category id="catCC_G1" colour="40"
|
<category id="catCC_G1" colour="40"
|
||||||
m-show='micropython:esp32c3:mixgo_cc micropython:esp32c3:mixgo_me'>
|
m-show='micropython:esp32c3:mixgo_cc micropython:esp32c3:mixgo_me'>
|
||||||
@@ -3804,7 +3804,14 @@
|
|||||||
</next>
|
</next>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<block type="extern_rfid_readcontent" m-hide='micropython:esp32c3:mixgocar_c3'>
|
<block type="extern_rfid_status" m-hide='micropython:esp32c3:mixgocar_c3'>
|
||||||
|
<value name="SUB">
|
||||||
|
<shadow type="variables_get">
|
||||||
|
<field name="VAR">ysensor</field>
|
||||||
|
</shadow>
|
||||||
|
</value>
|
||||||
|
</block>
|
||||||
|
<block type="extern_rfid_readid" m-hide='micropython:esp32c3:mixgocar_c3'>
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
<field name="VAR">ysensor</field>
|
<field name="VAR">ysensor</field>
|
||||||
@@ -3816,7 +3823,7 @@
|
|||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="extern_rfid_readid" m-hide='micropython:esp32c3:mixgocar_c3'>
|
<block type="extern_rfid_readcontent" m-hide='micropython:esp32c3:mixgocar_c3'>
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
<field name="VAR">ysensor</field>
|
<field name="VAR">ysensor</field>
|
||||||
@@ -3863,14 +3870,6 @@
|
|||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<block type="extern_rfid_status" m-hide='micropython:esp32c3:mixgocar_c3'>
|
|
||||||
<value name="SUB">
|
|
||||||
<shadow type="variables_get">
|
|
||||||
<field name="VAR">ysensor</field>
|
|
||||||
</shadow>
|
|
||||||
</value>
|
|
||||||
</block>
|
|
||||||
|
|
||||||
<block type="weather_have_data" m-hide='micropython:esp32c3:mixgocar_c3'>
|
<block type="weather_have_data" m-hide='micropython:esp32c3:mixgocar_c3'>
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
|
|||||||
@@ -3543,7 +3543,14 @@
|
|||||||
</next>
|
</next>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<block type="extern_rfid_readcontent">
|
<block type="extern_rfid_status">
|
||||||
|
<value name="SUB">
|
||||||
|
<shadow type="variables_get">
|
||||||
|
<field name="VAR">ysensor</field>
|
||||||
|
</shadow>
|
||||||
|
</value>
|
||||||
|
</block>
|
||||||
|
<block type="extern_rfid_readid">
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
<field name="VAR">ysensor</field>
|
<field name="VAR">ysensor</field>
|
||||||
@@ -3555,7 +3562,7 @@
|
|||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="extern_rfid_readid">
|
<block type="extern_rfid_readcontent">
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
<field name="VAR">ysensor</field>
|
<field name="VAR">ysensor</field>
|
||||||
@@ -3601,13 +3608,7 @@
|
|||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="extern_rfid_status">
|
|
||||||
<value name="SUB">
|
|
||||||
<shadow type="variables_get">
|
|
||||||
<field name="VAR">ysensor</field>
|
|
||||||
</shadow>
|
|
||||||
</value>
|
|
||||||
</block>
|
|
||||||
<block type="weather_have_data">
|
<block type="weather_have_data">
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
|
|||||||
@@ -1446,13 +1446,8 @@
|
|||||||
<block type="sensor_mixgo_cc_mmc5603_calibrate_compass"></block>
|
<block type="sensor_mixgo_cc_mmc5603_calibrate_compass"></block>
|
||||||
<block type="sensor_mixgo_cc_mmc5603_get_magnetic"></block>
|
<block type="sensor_mixgo_cc_mmc5603_get_magnetic"></block>
|
||||||
<block type="sensor_mixgo_cc_mmc5603_get_angle"></block>
|
<block type="sensor_mixgo_cc_mmc5603_get_angle"></block>
|
||||||
<block type="rfid_readid" m-hide='micropython:esp32s3:mixgo_sant'>
|
<block type="rfid_status" m-hide='micropython:esp32s3:mixgo_sant'></block>
|
||||||
<value name="SUB">
|
<block type="rfid_readid" m-hide='micropython:esp32s3:mixgo_sant'></block>
|
||||||
<shadow type="variables_get">
|
|
||||||
<field name="VAR">rfid</field>
|
|
||||||
</shadow>
|
|
||||||
</value>
|
|
||||||
</block>
|
|
||||||
<block type="rfid_readcontent" m-hide='micropython:esp32s3:mixgo_sant'>
|
<block type="rfid_readcontent" m-hide='micropython:esp32s3:mixgo_sant'>
|
||||||
<value name="SECTOR">
|
<value name="SECTOR">
|
||||||
<shadow type="math_number">
|
<shadow type="math_number">
|
||||||
@@ -2295,15 +2290,16 @@
|
|||||||
</block>
|
</block>
|
||||||
</category>
|
</category>
|
||||||
<category id="catSANT_G2" colour="40" m-show='micropython:esp32s3:mixgo_sant'>
|
<category id="catSANT_G2" colour="40" m-show='micropython:esp32s3:mixgo_sant'>
|
||||||
<block type="mini_g2_rfid_readcontent">
|
<block type="rfid_status"></block>
|
||||||
|
<block type="rfid_readid"></block>
|
||||||
|
<block type="rfid_readcontent">
|
||||||
<value name="SECTOR">
|
<value name="SECTOR">
|
||||||
<shadow type="math_number">
|
<shadow type="math_number">
|
||||||
<field name="NUM">0</field>
|
<field name="NUM">0</field>
|
||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="mini_g2_rfid_readid"></block>
|
<block type="rfid_write">
|
||||||
<block type="mini_g2_rfid_write">
|
|
||||||
<value name="SECTOR">
|
<value name="SECTOR">
|
||||||
<shadow type="math_number">
|
<shadow type="math_number">
|
||||||
<field name="NUM">0</field>
|
<field name="NUM">0</field>
|
||||||
@@ -2315,7 +2311,7 @@
|
|||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="mini_g2_rfid_write_outcome">
|
<block type="rfid_write_return">
|
||||||
<value name="SECTOR">
|
<value name="SECTOR">
|
||||||
<shadow type="math_number">
|
<shadow type="math_number">
|
||||||
<field name="NUM">0</field>
|
<field name="NUM">0</field>
|
||||||
@@ -2327,19 +2323,6 @@
|
|||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="mini_g2_rfid_status"></block>
|
|
||||||
<block type="radar_set_DETECTION_THRESHOLD_SANT">
|
|
||||||
<value name="VAR">
|
|
||||||
<shadow type="math_number">
|
|
||||||
<field name="NUM">5000</field>
|
|
||||||
</shadow>
|
|
||||||
</value>
|
|
||||||
<value name="VAR2">
|
|
||||||
<shadow type="math_number">
|
|
||||||
<field name="NUM">500</field>
|
|
||||||
</shadow>
|
|
||||||
</value>
|
|
||||||
</block>
|
|
||||||
<block type="interaction_whether_to_interaction_SANT"></block>
|
<block type="interaction_whether_to_interaction_SANT"></block>
|
||||||
</category>
|
</category>
|
||||||
<category id="catIot" colour="#2FAD7A">
|
<category id="catIot" colour="#2FAD7A">
|
||||||
@@ -4205,7 +4188,14 @@
|
|||||||
</next>
|
</next>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<block type="extern_rfid_readcontent">
|
<block type="extern_rfid_status">
|
||||||
|
<value name="SUB">
|
||||||
|
<shadow type="variables_get">
|
||||||
|
<field name="VAR">ysensor</field>
|
||||||
|
</shadow>
|
||||||
|
</value>
|
||||||
|
</block>
|
||||||
|
<block type="extern_rfid_readid">
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
<field name="VAR">ysensor</field>
|
<field name="VAR">ysensor</field>
|
||||||
@@ -4217,7 +4207,7 @@
|
|||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="extern_rfid_readid">
|
<block type="extern_rfid_readcontent">
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
<field name="VAR">ysensor</field>
|
<field name="VAR">ysensor</field>
|
||||||
@@ -4263,13 +4253,7 @@
|
|||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
<block type="extern_rfid_status">
|
|
||||||
<value name="SUB">
|
|
||||||
<shadow type="variables_get">
|
|
||||||
<field name="VAR">ysensor</field>
|
|
||||||
</shadow>
|
|
||||||
</value>
|
|
||||||
</block>
|
|
||||||
<block type="weather_have_data">
|
<block type="weather_have_data">
|
||||||
<value name="SUB">
|
<value name="SUB">
|
||||||
<shadow type="variables_get">
|
<shadow type="variables_get">
|
||||||
|
|||||||
@@ -1442,13 +1442,8 @@
|
|||||||
<block type="sensor_mixgo_cc_mmc5603_calibrate_compass" m-show="micropython:esp32c3:feiyi"></block>
|
<block type="sensor_mixgo_cc_mmc5603_calibrate_compass" m-show="micropython:esp32c3:feiyi"></block>
|
||||||
<block type="sensor_mixgo_cc_mmc5603_get_magnetic" m-show="micropython:esp32c3:feiyi"></block>
|
<block type="sensor_mixgo_cc_mmc5603_get_magnetic" m-show="micropython:esp32c3:feiyi"></block>
|
||||||
<block type="sensor_mixgo_cc_mmc5603_get_angle" m-show="micropython:esp32c3:feiyi"></block>
|
<block type="sensor_mixgo_cc_mmc5603_get_angle" m-show="micropython:esp32c3:feiyi"></block>
|
||||||
<block type="rfid_readid" m-show="micropython:esp32c3:feiyi">
|
<block type="rfid_status" m-show="micropython:esp32c3:feiyi"></block>
|
||||||
<value name="SUB">
|
<block type="rfid_readid" m-show="micropython:esp32c3:feiyi"></block>
|
||||||
<shadow type="variables_get">
|
|
||||||
<field name="VAR">rfid</field>
|
|
||||||
</shadow>
|
|
||||||
</value>
|
|
||||||
</block>
|
|
||||||
<block type="rfid_readcontent" m-show="micropython:esp32c3:feiyi">
|
<block type="rfid_readcontent" m-show="micropython:esp32c3:feiyi">
|
||||||
<value name="SECTOR">
|
<value name="SECTOR">
|
||||||
<shadow type="math_number">
|
<shadow type="math_number">
|
||||||
|
|||||||
Reference in New Issue
Block a user