This commit is contained in:
Irene-Maxine
2025-09-22 14:11:03 +08:00
parent f9b7f4a13e
commit 3c7ce8abd3
11 changed files with 67 additions and 2 deletions

View File

@@ -57,6 +57,21 @@ export const actuator_get_led_bright = {
.appendField(Blockly.Msg.MIXLY_BRIGHTNESS)
this.setOutput(true);
this.setInputsInline(true);
this.setTooltip(Blockly.Msg.MIXLY_ESP32_LED_GETBRIGHT);
}
};
export const actuator_get_led_onoff = {
init: function () {
this.setColour(ACTUATOR_ONBOARD_HUE);
this.appendDummyInput()
.appendField(Blockly.Msg.MIXLY_MICROBIT_PY_STORAGE_GET);
this.appendValueInput('led')
.appendField(Blockly.Msg.MIXLY_BUILDIN_LED)
this.appendDummyInput()
.appendField(Blockly.Msg.MIXLY_PULSEIN_STAT)
this.setOutput(true);
this.setInputsInline(true);
this.setTooltip(Blockly.Msg.MIXLY_ESP32_LED_GETONOFF);
}
};

View File

@@ -353,8 +353,7 @@ export const IOT_MIXIO_PUBLISHEX = {
.appendField(Blockly.Msg.MIXLY_Service_quality_display)
.appendField(new Blockly.FieldDropdown([
[Blockly.Msg.MIXLY_AT_MOST_ONCE,"0"],
[Blockly.Msg.MIXLY_AT_LEAST_ONCE,"1"],
[Blockly.Msg.MIXLY_ONLY_ONCE,"2"]
[Blockly.Msg.MIXLY_AT_LEAST_ONCE,"1"]
]),"quality")
this.setInputsInline(true);
this.setPreviousStatement(true);