From f82d4a46dc48d77fd0b8f305308a5a0b3d0d2c90 Mon Sep 17 00:00:00 2001
From: Irene-Maxine <114802521+Irene-Maxine@users.noreply.github.com>
Date: Wed, 8 Oct 2025 17:04:24 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=BE=97=E7=94=B5?=
=?UTF-8?q?=E6=BA=90=E8=BE=93=E5=87=BA=E5=9D=97=EF=BC=88mini=E3=80=81sant?=
=?UTF-8?q?=E3=80=81soar=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../micropython/blocks/actuator_onboard.js | 26 ++++++++++++++++---
.../micropython_educore/template.xml | 7 -----
.../micropython_esp32c2/template.xml | 1 +
.../micropython_esp32s3/template.xml | 1 +
4 files changed, 24 insertions(+), 11 deletions(-)
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 @@
+