元控增加称重传感器、检查mini 英语字库

This commit is contained in:
Irene-Maxine
2025-01-23 13:25:42 +08:00
parent 4eaf8cbbe0
commit e992afef06
9 changed files with 91 additions and 7 deletions

View File

@@ -2201,4 +2201,34 @@ export const camera_sensor_result = {
this.setOutput(true);
this.setInputsInline(true);
}
};
};
export const sensor_weigh_init = {
init: function () {
this.setColour(SENSOR_EXTERN_HUE);
this.appendValueInput('SUB')
.appendField(Blockly.Msg.MIXLY_SETUP + 'HX711/720' + Blockly.Msg.MIXLY_WEIGH_SENSOR);
this.appendValueInput('sck')
.appendField('#SCK');
this.appendValueInput('dat')
.appendField('#DAT');
this.appendValueInput('pc')
.appendField(Blockly.Msg.MIXLY_Calibration_ratio);
this.setInputsInline(true);
this.setPreviousStatement(true);
this.setNextStatement(true);
this.setTooltip('');
}
};
export const weigh_sensor_get_weight = {
init: function () {
this.setColour(SENSOR_EXTERN_HUE);
this.appendValueInput('SUB')
.appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_WEIGH_SENSOR)
this.appendDummyInput()
.appendField(Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_DATA)
this.setOutput(true);
this.setInputsInline(true);
}
}