8000 Merge remote-tracking branch 'adafruit/main' into simplify_status_led · domdfcoding/circuitpython@5643355 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5643355

Browse files
committed
Merge remote-tracking branch 'adafruit/main' into simplify_status_led
2 parents 499a438 + 74355e8 commit 5643355

File tree

102 files changed

+1669
-767
lines changed

Some content is hidden

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

102 files changed

+1669
-767
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ jobs:
176176
- "TG-Watch"
177177
- "adafruit_feather_rp2040"
178178
- "adafruit_itsybitsy_rp2040"
179+
- "adafruit_macropad_rp2040"
179180
- "adafruit_neokey_trinkey_m0"
180181
- "adafruit_proxlight_trinkey_m0"
181182
- "adafruit_qt2040_trinkey"

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ STATIC void check_data_fit(size_t data_len, bool connectable) {
645645
// return true;
646646
// }
647647

648-
uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, float interval, uint8_t *advertising_data, uint16_t advertising_data_len, uint8_t *scan_response_data, uint16_t scan_response_data_len) {
648+
uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, float interval, uint8_t *advertising_data, uint16_t advertising_data_len, uint8_t *scan_response_data, uint16_t scan_response_data_len, mp_int_t tx_power) {
649649
check_enabled(self);
650650

651651
if (self->now_advertising) {
@@ -769,7 +769,7 @@ uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self,
769769
return 0;
770770
}
771771

772-
void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, mp_float_t interval, mp_buffer_info_t *advertising_data_bufinfo, mp_buffer_info_t *scan_response_data_bufinfo) {
772+
void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, mp_float_t interval, mp_buffer_info_t *advertising_data_bufinfo, mp_buffer_info_t *scan_response_data_bufinfo, mp_int_t tx_power) {
773773
check_enabled(self);
774774

775775
// interval value has already been validated.
@@ -793,12 +793,17 @@ void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool
793793
}
794794
}
795795

796+
if (tx_power != 0) {
797+
mp_raise_NotImplementedError(translate("Only tx_power=0 supported"));
798+
}
799+
796800
const uint32_t result = _common_hal_bleio_adapter_start_advertising(
797801
self, connectable, anonymous, timeout, interval,
798802
advertising_data_bufinfo->buf,
799803
advertising_data_bufinfo->len,
800804
scan_response_data_bufinfo->buf,
801-
scan_response_data_bufinfo->len);
805+
scan_response_data_bufinfo->len,
806+
tx_power);
802807

