diff --git a/boards/default_src/micropython/blocks/display_extern.js b/boards/default_src/micropython/blocks/display_extern.js index 10239575..cfdccde5 100644 --- a/boards/default_src/micropython/blocks/display_extern.js +++ b/boards/default_src/micropython/blocks/display_extern.js @@ -837,9 +837,9 @@ export const display_oled_drawPixel = { export const display_tm_use_i2c_init = { init: function () { this.setColour(DISPLAY_EXTERN_HUE); - this.appendValueInput('I2CSUB') - .appendField(Blockly.Msg.CONTROLS_FOR_INPUT_WITH + "I2C") - .setCheck("var"); + // this.appendValueInput('I2CSUB') + // .appendField(Blockly.Msg.CONTROLS_FOR_INPUT_WITH + "I2C") + // .setCheck("var"); this.appendValueInput('SUB') .appendField(Blockly.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE) .setCheck("var"); @@ -847,8 +847,8 @@ export const display_tm_use_i2c_init = { .appendField(Blockly.Msg.MIXLY_SETUP + Blockly.Msg.LISTS_SET_INDEX_INPUT_TO) .appendField(new Blockly.FieldDropdown([ // ["MPU9250", "MPU9250"], - // ["TM1637", "TM1637"], - ["TM1650", "TM1650"] + ["TM1650", "TM1650"], + ["TM1637", "TM1637"] ]), "key"); this.setInputsInline(true); this.setPreviousStatement(true, null); @@ -859,7 +859,7 @@ export const display_tm_use_i2c_init = { var mode0 = Blockly.Msg.MIXLY_ESP32_SENSOR_USE_I2C_TOOLTIP; var TOOLTIPS = { // "MPU9250": "MPU9250", - // "TM1637": "TM1637", + "TM1637": "TM1637", "TM1650": "TM1650" }; return mode0 + TOOLTIPS[mode] diff --git a/boards/default_src/micropython/generators/display_extern.js b/boards/default_src/micropython/generators/display_extern.js index d9e210bc..f43218e9 100644 --- a/boards/default_src/micropython/generators/display_extern.js +++ b/boards/default_src/micropython/generators/display_extern.js @@ -309,15 +309,15 @@ export const display_oled_drawPixel = function (_, generator) { //tm1650 export const display_tm_use_i2c_init = function (_, generator) { var v = generator.valueToCode(this, 'SUB', generator.ORDER_ATOMIC); - var iv = generator.valueToCode(this, 'I2CSUB', generator.ORDER_ATOMIC); + // var iv = generator.valueToCode(this, 'I2CSUB', generator.ORDER_ATOMIC); var key = this.getFieldValue("key"); var code; if (key == 'TM1650') { generator.definitions_['import_tm1650'] = 'import tm1650'; - code = v + ' = tm1650.' + key + "(" + iv + ')\n'; + code = v + ' = tm1650.' + key + '(clk=3,dio=4)\n'; } else if (key == 'TM1637') { generator.definitions_['import_tm1637'] = 'import tm1637'; - code = v + ' = tm1637.' + key + "(" + iv + ')\n'; + code = v + ' = tm1637.' + key + '(clk=3,dio=4)\n'; } return code; } diff --git a/boards/default_src/micropython_educore/template.xml b/boards/default_src/micropython_educore/template.xml index 62995e3f..6bec0a62 100644 --- a/boards/default_src/micropython_educore/template.xml +++ b/boards/default_src/micropython_educore/template.xml @@ -6797,13 +6797,6 @@ --> - - - - path - - - diff --git a/boards/default_src/micropython_esp32/template.xml b/boards/default_src/micropython_esp32/template.xml index 17a80290..fea854ef 100644 --- a/boards/default_src/micropython_esp32/template.xml +++ b/boards/default_src/micropython_esp32/template.xml @@ -6669,13 +6669,6 @@ --> - - - - path - - - diff --git a/boards/default_src/micropython_esp32c2/template.xml b/boards/default_src/micropython_esp32c2/template.xml index c480a5ad..fe12147d 100644 --- a/boards/default_src/micropython_esp32c2/template.xml +++ b/boards/default_src/micropython_esp32c2/template.xml @@ -6574,13 +6574,6 @@ --> - - - - path - - - diff --git a/boards/default_src/micropython_esp32c3/template.xml b/boards/default_src/micropython_esp32c3/template.xml index 9fad1ad4..74a424ba 100644 --- a/boards/default_src/micropython_esp32c3/template.xml +++ b/boards/default_src/micropython_esp32c3/template.xml @@ -6475,13 +6475,6 @@ --> - - - - path - - - diff --git a/boards/default_src/micropython_esp32s2/template.xml b/boards/default_src/micropython_esp32s2/template.xml index d8ac1b4c..be3c2d34 100644 --- a/boards/default_src/micropython_esp32s2/template.xml +++ b/boards/default_src/micropython_esp32s2/template.xml @@ -6205,13 +6205,6 @@ --> - - - - path - - - diff --git a/boards/default_src/micropython_esp32s3/template.xml b/boards/default_src/micropython_esp32s3/template.xml index 7e3ca60c..ab32ffc8 100644 --- a/boards/default_src/micropython_esp32s3/template.xml +++ b/boards/default_src/micropython_esp32s3/template.xml @@ -5265,41 +5265,18 @@ - + + + + disp + + + @@ -6958,13 +6935,6 @@ --> - - - - path - - - diff --git a/boards/default_src/micropython_k210_mixgoai/template.xml b/boards/default_src/micropython_k210_mixgoai/template.xml index dfb38005..40f6aeae 100644 --- a/boards/default_src/micropython_k210_mixgoai/template.xml +++ b/boards/default_src/micropython_k210_mixgoai/template.xml @@ -1370,13 +1370,6 @@ - - - - path - - - diff --git a/boards/default_src/micropython_nrf51822_microbit/template.xml b/boards/default_src/micropython_nrf51822_microbit/template.xml index f6d535ea..15c01dd2 100644 --- a/boards/default_src/micropython_nrf51822_microbit/template.xml +++ b/boards/default_src/micropython_nrf51822_microbit/template.xml @@ -1758,13 +1758,6 @@ --> - - - - path - - - diff --git a/boards/default_src/micropython_robot/template.xml b/boards/default_src/micropython_robot/template.xml index af26fa93..dc3ad3c7 100644 --- a/boards/default_src/micropython_robot/template.xml +++ b/boards/default_src/micropython_robot/template.xml @@ -5236,13 +5236,6 @@ --> - - - - path - - -