diff --git a/boards/default_src/micropython/blocks/actuator_onboard.js b/boards/default_src/micropython/blocks/actuator_onboard.js index 8ff64710..8204f761 100644 --- a/boards/default_src/micropython/blocks/actuator_onboard.js +++ b/boards/default_src/micropython/blocks/actuator_onboard.js @@ -950,8 +950,17 @@ export const set_power_output = { this.setColour(ACTUATOR_ONBOARD_HUE); this.appendDummyInput() .appendField(Blockly.Msg.LISTS_SET_INDEX_SET + Blockly.Msg.ME_GO_MOTOR_EXTERN) - .appendField(Blockly.Msg.PIN_NUMBERING) - .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["3", "3"],["4", "4"]]), "index"); + .appendField(Blockly.Msg.PIN_NUMBERING); + const boardKey = Boards.getSelectedBoardKey(); + switch (boardKey) { + case 'micropython:esp32c2:mixgo_mini': + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"]]), "index"); + break; + default: + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"]]), "index"); + } this.appendValueInput('duty') .setCheck(Number) .setAlign(Blockly.inputs.Align.RIGHT) @@ -970,8 +979,17 @@ export const get_power_output = { this.setColour(ACTUATOR_ONBOARD_HUE); this.appendDummyInput() .appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.ME_GO_MOTOR_EXTERN) - .appendField(Blockly.Msg.PIN_NUMBERING) - .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"]]), "index"); + .appendField(Blockly.Msg.PIN_NUMBERING); + const boardKey = Boards.getSelectedBoardKey(); + switch (boardKey) { + case 'micropython:esp32c2:mixgo_mini': + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"]]), "index"); + break; + default: + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"]]), "index"); + } this.appendDummyInput() .setAlign(Blockly.inputs.Align.RIGHT) .appendField(Blockly.Msg.blynk_IOT_IR_POWER + Blockly.Msg.MIXLY_PINMODEOUT + Blockly.Msg.MIXLY_DUTY_RATIO); diff --git a/boards/default_src/micropython_educore/template.xml b/boards/default_src/micropython_educore/template.xml index 0221032e..dbb403c4 100644 --- a/boards/default_src/micropython_educore/template.xml +++ b/boards/default_src/micropython_educore/template.xml @@ -1872,13 +1872,6 @@ - - - - 100 - - - diff --git a/boards/default_src/micropython_esp32c2/template.xml b/boards/default_src/micropython_esp32c2/template.xml index 64950e97..ba6169ac 100644 --- a/boards/default_src/micropython_esp32c2/template.xml +++ b/boards/default_src/micropython_esp32c2/template.xml @@ -1720,6 +1720,7 @@ + diff --git a/boards/default_src/micropython_esp32s3/template.xml b/boards/default_src/micropython_esp32s3/template.xml index 93fe5284..1ad11e73 100644 --- a/boards/default_src/micropython_esp32s3/template.xml +++ b/boards/default_src/micropython_esp32s3/template.xml @@ -1781,6 +1781,7 @@ +