diff --git a/boards/default_src/micropython/blocks/actuator_extern.js b/boards/default_src/micropython/blocks/actuator_extern.js
index b700161f..b9d19839 100644
--- a/boards/default_src/micropython/blocks/actuator_extern.js
+++ b/boards/default_src/micropython/blocks/actuator_extern.js
@@ -127,6 +127,20 @@ export const esp32_music_stop = {
}
};
+export const esp32_set_music_volume ={
+ init: function () {
+ this.setColour(ACTUATOR_EXTERN_HUE);
+ this.appendValueInput('SUB')
+ this.appendValueInput('percent')
+ .appendField(Blockly.Msg.MIXLY_MUSIC_VOLUME_SET);
+ this.appendDummyInput()
+ .appendField('%');
+ this.setPreviousStatement(true);
+ this.setNextStatement(true);
+ this.setInputsInline(true);
+ }
+};
+
export const actuator_extern_led_bright = {
init: function () {
this.setColour(ACTUATOR_EXTERN_HUE);
diff --git a/boards/default_src/micropython/generators/actuator_extern.js b/boards/default_src/micropython/generators/actuator_extern.js
index 6132aae4..13c9b01d 100644
--- a/boards/default_src/micropython/generators/actuator_extern.js
+++ b/boards/default_src/micropython/generators/actuator_extern.js
@@ -107,6 +107,14 @@ export const esp32_music_stop = function (block, generator) {
return code;
}
+export const esp32_set_music_volume = function (_,generator){
+ generator.definitions_['import_music'] = 'import music';
+ var v = generator.valueToCode(this, 'SUB', generator.ORDER_ATOMIC);
+ var p = generator.valueToCode(this, 'percent', generator.ORDER_ATOMIC);
+ var code = v+'.set_volume('+p+')\n';
+ return code;
+}
+
export const esp32_music_set_tempo_extern = function (_, generator) {
generator.definitions_['import_music'] = 'import music';
var v = generator.valueToCode(this, 'SUB', generator.ORDER_ATOMIC);
diff --git a/boards/default_src/micropython/generators/actuator_onboard.js b/boards/default_src/micropython/generators/actuator_onboard.js
index f9a305c1..12e8b614 100644
--- a/boards/default_src/micropython/generators/actuator_onboard.js
+++ b/boards/default_src/micropython/generators/actuator_onboard.js
@@ -796,6 +796,6 @@ export const set_music_volume = function (_,generator){
var version = Boards.getSelectedBoardKey().split(':')[2]
generator.definitions_['import_' + version + '_onboard_music'] = 'from ' + version + ' import onboard_music';
var p = generator.valueToCode(this, 'percent', generator.ORDER_ATOMIC);
- var code = 'onboard_music.volume('+p+')\n';
+ var code = 'onboard_music.set_volume('+p+')\n';
return code;
}
\ No newline at end of file
diff --git a/boards/default_src/micropython_esp32/template.xml b/boards/default_src/micropython_esp32/template.xml
index 285a0b4a..e56c986a 100644
--- a/boards/default_src/micropython_esp32/template.xml
+++ b/boards/default_src/micropython_esp32/template.xml
@@ -1598,6 +1598,13 @@
+
+
+
+ 100
+
+
+
@@ -1709,13 +1716,6 @@
-
-
-
- 100
-
-
-
diff --git a/boards/default_src/micropython_esp32c2/blocks/inout.js b/boards/default_src/micropython_esp32c2/blocks/inout.js
index 0b008aab..7b5f3c05 100644
--- a/boards/default_src/micropython_esp32c2/blocks/inout.js
+++ b/boards/default_src/micropython_esp32c2/blocks/inout.js
@@ -94,8 +94,6 @@ export const inout_analog_atten = {
.appendField(Blockly.Msg.MIXLY_ESP32_REF_VOLTAGE + Blockly.Msg.MIXLY_STAT)
.appendField(new Blockly.FieldDropdown([
["3.3V", "machine.ADC.ATTN_11DB"],
- ["2.2V", "machine.ADC.ATTN_6DB"],
- ["1.5V", "machine.ADC.ATTN_2_5DB"],
["1.2V", "machine.ADC.ATTN_0DB"]
]), "atten");
this.setInputsInline(true);
diff --git a/boards/default_src/micropython_esp32c2/template.xml b/boards/default_src/micropython_esp32c2/template.xml
index 9a70bf32..2bccf846 100644
--- a/boards/default_src/micropython_esp32c2/template.xml
+++ b/boards/default_src/micropython_esp32c2/template.xml
@@ -1608,6 +1608,13 @@
+
+
+
+ 100
+
+
+
@@ -1773,14 +1780,6 @@
-
-
-
- 100
-
-
-
-
@@ -4298,6 +4297,18 @@
+
+
+
+ midi
+
+
+
+
+ 100
+
+
+
@@ -4655,13 +4666,6 @@
-
-
-
- 100
-
-
-
diff --git a/boards/default_src/micropython_esp32c3/template.xml b/boards/default_src/micropython_esp32c3/template.xml
index 8120c951..5de24548 100644
--- a/boards/default_src/micropython_esp32c3/template.xml
+++ b/boards/default_src/micropython_esp32c3/template.xml
@@ -1608,6 +1608,13 @@
+
+
+
+ 100
+
+
+
@@ -1697,13 +1704,6 @@
-
-
-
- 100
-
-
-
@@ -1827,13 +1827,6 @@
-
-
-
- 100
-
-
-
+
+
+
+ midi
+
+
+
+
+ 100
+
+
+
@@ -4546,13 +4551,6 @@
-
-
-
- 100
-
-
-
diff --git a/boards/default_src/micropython_esp32s2/template.xml b/boards/default_src/micropython_esp32s2/template.xml
index 0b342820..85e83232 100644
--- a/boards/default_src/micropython_esp32s2/template.xml
+++ b/boards/default_src/micropython_esp32s2/template.xml
@@ -1559,6 +1559,13 @@
+
+
+
+ 100
+
+
+
@@ -1648,13 +1655,6 @@
-
-
-
- 100
-
-
-
@@ -3915,6 +3915,18 @@
+
+
+
+ midi
+
+
+
+
+ 100
+
+
+
@@ -4272,13 +4284,6 @@
-
-
-
- 100
-
-
-
diff --git a/boards/default_src/micropython_esp32s3/template.xml b/boards/default_src/micropython_esp32s3/template.xml
index d3876501..cb01617d 100644
--- a/boards/default_src/micropython_esp32s3/template.xml
+++ b/boards/default_src/micropython_esp32s3/template.xml
@@ -1671,6 +1671,13 @@
+
+
+
+ 100
+
+
+
@@ -1823,13 +1830,6 @@
-
-
-
- 100
-
-
-
@@ -4644,6 +4644,18 @@
+
+
+
+ midi
+
+
+
+
+ 100
+
+
+
@@ -5001,20 +5013,6 @@
-
-
-
- 100
-
-
-
-
-
-
- 100
-
-
-