mini板 模拟键盘鼠标字符输入

+所有板增加获取主控id
+所有板修改初始化LTR390UV
This commit is contained in:
Irene-Maxine
2024-09-10 19:00:59 +08:00
parent 9d5bb10f10
commit 21d758f78a
17 changed files with 783 additions and 291 deletions

View File

@@ -1018,5 +1018,16 @@ export const get_mem_free = {
}
};
export const get_unique_identifier = {
init: function () {
this.setColour(LOOPS_HUE);
this.appendDummyInput()
.appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_DEVICE +'ID');
this.setInputsInline(true);
this.setOutput(true);
this.setTooltip(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN + Blockly.Msg.MIXLY_GET_UNIQUE_IDEN);
}
};
// export const base_type = controls_type;
// export const controls_TypeLists = controls_typeLists;

View File

@@ -271,5 +271,11 @@ export const get_mem_free = function (_, generator) {
return [code, generator.ORDER_ATOMIC]
}
export const get_unique_identifier = function (_, generator) {
generator.definitions_['import_machine'] = 'import machine';
var code = 'machine.unique_id()';
return [code, generator.ORDER_ATOMIC];
}
// ok
export const controls_repeat = controls_repeat_ext;