元控颜色块修改,mini去掉uart2
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
boards/default/micropython_esp32s3/main.bundle.js.map
Normal file
1
boards/default/micropython_esp32s3/main.bundle.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -984,18 +984,39 @@ export const tft_show_image_xy = {
|
||||
export const display_color_seclet = {
|
||||
init: function () {
|
||||
this.setColour(DISPLAY_EXTERN_HUE);
|
||||
let fieldColorObj = new Blockly.FieldColour('#f00', null, {
|
||||
colourOptions: ['#f00', '#000'],
|
||||
columns: 2
|
||||
});
|
||||
this.appendDummyInput("")
|
||||
.setAlign(Blockly.inputs.Align.RIGHT)
|
||||
.appendField(fieldColorObj, "COLOR");
|
||||
.appendField(new Blockly.FieldColour('#000', null, {
|
||||
colourOptions: [
|
||||
// grays
|
||||
'#ffffff', '#cccccc', '#c0c0c0', '#999999', '#666666', '#333333', '#000000',
|
||||
// reds
|
||||
'#ffcccc', '#ff6666', '#ff0000', '#cc0000', '#990000', '#660000', '#330000',
|
||||
// oranges
|
||||
'#ffcc99', '#ff9966', '#ff9900', '#ff6600', '#cc6600', '#993300', '#663300',
|
||||
// yellows
|
||||
'#ffff99', '#ffff66', '#ffcc66', '#ffcc33', '#cc9933', '#996633', '#663333',
|
||||
// olives
|
||||
'#ffffcc', '#ffff33', '#ffff00', '#ffcc00', '#999900', '#666600', '#333300',
|
||||
// greens
|
||||
'#99ff99', '#66ff99', '#33ff33', '#33cc00', '#009900', '#006600', '#003300',
|
||||
// turquoises
|
||||
'#99ffff', '#33ffff', '#66cccc', '#00cccc', '#339999', '#336666', '#003333',
|
||||
// blues
|
||||
'#ccffff', '#66ffff', '#33ccff', '#3366ff', '#3333ff', '#000099', '#000066',
|
||||
// purples
|
||||
'#ccccff', '#9999ff', '#6666cc', '#6633ff', '#6600cc', '#333399', '#330099',
|
||||
// violets
|
||||
'#ffccff', '#ff99ff', '#cc66cc', '#cc33cc', '#993399', '#663366', '#330033'
|
||||
],
|
||||
columns: 7
|
||||
}), "COLOR");
|
||||
this.setInputsInline(true);
|
||||
this.setOutput(true, String);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
export const tft_show_image_or_string_delay = {
|
||||
init: function () {
|
||||
this.setColour(DISPLAY_EXTERN_HUE);
|
||||
|
||||
@@ -7,7 +7,7 @@ export const serial_print_byte = {
|
||||
this.setColour(SERIAL_HUE);
|
||||
this.appendValueInput("CONTENT", String)
|
||||
.appendField("Serial")
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1'], ['uart2', '2']]), 'mode')
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1']]), 'mode')
|
||||
.appendField(Blockly.Msg.MIXLY_SERIAL_WRITE + '(' + Blockly.Msg.LANG_MATH_BYTE + ')');
|
||||
//this.setFieldValue('1','mode')
|
||||
this.setPreviousStatement(true, null);
|
||||
@@ -21,7 +21,7 @@ export const serial_print = {
|
||||
this.setColour(SERIAL_HUE);
|
||||
this.appendValueInput("CONTENT", String)
|
||||
.appendField("Serial")
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1'], ['uart2', '2']]), 'mode')
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1']]), 'mode')
|
||||
.appendField(Blockly.Msg.MIXLY_SERIAL_PRINT);
|
||||
//this.setFieldValue('1','mode')
|
||||
this.setPreviousStatement(true, null);
|
||||
@@ -35,7 +35,7 @@ export const serial_println = {
|
||||
this.setColour(SERIAL_HUE);
|
||||
this.appendValueInput("CONTENT", String)
|
||||
.appendField("Serial")
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1'], ['uart2', '2']]), 'mode')
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1']]), 'mode')
|
||||
.appendField(Blockly.Msg.MIXLY_SERIAL_PRINTLN);
|
||||
//this.setFieldValue('1','mode')
|
||||
this.setPreviousStatement(true, null);
|
||||
@@ -50,7 +50,7 @@ export const serial_print_hex = {
|
||||
this.setColour(SERIAL_HUE);
|
||||
this.appendDummyInput()
|
||||
.appendField("Serial")
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1'], ['uart2', '2']]), 'mode')
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1']]), 'mode')
|
||||
.appendField(Blockly.Msg.MIXLY_SERIAL_PRINTLN);
|
||||
this.appendValueInput("CONTENT", Number)
|
||||
.appendField(new Blockly.FieldDropdown([[Blockly.Msg.MATH_BIN, "bin"], [Blockly.Msg.MATH_OCT, "oct"], [Blockly.Msg.MATH_DEC, "int"], [Blockly.Msg.MATH_HEX, "hex"]]), "STAT")
|
||||
@@ -79,7 +79,7 @@ export const serial_readstr = {
|
||||
this.setColour(SERIAL_HUE);
|
||||
this.appendDummyInput()
|
||||
.appendField("Serial")
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1'], ['uart2', '2']]), 'mode')
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1']]), 'mode')
|
||||
.appendField(Blockly.Msg.MIXLY_SERIAL_READSTR);
|
||||
//this.setFieldValue('1','mode')
|
||||
this.setOutput(true, String);
|
||||
@@ -92,7 +92,7 @@ export const serial_any = {
|
||||
this.setColour(SERIAL_HUE);
|
||||
this.appendDummyInput()
|
||||
.appendField("Serial")
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1'], ['uart2', '2']]), 'mode')
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1']]), 'mode')
|
||||
.appendField(Blockly.Msg.MIXLY_SERIAL_AVAILABLE);
|
||||
//this.setFieldValue('1','mode')
|
||||
this.setOutput(true, Boolean);
|
||||
@@ -105,7 +105,7 @@ export const serial_readline = {
|
||||
this.setColour(SERIAL_HUE);
|
||||
this.appendDummyInput()
|
||||
.appendField("Serial")
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1'], ['uart2', '2']]), 'mode')
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1']]), 'mode')
|
||||
.appendField(Blockly.Msg.MIXLY_ESP32_READ_LINE);
|
||||
//this.setFieldValue('1','mode')
|
||||
this.setOutput(true, String);
|
||||
@@ -137,7 +137,7 @@ export const serial_softserial_new = {
|
||||
this.setColour(SERIAL_HUE);
|
||||
this.appendValueInput("RX")
|
||||
.appendField(Blockly.Msg.MIXLY_SETUP)
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1'], ['uart2', '2']]), 'mode')
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1']]), 'mode')
|
||||
.appendField("RX#")
|
||||
.setCheck(Number)
|
||||
.setAlign(Blockly.inputs.Align.RIGHT);
|
||||
@@ -360,7 +360,7 @@ export const serial_send_to_ai = {
|
||||
this.setColour(SERIAL_HUE);
|
||||
this.appendValueInput("CONTENT")
|
||||
.appendField("Serial")
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1'], ['uart2', '2']]), 'mode')
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1']]), 'mode')
|
||||
.appendField(Blockly.Msg.MIXLY_EMQX_PUBLISH);
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.LANG_CONTROLS_FOR_INPUT_TO + Blockly.Msg.MIXLY_OTHER + 'MP' + Blockly.Msg.MIXLY_DEVICE)
|
||||
@@ -376,7 +376,7 @@ export const serial_read_from_ai = {
|
||||
this.setColour(SERIAL_HUE);
|
||||
this.appendDummyInput()
|
||||
.appendField("Serial")
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1'], ['uart2', '2']]), 'mode')
|
||||
.appendField(new Blockly.FieldDropdown([['uart1', '1']]), 'mode')
|
||||
.appendField(Blockly.Msg.MIXLY_ESP32_READ + Blockly.Msg.MIXLY_OTHER + 'MP' + Blockly.Msg.MIXLY_DEVICE + Blockly.Msg.MIXLY_SD_DATA);
|
||||
this.setOutput(true, Boolean);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"board": {
|
||||
"Edu Core": "micropython:educore:educore"
|
||||
"mpython": "micropython:educore:educore"
|
||||
},
|
||||
"language": "MicroPython",
|
||||
"burn": {
|
||||
|
||||
Reference in New Issue
Block a user