feat(boards): 调整micropython下板载RFID图形块

This commit is contained in:
王立帮
2025-03-27 01:32:40 +08:00
parent f17f2b85e1
commit 7af8bf127e
11 changed files with 313 additions and 160 deletions

View File

@@ -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 = {
init: function () {
this.setColour(SENSOR_ONBOARD_HUE);

View File

@@ -268,28 +268,16 @@ export const sensor_get_temperature = function (_, generator) {
export const rfid_readid = function (_, generator) {
var version = Boards.getSelectedBoardKey().split(':')[2];
if(version == 'mixgo_mini'){
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")';
}
generator.definitions_[`import_${version}_onboard_rfid`] = `from ${version} import onboard_rfid`;
var code = 'onboard_rfid.read_card(0, x="id")';
return [code, generator.ORDER_ATOMIC];
}
export const rfid_readcontent = function (_, generator) {
var version = Boards.getSelectedBoardKey().split(':')[2];
var sector = generator.valueToCode(this, 'SECTOR', generator.ORDER_ATOMIC);
if(version == 'mixgo_mini'){
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(' + sector + ')';
}else{
generator.definitions_['import_' + version + '_onboard_rfid'] = "from " + version + " import onboard_rfid";
var code = 'onboard_rfid.read_card(' + sector + ', x="content")';
}
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];
}
@@ -297,14 +285,8 @@ export const rfid_write = function (_, generator) {
var version = Boards.getSelectedBoardKey().split(':')[2];
var sector = generator.valueToCode(this, 'SECTOR', generator.ORDER_ATOMIC);
var cnt = generator.valueToCode(this, 'CONTENT', generator.ORDER_ATOMIC);
if(version == 'mixgo_mini'){
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.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';
}
generator.definitions_[`import_${version}_onboard_rfid`] = `from ${version} import onboard_rfid`;
var code = `onboard_rfid.write_card(${cnt}, ${sector})\n`;
return code;
}
@@ -312,13 +294,16 @@ export const rfid_write_return = function (_, generator) {
var version = Boards.getSelectedBoardKey().split(':')[2];
var sector = generator.valueToCode(this, 'SECTOR', generator.ORDER_ATOMIC);
var cnt = generator.valueToCode(this, 'CONTENT', generator.ORDER_ATOMIC);
if (version == "mixgo_mini") {
generator.definitions_['import_mini_g2_ext_rfid'] = 'from mini_g2 import ext_rfid';
var code = 'ext_rfid.write_card(' + cnt + ',' + sector + ')';
} else {
generator.definitions_['import_' + version + '_onboard_rfid'] = "from " + version + " import onboard_rfid";
var code = 'onboard_rfid.write_card(' + cnt + ', ' + sector + ')';
}
generator.definitions_[`import_${version}_onboard_rfid`] = `from ${version} import onboard_rfid`;
var code = `onboard_rfid.write_card(${cnt}, ${sector})`;
return [code, generator.ORDER_ATOMIC];
}
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];
}

View File

@@ -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_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="rfid_readid" m-show='micropython:esp32c3:mixgo_cc'>
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">rfid</field>
</shadow>
</value>
</block>
<block type="rfid_status" m-show='micropython:esp32c3:mixgo_cc'></block>
<block type="rfid_readid" m-show='micropython:esp32c3:mixgo_cc'></block>
<block type="rfid_readcontent" m-show='micropython:esp32c3:mixgo_cc'>
<value name="SECTOR">
<shadow type="math_number">
@@ -4108,7 +4103,14 @@
</next>
</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">
<shadow type="variables_get">
<field name="VAR">ysensor</field>
@@ -4120,7 +4122,7 @@
</shadow>
</value>
</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">
<shadow type="variables_get">
<field name="VAR">ysensor</field>
@@ -4167,14 +4169,6 @@
</value>
</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'>
<value name="SUB">
<shadow type="variables_get">

View File

@@ -4006,8 +4006,14 @@
</block>
</next>
</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">
<shadow type="variables_get">
<field name="VAR">ysensor</field>
@@ -4019,7 +4025,7 @@
</shadow>
</value>
</block>
<block type="extern_rfid_readid">
<block type="extern_rfid_readcontent">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">ysensor</field>
@@ -4065,13 +4071,6 @@
</shadow>
</value>
</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">
<value name="SUB">
<shadow type="variables_get">

View File

