Skip to content

Commit 413e577

Browse files
authored
Merge branch 'main' into mixervoice-loop-property
2 parents 79f3456 + 2bb9fc4 commit 413e577

File tree

5 files changed

+36
-23
lines changed

5 files changed

+36
-23
lines changed

locale/en_GB.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"PO-Revision-Date: 2024-11-14 12:00+0000\n"
10+
"PO-Revision-Date: 2024-12-04 13:00+0000\n"
1111
"Last-Translator: Andi Chandler <[email protected]>\n"
1212
"Language-Team: none\n"
1313
"Language: en_GB\n"
@@ -2535,7 +2535,7 @@ msgstr "binary op %q not implemented"
25352535

25362536
#: ports/espressif/common-hal/audiobusio/PDMIn.c
25372537
msgid "bit_depth must be 8, 16, 24, or 32."
2538-
msgstr ""
2538+
msgstr "bit_depth must be 8, 16, 24, or 32."
25392539

25402540
#: shared-module/bitmapfilter/__init__.c
25412541
msgid "bitmap size and depth must match"

locale/pt_BR.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ msgstr ""
66
"Project-Id-Version: PACKAGE VERSION\n"
77
"Report-Msgid-Bugs-To: \n"
88
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
9-
"PO-Revision-Date: 2024-11-11 07:05+0000\n"
9+
"PO-Revision-Date: 2024-12-04 19:57+0000\n"
1010
"Last-Translator: Wellington Terumi Uemura <[email protected]>\n"
1111
"Language-Team: \n"
1212
"Language: pt_BR\n"
1313
"MIME-Version: 1.0\n"
1414
"Content-Type: text/plain; charset=UTF-8\n"
1515
"Content-Transfer-Encoding: 8bit\n"
1616
"Plural-Forms: nplurals=2; plural=n > 1;\n"
17-
"X-Generator: Weblate 5.8.2\n"
17+
"X-Generator: Weblate 5.9-dev\n"
1818

1919
#: main.c
2020
msgid ""
@@ -2571,7 +2571,7 @@ msgstr "a operação binário %q não foi implementada"
25712571

25722572
#: ports/espressif/common-hal/audiobusio/PDMIn.c
25732573
msgid "bit_depth must be 8, 16, 24, or 32."
2574-
msgstr ""
2574+
msgstr "o bit_depth deve ser 8, 16, 24 ou 32."
25752575

25762576
#: shared-module/bitmapfilter/__init__.c
25772577
msgid "bitmap size and depth must match"

ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,13 @@ CIRCUITPY_GIFIO = 0
1616
CIRCUITPY_JPEGIO = 0
1717

1818
CIRCUITPY_BITBANG_APA102 = 1
19+
20+
# We don't have room for the fonts for terminalio for certain languages,
21+
# so turn off terminalio, and if it's off and displayio is on,
22+
# force a clean build.
23+
# Note that we cannot test $(CIRCUITPY_DISPLAYIO) directly with an
24+
# ifeq, because it's not set yet.
25+
ifneq (,$(filter $(TRANSLATION),ja ko ru))
26+
CIRCUITPY_TERMINALIO = 0
27+
RELEASE_NEEDS_CLEAN_BUILD = $(CIRCUITPY_DISPLAYIO)
28+
endif

shared-bindings/audiomixer/MixerVoice.c

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,26 +82,13 @@ static mp_obj_t audiomixer_mixervoice_obj_get_level(mp_obj_t self_in) {
8282
}
8383
MP_DEFINE_CONST_FUN_OBJ_1(audiomixer_mixervoice_get_level_obj, audiomixer_mixervoice_obj_get_level);
8484

85-
static mp_obj_t audiomixer_mixervoice_obj_set_level(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
86-
enum { ARG_level };
87-
static const mp_arg_t allowed_args[] = {
88-
{ MP_QSTR_level, MP_ARG_OBJ | MP_ARG_REQUIRED, {} },
89-
};
90-
audiomixer_mixervoice_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]);
91-
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
92-
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
93-
94-
mp_float_t level = mp_obj_get_float(args[ARG_level].u_obj);
95-
96-
if (level > 1 || level < 0) {
97-
mp_raise_ValueError(MP_ERROR_TEXT("level must be between 0 and 1"));
98-
}
99-
85+
static mp_obj_t audiomixer_mixervoice_obj_set_level(mp_obj_t self_in, mp_obj_t level_in) {
86+
audiomixer_mixervoice_obj_t *self = MP_OBJ_TO_PTR(self_in);
87+
mp_float_t level = mp_arg_validate_obj_float_range(level_in, 0, 1, MP_QSTR_level);
10088
common_hal_audiomixer_mixervoice_set_level(self, level);
101-
10289
return mp_const_none;
10390
}
104-
MP_DEFINE_CONST_FUN_OBJ_KW(audiomixer_mixervoice_set_level_obj, 1, audiomixer_mixervoice_obj_set_level);
91+
MP_DEFINE_CONST_FUN_OBJ_2(audiomixer_mixervoice_set_level_obj, audiomixer_mixervoice_obj_set_level);
10592

10693
MP_PROPERTY_GETSET(audiomixer_mixervoice_level_obj,
10794
(mp_obj_t)&audiomixer_mixervoice_get_level_obj,

shared-bindings/rgbmatrix/RGBMatrix.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@ static void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_
116116
#endif
117117
}
118118

119+
typedef struct {
120+
nlr_jump_callback_node_t callback;
121+
mp_obj_base_t *base_ptr;
122+
} nlr_jump_callback_node_clear_displaybus_t;
123+
124+
static void clear_display_bus(void *node_in) {
125+
nlr_jump_callback_node_clear_displaybus_t *node = node_in;
126+
node->base_ptr->type = &mp_type_NoneType;
127+
}
128+
119129
//| def __init__(
120130
//| self,
121131
//| *,
@@ -217,6 +227,13 @@ static mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n
217227
rgbmatrix_rgbmatrix_obj_t *self = &allocate_display_bus_or_raise()->rgbmatrix;
218228
self->base.type = &rgbmatrix_RGBMatrix_type;
219229

230+
// If an exception is thrown, ensure the display bus object's type is set
231+
// back to the uninitialized/deinitialied type. **note that all other resource
232+
// deallocations must be handled by the shared-module code**
233+
nlr_jump_callback_node_clear_displaybus_t node;
234+
node.base_ptr = &self->base;
235+
nlr_push_jump_callback(&node.callback, clear_display_bus);
236+
220237
uint8_t rgb_count, addr_count;
221238
uint8_t rgb_pins[MP_ARRAY_SIZE(self->rgb_pins)];
222239
uint8_t addr_pins[MP_ARRAY_SIZE(self->addr_pins)];
@@ -254,7 +271,6 @@ static mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n
254271
clock_pin, latch_pin, output_enable_pin,
255272
args[ARG_doublebuffer].u_bool,
256273
args[ARG_framebuffer].u_obj, tile, args[ARG_serpentine].u_bool, NULL);
257-
258274
claim_and_never_reset_pins(args[ARG_rgb_list].u_obj);
259275
claim_and_never_reset_pins(args[ARG_addr_list].u_obj);
260276
claim_and_never_reset_pin(args[ARG_clock_pin].u_obj);

0 commit comments

Comments
 (0)