一些板载显示修改
This commit is contained in:
@@ -1607,6 +1607,58 @@ export const onboard_tft_show_texts = {
|
||||
}
|
||||
};
|
||||
|
||||
export const onboard_tft_show_qrcode = {
|
||||
init: function () {
|
||||
this.setColour(DISPLAY_ONBOARD_HUE);
|
||||
this.appendValueInput('direct')
|
||||
.appendField(Blockly.Msg.OLED_BITMAP)
|
||||
.appendField(Blockly.Msg.MIXLY_QR_CODE);
|
||||
if (JSFuncs.getPlatform() === 'Python ESP32-S3') {
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
}
|
||||
this.setPreviousStatement(true);
|
||||
this.setNextStatement(true);
|
||||
this.setInputsInline(true);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
export const onboard_tft_show_qrcode_details = {
|
||||
init: function () {
|
||||
this.setColour(DISPLAY_ONBOARD_HUE);
|
||||
this.appendValueInput('data')
|
||||
.appendField(Blockly.Msg.OLED_BITMAP)
|
||||
.appendField(Blockly.Msg.MIXLY_QR_CODE);
|
||||
this.appendValueInput("x")
|
||||
.setCheck(Number)
|
||||
.appendField('x');
|
||||
this.appendValueInput("y")
|
||||
.setCheck(Number)
|
||||
.appendField('y');
|
||||
this.appendValueInput("size")
|
||||
.setCheck(Number)
|
||||
.appendField(Blockly.Msg.MIXLY_MICROBIT_JS_NUMBER);
|
||||
this.appendDummyInput("")
|
||||
.appendField(Blockly.Msg.MIXLY_ERROR_RATE)
|
||||
.appendField(new Blockly.FieldDropdown([
|
||||
["0","7%"],
|
||||
["1","15%"],
|
||||
["2","25%"],
|
||||
["3","30"]
|
||||
]),"correct");
|
||||
this.appendValueInput('VAR')
|
||||
.appendField(Blockly.Msg.HTML_COLOUR);
|
||||
if (JSFuncs.getPlatform() === 'Python ESP32-S3') {
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
}
|
||||
this.setPreviousStatement(true, null);
|
||||
this.setNextStatement(true, null);
|
||||
this.setInputsInline(true);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated To be removed in the future
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user