@@ -1,5 +1,6 @@
import * as Blockly from 'blockly/core';
import { Boards } from 'mixly';
import { MicroPythonSensorOnBoardBlocks } from '@mixly/micropython';
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 = {
init: function () {
var version = Boards.getSelectedBoardKey().split(':')[2]
@@ -70,11 +134,17 @@ export const mini_g2_rfid_readid = {
.appendField("RFID" + Blockly.Msg.MIXLY_RFID_READ_CARD);
this.appendDummyInput("")
.appendField(Blockly.Msg.MIXLY_RFID_READ_CARD_UID);
this.appendDummyInput()
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
this.setOutput(true, Number);
this.setInputsInline(true);
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
}
};
/**
* @deprecated To be removed in the future
*/
export const mini_g2_rfid_readcontent = {
init: function () {
var version = Boards.getSelectedBoardKey().split(':')[2]
@@ -87,11 +157,17 @@ export const mini_g2_rfid_readcontent = {
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
this.appendDummyInput("")
.appendField(Blockly.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL);
this.appendDummyInput()
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
this.setOutput(true, Number);
this.setInputsInline(true);
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
}
};
/**
* @deprecated To be removed in the future
*/
export const mini_g2_rfid_write = {
init: function () {
var version = Boards.getSelectedBoardKey().split(':')[2]
@@ -103,13 +179,19 @@ export const mini_g2_rfid_write = {
this.appendValueInput('SECTOR')
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
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.setPreviousStatement(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 = {
init: function () {
var version = Boards.getSelectedBoardKey().split(':')[2]
@@ -119,16 +201,22 @@ export const mini_g2_rfid_write_outcome = {
.appendField(name)
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_RFID_WRITE);
this.appendValueInput('SECTOR')
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
.appendField(Blockly.Msg.MIXLY_LIST_INDEX);
this.appendValueInput('CONTENT')
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_WRITE_NUM)
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_WRITE_NUM);
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.setOutput(true);
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
}
};
/**
* @deprecated To be removed in the future
*/
export const mini_g2_rfid_status = {
init: function () {
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_ERROR, "False"]
]), "key");
this.appendDummyInput()
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
this.setOutput(true, Number);
this.setInputsInline(true);
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
}
};

View File

@@ -1986,15 +1986,16 @@
<block type="cc_g1_turnoff"></block>
</category>
<category id="catMINI_G2" colour="40" m-show='micropython:esp32c2:mixgo_mini'>
<block type="mini_g2_rfid_readid"></block>
<block type="mini_g2_rfid_readcontent">
<block type="rfid_status"></block>
<block type="rfid_readid"></block>
<block type="rfid_readcontent">
<value name="SECTOR">
<shadow type="math_number">
<field name="NUM">0</field>
</shadow>
</value>
</block>
<block type="mini_g2_rfid_write">
<block type="rfid_write">
<value name="SECTOR">
<shadow type="math_number">
<field name="NUM">0</field>
@@ -2006,7 +2007,7 @@
</shadow>
</value>
</block>
<block type="mini_g2_rfid_write_outcome">
<block type="rfid_write_return">
<value name="SECTOR">
<shadow type="math_number">
<field name="NUM">0</field>
@@ -2018,7 +2019,6 @@
</shadow>
</value>
</block>
<block type="mini_g2_rfid_status"></block>
</category>
<category id="catIot" colour="#2FAD7A">
<category id="catBlynk" colour="#2FAD7A">
@@ -3854,7 +3854,14 @@
</next>
</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">
<shadow type="variables_get">
<field name="VAR">ysensor</field>
@@ -3866,7 +3873,7 @@
</shadow>
</value>
</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">
<shadow type="variables_get">
<field name="VAR">ysensor</field>
@@ -3913,14 +3920,6 @@
</value>
</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'>
<value name="SUB">
<shadow type="variables_get">

View File

@@ -1,5 +1,6 @@
import * as Blockly from 'blockly/core';
import * as Mixly from 'mixly';
import { MicroPythonSensorOnBoardBlocks } from '@mixly/micropython';
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 = {
init: function () {
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);
this.appendDummyInput("")
.appendField(Blockly.Msg.MIXLY_RFID_READ_CARD_UID);
this.appendDummyInput()
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
this.setOutput(true, Number);
this.setInputsInline(true);
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
}
};
/**
* @deprecated To be removed in the future
*/
export const me_g1_rfid_readcontent = {
init: function () {
var version = Mixly.Boards.getSelectedBoardKey().split(':')[2]
@@ -87,12 +157,42 @@ export const me_g1_rfid_readcontent = {
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
this.appendDummyInput("")
.appendField(Blockly.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL);
this.appendDummyInput()
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
this.setOutput(true, Number);
this.setInputsInline(true);
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
}
};
/**
* @deprecated To be removed in the future
*/
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 () {
var version = Mixly.Boards.getSelectedBoardKey().split(':')[2]
if (version == "mixgo_me") { var name = 'ME G1' }
@@ -103,32 +203,20 @@ export const me_g1_rfid_write = {
this.appendValueInput('SECTOR')
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
this.appendValueInput('CONTENT')
.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);
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_WRITE_NUM);
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)
.appendField(Blockly.Msg.RETURN_SUCCESS_OR_NOT);
this.appendDummyInput()
.appendField(Blockly.Msg.RETURN_SUCCESS_OR_NOT)
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
this.setInputsInline(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 = {
init: function () {
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_ERROR, "2"]
]), "key");
this.appendDummyInput()
.appendField(`(${Blockly.Msg.MIXLY_DEPRECATED})`);
this.setOutput(true, Number);
this.setInputsInline(true);
this.setWarningText(Blockly.Msg.MIXLY_DEPRECATED_WARNING_TEXT);
}
};