803808
if (result) {
804809
mp_raise_bleio_BluetoothError(translate("Already advertising"));

docs/design_guide.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,32 @@ To add different types outside CircuitPython you need to include them in the int
332332
The intersphinx_mapping above includes references to Python, BusDevice and CircuitPython
333333
Documentation
334334

335+
When the parameter have two different types, you should reference them as follows::
336+
337+
338+
class Character_LCD:
339+
"""Base class for character LCD
340+
341+
:param ~digitalio.DigitalInOut rs: The reset data line
342+
:param ~pwmio.PWMOut,~digitalio.DigitalInOut blue: Blue RGB Anode
343+
344+
"""
345+
346+
def __init__(self, rs, blue):
347+
self._rc = rs
348+
self.blue = blue
349+
350+
351+
Renders as:
352+
353+
.. py:class:: Character_LCD(rs, blue)
354+
:noindex:
355+
356+
Base class for character LCD
357+
358+
:param ~digitalio.DigitalInOut rs: The reset data line
359+
:param ~pwmio.PWMOut,~digitalio.DigitalInOut blue: Blue RGB Anode
360+
335361

336362
param_name
337363
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

frozen/Adafruit_CircuitPython_BLE

locale/ID.po

Lines changed: 79 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -727,15 +727,7 @@ msgid "CircuitPython core code crashed hard. Whoops!\n"
727727
msgstr "Kode inti CircuitPython mengalami crash. Aduh!\n"
728728

729729
#: supervisor/shared/safe_mode.c
730-
msgid ""
731-
"CircuitPython is in safe mode because you pressed the reset button during "
732-
"boot. Press again to exit safe mode.\n"
733-
msgstr ""
734-
"CircuitPython dalam mode aman karena Anda menekan tombol reset saat boot. "
735-
"Tekan lagi untuk keluar dari mode aman.\n"
736-
737-
#: supervisor/shared/safe_mode.c
738-
msgid "CircuitPython was unable to allocate the heap.\n"
730+
msgid "CircuitPython was unable to allocate the heap."
739731
msgstr ""
740732

741733
#: shared-module/bitbangio/SPI.c
@@ -866,6 +858,10 @@ msgstr "Potongan data harus mengikuti fmt chunk"
866858
msgid "Data too large for advertisement packet"
867859
msgstr "Data terlalu besar untuk paket advertisment"
868860

861+
#: ports/stm/common-hal/alarm/pin/PinAlarm.c
862+
msgid "Deep sleep pins must use a rising edge with pulldown"
863+
msgstr ""
864+
869865
#: shared-bindings/audiobusio/PDMIn.c
870866
msgid "Destination capacity is smaller than destination_length."
871867
msgstr "Kapasitas tujuan lebih kecil dari destination_length."
@@ -1656,10 +1652,6 @@ msgstr "Tidak terhubung"
16561652
msgid "Not playing"
16571653
msgstr "Tidak berfungsi"
16581654

1659-
#: main.c
1660-
msgid "Not running saved code.\n"
1661-
msgstr "Tidak menjalankan kode yang disimpan.\n"
1662-
16631655
#: shared-bindings/_bleio/__init__.c
16641656
msgid "Not settable"
16651657
msgstr ""
@@ -1695,6 +1687,10 @@ msgstr ""
16951687
"Hanya format Windows, mendukung BMP tidak dikompresi: ukuran header yang "
16961688
"diberikan adalah %d"
16971689

1690+
#: ports/stm/common-hal/alarm/pin/PinAlarm.c
1691+
msgid "Only edge detection is available on this hardware"
1692+
msgstr ""
1693+
16981694
#: shared-module/displayio/OnDiskBitmap.c
16991695
#, c-format
17001696
msgid ""
@@ -1710,6 +1706,7 @@ msgstr ""
17101706

17111707
#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c
17121708
#: ports/nrf/common-hal/alarm/time/TimeAlarm.c
1709+
#: ports/stm/common-hal/alarm/time/TimeAlarm.c
17131710
msgid "Only one alarm.time alarm can be set."
17141711
msgstr ""
17151712

@@ -1787,6 +1784,10 @@ msgstr "Periferal sedang digunakan"
17871784
msgid "Permission denied"
17881785
msgstr "Izin ditolak"
17891786

1787+
#: ports/stm/common-hal/alarm/pin/PinAlarm.c
1788+
msgid "Pin cannot wake from Deep Sleep"
1789+
msgstr ""
1790+
17901791
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
17911792
msgid "Pin count must be at least 1"
17921793
msgstr ""
@@ -1805,6 +1806,11 @@ msgstr "Jumlah pin terlalu besar"
18051806
msgid "Pin does not have ADC capabilities"
18061807
msgstr "Pin tidak mempunya kemampuan untuk ADC (Analog Digital Converter)"
18071808

1809+
#: ports/stm/common-hal/alarm/pin/PinAlarm.c
1810+
#: ports/stm/common-hal/pulseio/PulseIn.c
1811+
msgid "Pin interrupt already in use"
1812+
msgstr ""
1813+
18081814
#: shared-bindings/adafruit_bus_device/SPIDevice.c
18091815
#: shared-bindings/digitalio/DigitalInOut.c
18101816
msgid "Pin is input only"
@@ -1818,10 +1824,6 @@ msgstr ""
18181824
msgid "Pin must support hardware interrupts"
18191825
msgstr "Pin harus mendukung interupsi perangkat keras"
18201826

1821-
#: ports/stm/common-hal/pulseio/PulseIn.c
1822-
msgid "Pin number already reserved by EXTI"
1823-
msgstr "Nomor pin sudah dipesan oleh EXTI"
1824-
18251827
#: shared-bindings/rgbmatrix/RGBMatrix.c
18261828
#, c-format
18271829
msgid ""
@@ -1984,8 +1986,10 @@ msgid "Row entry must be digitalio.DigitalInOut"
19841986
msgstr "Entri baris harus digitalio.DigitalInOut"
19851987

19861988
#: main.c
1987-
msgid "Running in safe mode! "
1989+
msgid "Running in safe mode! Not running saved code.\n"
19881990
msgstr ""
1991+
"Berjalan di mode aman(safe mode)! Tidak menjalankan kode yang disimpan.\n"
1992+
"Berjalan di mode aman(safe mode)! tidak menjalankan kode yang tersimpan.\n"
19891993

19901994
#: shared-module/sdcardio/SDCard.c
19911995
msgid "SD card CSD format not supported"
@@ -2047,6 +2051,10 @@ msgstr ""
20472051
msgid "Size not supported"
20482052
msgstr ""
20492053

2054+
#: ports/stm/common-hal/alarm/SleepMemory.c
2055+
msgid "Sleep Memory not available"
2056+
msgstr ""
2057+
20502058
#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c
20512059
msgid "Slice and value different lengths."
20522060
msgstr "Potongan dan nilai panjangnya berbeda."
@@ -2105,18 +2113,14 @@ msgstr "Waktu baca suhu habis"
21052113
#: supervisor/shared/safe_mode.c
21062114
msgid ""
21072115
"The CircuitPython heap was corrupted because the stack was too small.\n"
2108-
"Please increase the stack size if you know how, or if not:"
2116+
"Increase the stack size if you know how. If not:"
21092117
msgstr ""
2110-
"heap dari CircuitPython rusak karena stack terlalu kecil.\n"
2111-
"Harap tambah ukuran stack jika Anda tahu caranya, atau jika tidak:"
21122118

21132119
#: supervisor/shared/safe_mode.c
21142120
msgid ""
21152121
"The `microcontroller` module was used to boot into safe mode. Press reset to "
2116-
"exit safe mode.\n"
2122+
"exit safe mode."
21172123
msgstr ""
2118-
"Modul `microcontroller` digunakan untukboot ke mode aman. Tekan reset untuk "
2119-
"keluar dari mode aman.\n"
21202124

21212125
#: shared-bindings/rgbmatrix/RGBMatrix.c
21222126
msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30"
@@ -2126,11 +2130,8 @@ msgstr ""
21262130
msgid ""
21272131
"The microcontroller's power dipped. Make sure your power supply provides\n"
21282132
"enough power for the whole circuit and press reset (after ejecting "
2129-
"CIRCUITPY).\n"
2133+
"CIRCUITPY)."
21302134
msgstr ""
2131-
"Kekuatan mikrokontroler menurun. Pastikan catu daya Anda menyediakan\n"
2132-
"daya yang cukup untuk seluruh rangkaian dan tekan reset (setelah "
2133-
"mengeluarkan CIRCUITPY).\n"
21342135

21352136
#: shared-module/audiomixer/MixerVoice.c
21362137
msgid "The sample's bits_per_sample does not match the mixer's"
@@ -2194,6 +2195,10 @@ msgstr "Terlalu banyak tampilan"
21942195
msgid "Total data to write is larger than %q"
21952196
msgstr ""
21962197

2198+
#: ports/stm/common-hal/alarm/touch/TouchAlarm.c
2199+
msgid "Touch alarms not available"
2200+
msgstr ""
2201+
21972202
#: py/obj.c
21982203
msgid "Traceback (most recent call last):\n"
21992204
msgstr "Traceback (bagian terakhir dari panggilan terkini):\n"
@@ -2431,8 +2436,13 @@ msgid "Writes not supported on Characteristic"
24312436
msgstr "Menulis tidak didukung pada Karakteristik"
24322437

24332438
#: supervisor/shared/safe_mode.c
2434-
msgid "You are in safe mode: something unanticipated happened.\n"
2435-
msgstr "Anda berada dalam mode aman: sesuatu yang tidak terduga terjadi.\n"
2439+
msgid "You are in safe mode because:\n"
2440+
msgstr ""
2441+
2442+
#: supervisor/shared/safe_mode.c
2443+
msgid ""
2444+
"You pressed the reset button during boot. Press again to exit safe mode."
2445+
msgstr ""
24362446

24372447
#: supervisor/shared/safe_mode.c
24382448
msgid "You requested starting safe mode by "
@@ -4381,6 +4391,45 @@ msgstr "zi harus berjenis float"
43814391
msgid "zi must be of shape (n_section, 2)"
43824392
msgstr ""
43834393

4394+
#~ msgid ""
4395+
#~ "CircuitPython is in safe mode because you pressed the reset button during "
4396+
#~ "boot. Press again to exit safe mode.\n"
4397+
#~ msgstr ""
4398+
#~ "CircuitPython dalam mode aman karena Anda menekan tombol reset saat boot. "
4399+
#~ "Tekan lagi untuk keluar dari mode aman.\n"
4400+
4401+
#~ msgid "Not running saved code.\n"
4402+
#~ msgstr "Tidak menjalankan kode yang disimpan.\n"
4403+
4404+
#~ msgid ""
4405+
#~ "The CircuitPython heap was corrupted because the stack was too small.\n"
4406+
#~ "Please increase the stack size if you know how, or if not:"
4407+
#~ msgstr ""
4408+
#~ "heap dari CircuitPython rusak karena stack terlalu kecil.\n"
4409+
#~ "Harap tambah ukuran stack jika Anda tahu caranya, atau jika tidak:"
4410+
4411+
#~ msgid ""
4412+
#~ "The `microcontroller` module was used to boot into safe mode. Press reset "
4413+
#~ "to exit safe mode.\n"
4414+
#~ msgstr ""
4415+
#~ "Modul `microcontroller` digunakan untukboot ke mode aman. Tekan reset "
4416+
#~ "untuk keluar dari mode aman.\n"
4417+
4418+
#~ msgid ""
4419+
#~ "The microcontroller's power dipped. Make sure your power supply provides\n"
4420+
#~ "enough power for the whole circuit and press reset (after ejecting "
4421+
#~ "CIRCUITPY).\n"
4422+
#~ msgstr ""
4423+
#~ "Kekuatan mikrokontroler menurun. Pastikan catu daya Anda menyediakan\n"
4424+
#~ "daya yang cukup untuk seluruh rangkaian dan tekan reset (setelah "
4425+
#~ "mengeluarkan CIRCUITPY).\n"
4426+
4427+
#~ msgid "You are in safe mode: something unanticipated happened.\n"
4428+
#~ msgstr "Anda berada dalam mode aman: sesuatu yang tidak terduga terjadi.\n"
4429+
4430+
#~ msgid "Pin number already reserved by EXTI"
4431+
#~ msgstr "Nomor pin sudah dipesan oleh EXTI"
4432+
43844433
#~ msgid "USB Busy"
43854434
#~ msgstr "USB Sibuk"
43864435

@@ -4555,10 +4604,6 @@ msgstr ""
45554604
#~ msgid "Running in safe mode! Auto-reload is off.\n"
45564605
#~ msgstr "Berjalan di mode aman(safe mode)! Auto-reload tidak aktif.\n"
45574606

4558-
#~ msgid "Running in safe mode! Not running saved code.\n"
4559-
#~ msgstr ""
4560-
#~ "Berjalan di mode aman(safe mode)! tidak menjalankan kode yang tersimpan.\n"
4561-
45624607
#~ msgid "'async for' or 'async with' outside async function"
45634608
#~ msgstr "'async for' atau 'async with' di luar fungsi async"
45644609

0 commit comments

Comments
 (0)
0