增加元控飞翔板

This commit is contained in:
Irene-Maxine
2025-09-17 01:23:16 +08:00
parent 4adf341226
commit e6cadadba1
8 changed files with 87 additions and 18 deletions

View File

@@ -1583,4 +1583,20 @@ export const sensor_get_the_coprocessor_version = {
this.setOutput(true);
this.setInputsInline(true);
}
};
export const simulated_light_sensor = {
init: function () {
this.setColour(SENSOR_ONBOARD_HUE);
this.appendDummyInput()
.appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.ANALOG + Blockly.Msg.MIXLY_LIGHT_SENSOR2)
.appendField(new Blockly.FieldDropdown([
[Blockly.Msg.TEXT_TRIM_LEFT, "0"],
[Blockly.Msg.TEXT_TRIM_RIGHT, "1"]
]),"key");
this.appendDummyInput()
.appendField(Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_MICROBIT_JS_SYSTEM_RAISE_VALUE);
this.setOutput(true);
this.setInputsInline(true);
}
};