View File

@@ -1929,15 +1929,16 @@
<block type="me_g1_aht11"></block>
<block type="me_g1_hp203"></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">
<shadow type="math_number">
<field name="NUM">0</field>
</shadow>
</value>
</block>
<block type="me_g1_rfid_readid"></block>
<block type="me_g1_rfid_write">
<block type="rfid_write">
<value name="SECTOR">
<shadow type="math_number">
<field name="NUM">0</field>
@@ -1949,7 +1950,7 @@
</shadow>
</value>
</block>
<block type="me_g1_rfid_write_outcome">
<block type="rfid_write_return">
<value name="SECTOR">
<shadow type="math_number">
<field name="NUM">0</field>
@@ -1961,7 +1962,6 @@
</shadow>
</value>
</block>
<block type="me_g1_rfid_status"></block>
</category>
<category id="catCC_G1" colour="40"
m-show='micropython:esp32c3:mixgo_cc micropython:esp32c3:mixgo_me'>
@@ -3804,7 +3804,14 @@
</next>
</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">
<shadow type="variables_get">
<field name="VAR">ysensor</field>
@@ -3816,7 +3823,7 @@
</shadow>
</value>
</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">
<shadow type="variables_get">
<field name="VAR">ysensor</field>
@@ -3863,14 +3870,6 @@
</value>
</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'>
<value name="SUB">
<shadow type="variables_get">

View File

@@ -3543,7 +3543,14 @@
</next>
</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">
<shadow type="variables_get">
<field name="VAR">ysensor</field>
@@ -3555,7 +3562,7 @@
</shadow>
</value>
</block>
<block type="extern_rfid_readid">
<block type="extern_rfid_readcontent">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">ysensor</field>
@@ -3601,13 +3608,7 @@
</shadow>
</value>
</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">
<value name="SUB">
<shadow type="variables_get">

View File

@@ -1446,13 +1446,8 @@
<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_angle"></block>
<block type="rfid_readid" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">rfid</field>
</shadow>
</value>
</block>
<block type="rfid_status" m-hide='micropython:esp32s3:mixgo_sant'></block>
<block type="rfid_readid" m-hide='micropython:esp32s3:mixgo_sant'></block>
<block type="rfid_readcontent" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="SECTOR">
<shadow type="math_number">
@@ -2295,15 +2290,16 @@
</block>
</category>
<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">
<shadow type="math_number">
<field name="NUM">0</field>
</shadow>
</value>
</block>
<block type="mini_g2_rfid_readid"></block>
<block type="mini_g2_rfid_write">
<block type="rfid_write">
<value name="SECTOR">
<shadow type="math_number">
<field name="NUM">0</field>
@@ -2315,7 +2311,7 @@
</shadow>
</value>
</block>
<block type="mini_g2_rfid_write_outcome">
<block type="rfid_write_return">
<value name="SECTOR">
<shadow type="math_number">
<field name="NUM">0</field>
@@ -2327,19 +2323,6 @@
</shadow>
</value>
</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>
</category>
<category id="catIot" colour="#2FAD7A">
@@ -4205,7 +4188,14 @@
</next>
</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">
<shadow type="variables_get">
<field name="VAR">ysensor</field>
@@ -4217,7 +4207,7 @@
</shadow>
</value>
</block>
<block type="extern_rfid_readid">
<block type="extern_rfid_readcontent">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">ysensor</field>
@@ -4263,13 +4253,7 @@
</shadow>
</value>
</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">
<value name="SUB">
<shadow type="variables_get">

View File

@@ -1442,13 +1442,8 @@
<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_angle" m-show="micropython:esp32c3:feiyi"></block>
<block type="rfid_readid" m-show="micropython:esp32c3:feiyi">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">rfid</field>
</shadow>
</value>
</block>
<block type="rfid_status" m-show="micropython:esp32c3:feiyi"></block>
<block type="rfid_readid" m-show="micropython:esp32c3:feiyi"></block>
<block type="rfid_readcontent" m-show="micropython:esp32c3:feiyi">
<value name="SECTOR">
<shadow type="math_number">