Skip to content

Commit d983f08

Browse files
committed
Merge remote-tracking branch 'adafruit/main' into simpler-status-bar-code
2 parents e5f2f0b + b8c8e85 commit d983f08

File tree

72 files changed

+1217
-781
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1217
-781
lines changed

devices/ble_hci/common-hal/_bleio/CharacteristicBuffer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ bool common_hal_bleio_characteristic_buffer_deinited(bleio_characteristic_buffer
9393
void common_hal_bleio_characteristic_buffer_deinit(bleio_characteristic_buffer_obj_t *self) {
9494
if (!common_hal_bleio_characteristic_buffer_deinited(self)) {
9595
bleio_characteristic_clear_observer(self->characteristic);
96+
ringbuf_deinit(&self->ringbuf);
9697
}
9798
}
9899

devices/ble_hci/common-hal/_bleio/PacketBuffer.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737
#include "supervisor/shared/tick.h"
3838

3939
STATIC void write_to_ringbuf(bleio_packet_buffer_obj_t *self, uint8_t *data, uint16_t len) {
40-
if (len + sizeof(uint16_t) > ringbuf_capacity(&self->ringbuf)) {
40+
if (len + sizeof(uint16_t) > ringbuf_size(&self->ringbuf)) {
4141
// This shouldn't happen.
4242
return;
4343
}
4444
// Push all the data onto the ring buffer.
4545
// Make room for the new value by dropping the oldest packets first.
46-
while (ringbuf_capacity(&self->ringbuf) - ringbuf_num_filled(&self->ringbuf) < len + sizeof(uint16_t)) {
46+
while (ringbuf_size(&self->ringbuf) - ringbuf_num_filled(&self->ringbuf) < len + sizeof(uint16_t)) {
4747
uint16_t packet_length;
4848
ringbuf_get_n(&self->ringbuf, (uint8_t *)&packet_length, sizeof(uint16_t));
4949
for (uint16_t i = 0; i < packet_length; i++) {
@@ -264,5 +264,6 @@ bool common_hal_bleio_packet_buffer_deinited(bleio_packet_buffer_obj_t *self) {
264264
void common_hal_bleio_packet_buffer_deinit(bleio_packet_buffer_obj_t *self) {
265265
if (!common_hal_bleio_packet_buffer_deinited(self)) {
266266
bleio_characteristic_clear_observer(self->characteristic);
267+
ringbuf_deinit(&self->ringbuf);
267268
}
268269
}

locale/ID.po

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2557,8 +2557,7 @@ msgstr "tidak dapat menetapkan ke ekspresi"
25572557
msgid "can't cancel self"
25582558
msgstr ""
25592559

2560-
#: py/obj.c py/objint.c shared-bindings/i2ctarget/I2CTarget.c
2561-
#: shared-module/adafruit_pixelbuf/PixelBuf.c
2560+
#: py/obj.c py/objint.c shared-module/adafruit_pixelbuf/PixelBuf.c
25622561
msgid "can't convert %q to %q"
25632562
msgstr ""
25642563

@@ -2745,10 +2744,6 @@ msgstr ""
27452744
msgid "color must be between 0x000000 and 0xffffff"
27462745
msgstr ""
27472746

2748-
#: shared-bindings/displayio/ColorConverter.c
2749-
msgid "color should be an int"
2750-
msgstr ""
2751-
27522747
#: py/emitnative.c
27532748
msgid "comparison of int and uint"
27542749
msgstr ""
@@ -2900,10 +2895,6 @@ msgstr ""
29002895
msgid "end of format while looking for conversion specifier"
29012896
msgstr ""
29022897

2903-
#: shared-bindings/displayio/Shape.c
2904-
msgid "end_x should be an int"
2905-
msgstr ""
2906-
29072898
#: shared-bindings/alarm/time/TimeAlarm.c
29082899
msgid "epoch_time not supported on this board"
29092900
msgstr ""
@@ -3771,10 +3762,6 @@ msgstr ""
37713762
msgid "palette must be 32 bytes long"
37723763
msgstr ""
37733764

3774-
#: shared-bindings/displayio/Palette.c
3775-
msgid "palette_index should be an int"
3776-
msgstr ""
3777-
37783765
#: py/emitinlinextensa.c
37793766
msgid "parameters must be registers in sequence a2 to a5"
37803767
msgstr ""
@@ -4012,10 +3999,6 @@ msgstr ""
40123999
msgid "start/end indices"
40134000
msgstr ""
40144001

4015-
#: shared-bindings/displayio/Shape.c
4016-
msgid "start_x should be an int"
4017-
msgstr ""
4018-
40194002
#: shared-bindings/random/__init__.c
40204003
msgid "step must be non-zero"
40214004
msgstr ""
@@ -4230,7 +4213,6 @@ msgid "unreadable attribute"
42304213
msgstr ""
42314214

42324215
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
4233-
#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c
42344216
msgid "unsupported %q type"
42354217
msgstr ""
42364218

@@ -4360,10 +4342,6 @@ msgstr "nilai x di luar batas"
43604342
msgid "xTaskCreate failed"
43614343
msgstr "xTaskCreate gagal"
43624344

4363-
#: shared-bindings/displayio/Shape.c
4364-
msgid "y should be an int"
4365-
msgstr "y harus menjadi int"
4366-
43674345
#: shared-module/displayio/Shape.c
43684346
msgid "y value out of bounds"
43694347
msgstr "Nilai y di luar batas"
@@ -4384,6 +4362,9 @@ msgstr "zi harus berjenis float"
43844362
msgid "zi must be of shape (n_section, 2)"
43854363
msgstr "Zi harus berbentuk (n_section, 2)"
43864364

4365+
#~ msgid "y should be an int"
4366+
#~ msgstr "y harus menjadi int"
4367+
43874368
#~ msgid "%q must be a tuple of length 2"
43884369
#~ msgstr "%q harus berupa tuple dengan panjang 2"
43894370

locale/circuitpython.pot

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2526,8 +2526,7 @@ msgstr ""
25262526
msgid "can't cancel self"
25272527
msgstr ""
25282528

2529-
#: py/obj.c py/objint.c shared-bindings/i2ctarget/I2CTarget.c
2530-
#: shared-module/adafruit_pixelbuf/PixelBuf.c
2529+
#: py/obj.c py/objint.c shared-module/adafruit_pixelbuf/PixelBuf.c
25312530
msgid "can't convert %q to %q"
25322531
msgstr ""
25332532

@@ -2714,10 +2713,6 @@ msgstr ""
27142713
msgid "color must be between 0x000000 and 0xffffff"
27152714
msgstr ""
27162715

2717-
#: shared-bindings/displayio/ColorConverter.c
2718-
msgid "color should be an int"
2719-
msgstr ""
2720-
27212716
#: py/emitnative.c
27222717
msgid "comparison of int and uint"
27232718
msgstr ""
@@ -2869,10 +2864,6 @@ msgstr ""
28692864
msgid "end of format while looking for conversion specifier"
28702865
msgstr ""
28712866

2872-
#: shared-bindings/displayio/Shape.c
2873-
msgid "end_x should be an int"
2874-
msgstr ""
2875-
28762867
#: shared-bindings/alarm/time/TimeAlarm.c
28772868
msgid "epoch_time not supported on this board"
28782869
msgstr ""
@@ -3739,10 +3730,6 @@ msgstr ""
37393730
msgid "palette must be 32 bytes long"
37403731
msgstr ""
37413732

3742-
#: shared-bindings/displayio/Palette.c
3743-
msgid "palette_index should be an int"
3744-
msgstr ""
3745-
37463733
#: py/emitinlinextensa.c
37473734
msgid "parameters must be registers in sequence a2 to a5"
37483735
msgstr ""
@@ -3980,10 +3967,6 @@ msgstr ""
39803967
msgid "start/end indices"
39813968
msgstr ""
39823969

3983-
#: shared-bindings/displayio/Shape.c
3984-
msgid "start_x should be an int"
3985-
msgstr ""
3986-
39873970
#: shared-bindings/random/__init__.c
39883971
msgid "step must be non-zero"
39893972
msgstr ""
@@ -4198,7 +4181,6 @@ msgid "unreadable attribute"
41984181
msgstr ""
41994182

42004183
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
4201-
#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c
42024184
msgid "unsupported %q type"
42034185
msgstr ""
42044186

@@ -4328,10 +4310,6 @@ msgstr ""
43284310
msgid "xTaskCreate failed"
43294311
msgstr ""
43304312

4331-
#: shared-bindings/displayio/Shape.c
4332-
msgid "y should be an int"
4333-
msgstr ""
4334-
43354313
#: shared-module/displayio/Shape.c
43364314
msgid "y value out of bounds"
43374315
msgstr ""

locale/cs.po

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2544,8 +2544,7 @@ msgstr ""
25442544
msgid "can't cancel self"
25452545
msgstr ""
25462546

2547-
#: py/obj.c py/objint.c shared-bindings/i2ctarget/I2CTarget.c
2548-
#: shared-module/adafruit_pixelbuf/PixelBuf.c
2547+
#: py/obj.c py/objint.c shared-module/adafruit_pixelbuf/PixelBuf.c
25492548
msgid "can't convert %q to %q"
25502549
msgstr ""
25512550

@@ -2732,10 +2731,6 @@ msgstr ""
27322731
msgid "color must be between 0x000000 and 0xffffff"
27332732
msgstr ""
27342733

2735-
#: shared-bindings/displayio/ColorConverter.c
2736-
msgid "color should be an int"
2737-
msgstr ""
2738-
27392734
#: py/emitnative.c
27402735
msgid "comparison of int and uint"
27412736
msgstr ""
@@ -2887,10 +2882,6 @@ msgstr ""
28872882
msgid "end of format while looking for conversion specifier"
28882883
msgstr ""
28892884

2890-
#: shared-bindings/displayio/Shape.c
2891-
msgid "end_x should be an int"
2892-
msgstr ""
2893-
28942885
#: shared-bindings/alarm/time/TimeAlarm.c
28952886
msgid "epoch_time not supported on this board"
28962887
msgstr ""
@@ -3757,10 +3748,6 @@ msgstr ""
37573748
msgid "palette must be 32 bytes long"
37583749
msgstr ""
37593750

3760-
#: shared-bindings/displayio/Palette.c
3761-
msgid "palette_index should be an int"
3762-
msgstr ""
3763-
37643751
#: py/emitinlinextensa.c
37653752
msgid "parameters must be registers in sequence a2 to a5"
37663753
msgstr ""
@@ -3998,10 +3985,6 @@ msgstr ""
39983985
msgid "start/end indices"
39993986
msgstr ""
40003987

4001-
#: shared-bindings/displayio/Shape.c
4002-
msgid "start_x should be an int"
4003-
msgstr ""
4004-
40053988
#: shared-bindings/random/__init__.c
40063989
msgid "step must be non-zero"
40073990
msgstr ""
@@ -4216,7 +4199,6 @@ msgid "unreadable attribute"
42164199
msgstr ""
42174200

42184201
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
4219-
#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c
42204202
msgid "unsupported %q type"
42214203
msgstr ""
42224204

@@ -4346,10 +4328,6 @@ msgstr ""
43464328
msgid "xTaskCreate failed"
43474329
msgstr ""
43484330

4349-
#: shared-bindings/displayio/Shape.c
4350-
msgid "y should be an int"
4351-
msgstr ""
4352-
43534331
#: shared-module/displayio/Shape.c
43544332
msgid "y value out of bounds"
43554333
msgstr ""

locale/de_DE.po

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2599,8 +2599,7 @@ msgstr "kann keinem Ausdruck zuweisen"
25992599
msgid "can't cancel self"
26002600
msgstr "kann self nicht abbrechen"
26012601

2602-
#: py/obj.c py/objint.c shared-bindings/i2ctarget/I2CTarget.c
2603-
#: shared-module/adafruit_pixelbuf/PixelBuf.c
2602+
#: py/obj.c py/objint.c shared-module/adafruit_pixelbuf/PixelBuf.c
26042603
msgid "can't convert %q to %q"
26052604
msgstr "kann %q nicht zu %q konvertieren"
26062605

@@ -2795,10 +2794,6 @@ msgstr ""
27952794
msgid "color must be between 0x000000 and 0xffffff"
27962795
msgstr "Farbe muss zwischen 0x000000 und 0xffffff liegen"
27972796

2798-
#: shared-bindings/displayio/ColorConverter.c
2799-
msgid "color should be an int"
2800-
msgstr "Farbe sollte ein int sein"
2801-
28022797
#: py/emitnative.c
28032798
msgid "comparison of int and uint"
28042799
msgstr "Vergleich von int und uint"
@@ -2952,10 +2947,6 @@ msgstr "leere Sequenz"
29522947
msgid "end of format while looking for conversion specifier"
29532948
msgstr "Ende des Formats wärend der Suche nach einem conversion specifier"
29542949

2955-
#: shared-bindings/displayio/Shape.c
2956-
msgid "end_x should be an int"
2957-
msgstr "end_x sollte ein int sein"
2958-
29592950
#: shared-bindings/alarm/time/TimeAlarm.c
29602951
msgid "epoch_time not supported on this board"
29612952
msgstr "epoch_time wird auf diesem Board nicht unterstützt"
@@ -3835,10 +3826,6 @@ msgstr "pack erwartete %d Artikel zum Packen (erhalten %d)"
38353826
msgid "palette must be 32 bytes long"
38363827
msgstr "Die Palette muss 32 Byte lang sein"
38373828

3838-
#: shared-bindings/displayio/Palette.c
3839-
msgid "palette_index should be an int"
3840-
msgstr "palette_index sollte ein int sein"
3841-
38423829
#: py/emitinlinextensa.c
38433830
msgid "parameters must be registers in sequence a2 to a5"
38443831
msgstr "Die Parameter müssen Register der Reihenfolge a2 bis a5 sein"
@@ -4076,10 +4063,6 @@ msgstr "source_bitmap muss value_count von 8 haben"
40764063
msgid "start/end indices"
40774064
msgstr "start/end Indizes"
40784065

4079-
#: shared-bindings/displayio/Shape.c
4080-
msgid "start_x should be an int"
4081-
msgstr "start_x sollte ein int sein"
4082-
40834066
#: shared-bindings/random/__init__.c
40844067
msgid "step must be non-zero"
40854068
msgstr "Schritt (step) darf nicht Null sein"
@@ -4297,7 +4280,6 @@ msgid "unreadable attribute"
42974280
msgstr "nicht lesbares Attribut"
42984281

42994282
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
4300-
#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c
43014283
msgid "unsupported %q type"
43024284
msgstr "Nicht unterstützter %q-Typ"
43034285

@@ -4427,10 +4409,6 @@ msgstr "x Wert außerhalb der Grenzen"
44274409
msgid "xTaskCreate failed"
44284410
msgstr "xTaskCreate fehlgeschlagen"
44294411

4430-
#: shared-bindings/displayio/Shape.c
4431-
msgid "y should be an int"
4432-
msgstr "y sollte ein int sein"
4433-
44344412
#: shared-module/displayio/Shape.c
44354413
msgid "y value out of bounds"
44364414
msgstr "y Wert außerhalb der Grenzen"
@@ -4451,6 +4429,21 @@ msgstr "zi muss eine Gleitkommazahl sein"
44514429
msgid "zi must be of shape (n_section, 2)"
44524430
msgstr "zi muss die Form (n_section, 2) haben"
44534431

4432+
#~ msgid "color should be an int"
4433+
#~ msgstr "Farbe sollte ein int sein"
4434+
4435+
#~ msgid "end_x should be an int"
4436+
#~ msgstr "end_x sollte ein int sein"
4437+
4438+
#~ msgid "palette_index should be an int"
4439+
#~ msgstr "palette_index sollte ein int sein"
4440+
4441+
#~ msgid "start_x should be an int"
4442+
#~ msgstr "start_x sollte ein int sein"
4443+
4444+
#~ msgid "y should be an int"
4445+
#~ msgstr "y sollte ein int sein"
4446+
44544447
#~ msgid ""
44554448
#~ "sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' "
44564449
#~ "or 'B'"

0 commit comments

Comments
 (0)