Merge branch 'main' into add-translation-for-builtin-object-help
This commit is contained in:
commit
2d8404c599
4
.github/workflows/pre-commit.yml
vendored
4
.github/workflows/pre-commit.yml
vendored
@ -15,6 +15,10 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-python@v1
|
||||
- name: Install deps
|
||||
run: sudo apt-get update && sudo apt-get install -y gettext
|
||||
- name: Populate selected submodules
|
||||
run: git submodule update --init extmod/ulab
|
||||
- name: set PY
|
||||
run: echo >>$GITHUB_ENV PY="$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
|
||||
- uses: actions/cache@v1
|
||||
|
@ -11,3 +11,10 @@ repos:
|
||||
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/esp32s2/esp-idf-config/.*|ports/esp32s2/boards/.*/sdkconfig)'
|
||||
- id: trailing-whitespace
|
||||
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*)'
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: translations
|
||||
name: Check Translations
|
||||
entry: sh -c "make translate"
|
||||
language: system
|
||||
always_run: true
|
||||
|
2
Makefile
2
Makefile
@ -222,7 +222,7 @@ pseudoxml:
|
||||
all-source:
|
||||
|
||||
locale/circuitpython.pot: all-source
|
||||
find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o circuitpython.pot -p locale
|
||||
find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o - | sed -e '/"POT-Creation-Date: /d' > $@
|
||||
|
||||
# Historically, `make translate` updated the .pot file and ran msgmerge.
|
||||
# However, this was a frequent source of merge conflicts. Weblate can perform
|
||||
|
2
conf.py
2
conf.py
@ -276,7 +276,7 @@ html_static_path = ['docs/static']
|
||||
# Add any extra paths that contain custom files (such as robots.txt or
|
||||
# .htaccess) here, relative to this directory. These files are copied
|
||||
# directly to the root of the documentation.
|
||||
#html_extra_path = []
|
||||
html_extra_path = ["docs/robots.txt"]
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
|
6
docs/robots.txt
Normal file
6
docs/robots.txt
Normal file
@ -0,0 +1,6 @@
|
||||
User-agent: *
|
||||
Allow: /*/latest/
|
||||
Allow: /en/latest/ # Fallback for bots that don't understand wildcards
|
||||
Allow: /*/6.0.x/
|
||||
Allow: /en/6.0.x/ # Fallback for bots that don't understand wildcards
|
||||
Disallow: /
|
@ -1 +1 @@
|
||||
Subproject commit aa7e741530df471d206a4a321823a37a913a0eb8
|
||||
Subproject commit d62d07ea0b9597535428ebe6012da6b0d6608bf9
|
@ -1 +1 @@
|
||||
Subproject commit 218b80e63ab6ff87c1851e403f08b3d716d68f5e
|
||||
Subproject commit cfcffe94ce62f5ef1fb5aef4641924d64dc4b1c0
|
127
locale/ID.po
127
locale/ID.po
@ -5,8 +5,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
|
||||
"PO-Revision-Date: 2020-10-10 23:51+0000\n"
|
||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||
"PO-Revision-Date: 2021-01-03 05:29+0000\n"
|
||||
"Last-Translator: oon arfiandwi <oon.arfiandwi@gmail.com>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: ID\n"
|
||||
@ -14,13 +14,15 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Weblate 4.3-dev\n"
|
||||
"X-Generator: Weblate 4.4.1-dev\n"
|
||||
|
||||
#: main.c
|
||||
msgid ""
|
||||
"\n"
|
||||
"Code done running.\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Kode selesai beroperasi.\n"
|
||||
|
||||
#: main.c
|
||||
msgid ""
|
||||
@ -62,7 +64,7 @@ msgstr "pin alamat %d dan pin rgb %d menunjukkan tinggi %d, bukan %d"
|
||||
|
||||
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
|
||||
msgid "%q failure: %d"
|
||||
msgstr ""
|
||||
msgstr "%q gagal: %d"
|
||||
|
||||
#: shared-bindings/microcontroller/Pin.c
|
||||
msgid "%q in use"
|
||||
@ -78,7 +80,7 @@ msgstr "%q indeks di luar batas"
|
||||
|
||||
#: py/obj.c
|
||||
msgid "%q indices must be integers, not %q"
|
||||
msgstr ""
|
||||
msgstr "%q indeks harus bilangan bulat, bukan %q"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q list must be a list"
|
||||
@ -86,7 +88,7 @@ msgstr "daftar %q harus berupa daftar"
|
||||
|
||||
#: shared-bindings/memorymonitor/AllocationAlarm.c
|
||||
msgid "%q must be >= 0"
|
||||
msgstr ""
|
||||
msgstr "%q harus >= 0"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
@ -102,7 +104,7 @@ msgstr "%q harus berupa tuple dengan panjang 2"
|
||||
|
||||
#: shared-bindings/canio/Match.c
|
||||
msgid "%q out of range"
|
||||
msgstr ""
|
||||
msgstr "%q di luar jangkauan"
|
||||
|
||||
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
|
||||
msgid "%q pin invalid"
|
||||
@ -126,23 +128,23 @@ msgstr ""
|
||||
|
||||
#: py/proto.c
|
||||
msgid "'%q' object does not support '%q'"
|
||||
msgstr ""
|
||||
msgstr "Objek '%q' tidak mendukung '%q'"
|
||||
|
||||
#: py/obj.c
|
||||
msgid "'%q' object does not support item assignment"
|
||||
msgstr ""
|
||||
msgstr "Objek '%q' tidak mendukung penugasan item"
|
||||
|
||||
#: py/obj.c
|
||||
msgid "'%q' object does not support item deletion"
|
||||
msgstr ""
|
||||
msgstr "Objek '%q' tidak mendukung penghapusan item"
|
||||
|
||||
#: py/runtime.c
|
||||
msgid "'%q' object has no attribute '%q'"
|
||||
msgstr ""
|
||||
msgstr "Objek '%q' tidak memiliki atribut '%q'"
|
||||
|
||||
#: py/runtime.c
|
||||
msgid "'%q' object is not an iterator"
|
||||
msgstr ""
|
||||
msgstr "Objek '%q' bukan merupakan iterator"
|
||||
|
||||
#: py/objtype.c py/runtime.c
|
||||
msgid "'%q' object is not callable"
|
||||
@ -150,7 +152,7 @@ msgstr ""
|
||||
|
||||
#: py/runtime.c
|
||||
msgid "'%q' object is not iterable"
|
||||
msgstr ""
|
||||
msgstr "Objek '%q' tidak dapat diulang"
|
||||
|
||||
#: py/obj.c
|
||||
msgid "'%q' object is not subscriptable"
|
||||
@ -224,7 +226,7 @@ msgstr "'await' diluar fungsi"
|
||||
|
||||
#: py/compile.c
|
||||
msgid "'await', 'async for' or 'async with' outside async function"
|
||||
msgstr ""
|
||||
msgstr "'await', 'async for' atau 'async with' di luar fungsi async"
|
||||
|
||||
#: py/compile.c
|
||||
msgid "'break' outside loop"
|
||||
@ -256,7 +258,7 @@ msgstr "'return' diluar fungsi"
|
||||
|
||||
#: py/compile.c
|
||||
msgid "'yield from' inside async function"
|
||||
msgstr ""
|
||||
msgstr "'yield from' di dalam fungsi async"
|
||||
|
||||
#: py/compile.c
|
||||
msgid "'yield' outside function"
|
||||
@ -285,7 +287,7 @@ msgstr "Sebuah channel hardware interrupt sedang digunakan"
|
||||
|
||||
#: ports/esp32s2/common-hal/analogio/AnalogIn.c
|
||||
msgid "ADC2 is being used by WiFi"
|
||||
msgstr ""
|
||||
msgstr "ADC2 sedang digunakan oleh WiFi"
|
||||
|
||||
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
|
||||
#, c-format
|
||||
@ -308,13 +310,13 @@ msgstr "Semua perangkat I2C sedang digunakan"
|
||||
#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
|
||||
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
|
||||
msgid "All PCNT units in use"
|
||||
msgstr ""
|
||||
msgstr "Semua unit PCNT sedang digunakan"
|
||||
|
||||
#: ports/atmel-samd/common-hal/canio/Listener.c
|
||||
#: ports/esp32s2/common-hal/canio/Listener.c
|
||||
#: ports/stm/common-hal/canio/Listener.c
|
||||
msgid "All RX FIFOs in use"
|
||||
msgstr ""
|
||||
msgstr "Semua RX FIFO sedang digunakan"
|
||||
|
||||
#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c
|
||||
msgid "All SPI peripherals are in use"
|
||||
@ -1188,6 +1190,7 @@ msgstr "Fase tidak valid"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
|
||||
#: shared-module/rgbmatrix/RGBMatrix.c
|
||||
msgid "Invalid pin"
|
||||
@ -1512,6 +1515,10 @@ msgstr ""
|
||||
msgid "Only one alarm.time alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
msgid "Only one alarm.touch alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/displayio/ColorConverter.c
|
||||
msgid "Only one color can be transparent at a time"
|
||||
msgstr ""
|
||||
@ -1825,38 +1832,41 @@ msgid ""
|
||||
"enough power for the whole circuit and press reset (after ejecting "
|
||||
"CIRCUITPY).\n"
|
||||
msgstr ""
|
||||
"Kekuatan mikrokontroler menurun. Pastikan catu daya Anda menyediakan\n"
|
||||
"daya yang cukup untuk seluruh rangkaian dan tekan reset (setelah "
|
||||
"mengeluarkan CIRCUITPY).\n"
|
||||
|
||||
#: shared-module/audiomixer/MixerVoice.c
|
||||
msgid "The sample's bits_per_sample does not match the mixer's"
|
||||
msgstr ""
|
||||
msgstr "Sampel bits_per_sampel tidak cocok dengan mixer"
|
||||
|
||||
#: shared-module/audiomixer/MixerVoice.c
|
||||
msgid "The sample's channel count does not match the mixer's"
|
||||
msgstr ""
|
||||
msgstr "Jumlah saluran sampel tidak cocok dengan mixer"
|
||||
|
||||
#: shared-module/audiomixer/MixerVoice.c
|
||||
msgid "The sample's sample rate does not match the mixer's"
|
||||
msgstr ""
|
||||
msgstr "Tingkat sampel dari sampel tidak cocok dengan mixer"
|
||||
|
||||
#: shared-module/audiomixer/MixerVoice.c
|
||||
msgid "The sample's signedness does not match the mixer's"
|
||||
msgstr ""
|
||||
msgstr "signedness dari sampel tidak cocok dengan mixer"
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
msgid "Tile height must exactly divide bitmap height"
|
||||
msgstr ""
|
||||
msgstr "Tinggi tile harus persis membagi tinggi bitmap"
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c shared-module/displayio/TileGrid.c
|
||||
msgid "Tile index out of bounds"
|
||||
msgstr ""
|
||||
msgstr "Indeks ubin di luar batas"
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
msgid "Tile value out of bounds"
|
||||
msgstr ""
|
||||
msgstr "Nilai ubin di luar batas"
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
msgid "Tile width must exactly divide bitmap width"
|
||||
msgstr ""
|
||||
msgstr "Lebar ubin harus persis membagi lebar bitmap"
|
||||
|
||||
#: shared-bindings/alarm/time/TimeAlarm.c
|
||||
msgid "Time is in the past."
|
||||
@ -1882,63 +1892,64 @@ msgstr "Terlalu banyak channel dalam sampel"
|
||||
|
||||
#: shared-module/displayio/__init__.c
|
||||
msgid "Too many display busses"
|
||||
msgstr ""
|
||||
msgstr "Terlalu banyak tampilan bus"
|
||||
|
||||
#: shared-module/displayio/__init__.c
|
||||
msgid "Too many displays"
|
||||
msgstr ""
|
||||
msgstr "Terlalu banyak tampilan"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Total data to write is larger than outgoing_packet_length"
|
||||
msgstr ""
|
||||
"Total data yang akan ditulis lebih besar daripada outgoing_packet_length"
|
||||
|
||||
#: py/obj.c
|
||||
msgid "Traceback (most recent call last):\n"
|
||||
msgstr ""
|
||||
msgstr "Traceback (bagian terakhir dari panggilan terkini):\n"
|
||||
|
||||
#: shared-bindings/time/__init__.c
|
||||
msgid "Tuple or struct_time argument required"
|
||||
msgstr ""
|
||||
msgstr "Diperlukan argumen Tuple atau struct_time"
|
||||
|
||||
#: ports/stm/common-hal/busio/UART.c
|
||||
msgid "UART Buffer allocation error"
|
||||
msgstr ""
|
||||
msgstr "Kesalahan alokasi Buffer UART"
|
||||
|
||||
#: ports/stm/common-hal/busio/UART.c
|
||||
msgid "UART De-init error"
|
||||
msgstr ""
|
||||
msgstr "Kesalahan UART De-init"
|
||||
|
||||
#: ports/stm/common-hal/busio/UART.c
|
||||
msgid "UART Init Error"
|
||||
msgstr ""
|
||||
msgstr "Kesalahan Init UART"
|
||||
|
||||
#: ports/stm/common-hal/busio/UART.c
|
||||
msgid "UART Re-init error"
|
||||
msgstr ""
|
||||
msgstr "Kesalahan Re-init UART"
|
||||
|
||||
#: ports/stm/common-hal/busio/UART.c
|
||||
msgid "UART write error"
|
||||
msgstr ""
|
||||
msgstr "Kesalahan penulisan UART"
|
||||
|
||||
#: shared-module/usb_hid/Device.c
|
||||
msgid "USB Busy"
|
||||
msgstr ""
|
||||
msgstr "USB Sibuk"
|
||||
|
||||
#: shared-module/usb_hid/Device.c
|
||||
msgid "USB Error"
|
||||
msgstr ""
|
||||
msgstr "Kesalahan USB"
|
||||
|
||||
#: shared-bindings/_bleio/UUID.c
|
||||
msgid "UUID integer value must be 0-0xffff"
|
||||
msgstr ""
|
||||
msgstr "Nilai integer UUID harus 0-0xffff"
|
||||
|
||||
#: shared-bindings/_bleio/UUID.c
|
||||
msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
|
||||
msgstr ""
|
||||
msgstr "String UUID bukan 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
|
||||
|
||||
#: shared-bindings/_bleio/UUID.c
|
||||
msgid "UUID value is not str, int or byte buffer"
|
||||
msgstr ""
|
||||
msgstr "Nilai UUID bukan str, int atau byte buffer"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
@ -1952,7 +1963,7 @@ msgstr ""
|
||||
#: shared-module/displayio/I2CDisplay.c
|
||||
#, c-format
|
||||
msgid "Unable to find I2C Display at %x"
|
||||
msgstr ""
|
||||
msgstr "Tidak dapat menemukan Tampilan I2C di %x"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
|
||||
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
|
||||
@ -1961,15 +1972,15 @@ msgstr "Tidak dapat menemukan GCLK yang kosong"
|
||||
|
||||
#: py/parse.c
|
||||
msgid "Unable to init parser"
|
||||
msgstr ""
|
||||
msgstr "Tidak dapat memulai parser"
|
||||
|
||||
#: shared-module/displayio/OnDiskBitmap.c
|
||||
msgid "Unable to read color palette data"
|
||||
msgstr ""
|
||||
msgstr "Tidak dapat membaca data palet warna"
|
||||
|
||||
#: shared-bindings/nvm/ByteArray.c
|
||||
msgid "Unable to write to nvm."
|
||||
msgstr ""
|
||||
msgstr "Tidak dapat menulis ke nvm."
|
||||
|
||||
#: shared-bindings/alarm/SleepMemory.c
|
||||
msgid "Unable to write to sleep_memory."
|
||||
@ -1977,7 +1988,7 @@ msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/UUID.c
|
||||
msgid "Unexpected nrfx uuid type"
|
||||
msgstr ""
|
||||
msgstr "Tipe urf nrfx tak sesuai"
|
||||
|
||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||
#, c-format
|
||||
@ -2535,6 +2546,10 @@ msgstr ""
|
||||
msgid "data must be of equal length"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "data type not understood"
|
||||
msgstr ""
|
||||
|
||||
#: py/parsenum.c
|
||||
msgid "decimal numbers not supported"
|
||||
msgstr ""
|
||||
@ -2845,7 +2860,7 @@ msgid "input and output shapes are not compatible"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "input argument must be an integer or a 2-tuple"
|
||||
msgid "input argument must be an integer, a tuple, or a list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
@ -3088,6 +3103,10 @@ msgstr ""
|
||||
msgid "maxiter should be > 0"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "median argument must be an ndarray"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes"
|
||||
@ -3318,10 +3337,6 @@ msgstr ""
|
||||
msgid "operation is implemented for 1D Boolean arrays only"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented for flattened array"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented on ndarrays"
|
||||
msgstr ""
|
||||
@ -3666,6 +3681,10 @@ msgstr ""
|
||||
msgid "too many arguments provided with the given format"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "too many dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "too many indices"
|
||||
msgstr ""
|
||||
@ -3675,6 +3694,10 @@ msgstr ""
|
||||
msgid "too many values to unpack (expected %d)"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays of equal length"
|
||||
msgstr ""
|
||||
@ -3683,10 +3706,6 @@ msgstr ""
|
||||
msgid "trigger level must be 0 or 1"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/linalg/linalg.c
|
||||
msgid "tuple index out of range"
|
||||
msgstr ""
|
||||
|
||||
#: py/obj.c
|
||||
msgid "tuple/list has wrong length"
|
||||
msgstr ""
|
||||
|
@ -9,7 +9,7 @@ msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-30 17:42-0600\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"PO-Revision-Date: 2021-01-11 19:30-0600\n
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
@ -280,6 +280,10 @@ msgstr ""
|
||||
msgid "3-arg pow() not supported"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/msgpack/__init__.c
|
||||
msgid "64 bit types"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/countio/Counter.c
|
||||
#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c
|
||||
msgid "A hardware interrupt channel is already in use"
|
||||
@ -1867,10 +1871,6 @@ msgstr ""
|
||||
msgid "Total data to write is larger than outgoing_packet_length"
|
||||
msgstr ""
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
msgid "TouchAlarm not available in light sleep"
|
||||
msgstr ""
|
||||
|
||||
#: py/obj.c
|
||||
msgid "Traceback (most recent call last):\n"
|
||||
msgstr ""
|
||||
@ -2434,6 +2434,10 @@ msgstr ""
|
||||
msgid "circle can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/msgpack/ExtType.c
|
||||
msgid "code outside range 0~127"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Palette.c
|
||||
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
|
||||
msgstr ""
|
||||
@ -2506,6 +2510,10 @@ msgstr ""
|
||||
msgid "data must be of equal length"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "data type not understood"
|
||||
msgstr ""
|
||||
|
||||
#: py/parsenum.c
|
||||
msgid "decimal numbers not supported"
|
||||
msgstr ""
|
||||
@ -2514,6 +2522,10 @@ msgstr ""
|
||||
msgid "default 'except' must be last"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/msgpack/__init__.c
|
||||
msgid "default is not a function"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/audiobusio/PDMIn.c
|
||||
msgid ""
|
||||
"destination buffer must be a bytearray or array of type 'B' for bit_depth = 8"
|
||||
@ -2613,6 +2625,10 @@ msgstr ""
|
||||
msgid "expecting key:value for dict"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/msgpack/__init__.c
|
||||
msgid "ext_hook is not a function"
|
||||
msgstr ""
|
||||
|
||||
#: py/argcheck.c
|
||||
msgid "extra keyword arguments given"
|
||||
msgstr ""
|
||||
@ -2816,7 +2832,7 @@ msgid "input and output shapes are not compatible"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "input argument must be an integer or a 2-tuple"
|
||||
msgid "input argument must be an integer, a tuple, or a list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
@ -3059,6 +3075,10 @@ msgstr ""
|
||||
msgid "maxiter should be > 0"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "median argument must be an ndarray"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes"
|
||||
@ -3141,6 +3161,10 @@ msgstr ""
|
||||
msgid "no binding for nonlocal found"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/msgpack/__init__.c
|
||||
msgid "no default packer"
|
||||
msgstr ""
|
||||
|
||||
#: py/builtinimport.c
|
||||
msgid "no module named '%q'"
|
||||
msgstr ""
|
||||
@ -3292,10 +3316,6 @@ msgstr ""
|
||||
msgid "operation is implemented for 1D Boolean arrays only"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented for flattened array"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented on ndarrays"
|
||||
msgstr ""
|
||||
@ -3482,6 +3502,10 @@ msgstr ""
|
||||
msgid "shape must be a tuple"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/msgpack/__init__.c
|
||||
msgid "short read"
|
||||
msgstr ""
|
||||
|
||||
#: py/objstr.c
|
||||
msgid "sign not allowed in string format specifier"
|
||||
msgstr ""
|
||||
@ -3639,6 +3663,10 @@ msgstr ""
|
||||
msgid "too many arguments provided with the given format"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "too many dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "too many indices"
|
||||
msgstr ""
|
||||
@ -3648,6 +3676,10 @@ msgstr ""
|
||||
msgid "too many values to unpack (expected %d)"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays of equal length"
|
||||
msgstr ""
|
||||
@ -3656,10 +3688,6 @@ msgstr ""
|
||||
msgid "trigger level must be 0 or 1"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/linalg/linalg.c
|
||||
msgid "tuple index out of range"
|
||||
msgstr ""
|
||||
|
||||
#: py/obj.c
|
||||
msgid "tuple/list has wrong length"
|
||||
msgstr ""
|
||||
|
33
locale/cs.po
33
locale/cs.po
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
|
||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||
"PO-Revision-Date: 2020-12-04 18:33+0000\n"
|
||||
"Last-Translator: vkuthan <vit.kuthan@seznam.cz>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -1172,6 +1172,7 @@ msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
|
||||
#: shared-module/rgbmatrix/RGBMatrix.c
|
||||
msgid "Invalid pin"
|
||||
@ -1490,6 +1491,10 @@ msgstr ""
|
||||
msgid "Only one alarm.time alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
msgid "Only one alarm.touch alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/displayio/ColorConverter.c
|
||||
msgid "Only one color can be transparent at a time"
|
||||
msgstr ""
|
||||
@ -2495,6 +2500,10 @@ msgstr ""
|
||||
msgid "data must be of equal length"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "data type not understood"
|
||||
msgstr ""
|
||||
|
||||
#: py/parsenum.c
|
||||
msgid "decimal numbers not supported"
|
||||
msgstr ""
|
||||
@ -2805,7 +2814,7 @@ msgid "input and output shapes are not compatible"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "input argument must be an integer or a 2-tuple"
|
||||
msgid "input argument must be an integer, a tuple, or a list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
@ -3048,6 +3057,10 @@ msgstr ""
|
||||
msgid "maxiter should be > 0"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "median argument must be an ndarray"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes"
|
||||
@ -3277,10 +3290,6 @@ msgstr ""
|
||||
msgid "operation is implemented for 1D Boolean arrays only"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented for flattened array"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented on ndarrays"
|
||||
msgstr ""
|
||||
@ -3624,6 +3633,10 @@ msgstr ""
|
||||
msgid "too many arguments provided with the given format"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "too many dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "too many indices"
|
||||
msgstr ""
|
||||
@ -3633,6 +3646,10 @@ msgstr ""
|
||||
msgid "too many values to unpack (expected %d)"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays of equal length"
|
||||
msgstr ""
|
||||
@ -3641,10 +3658,6 @@ msgstr ""
|
||||
msgid "trigger level must be 0 or 1"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/linalg/linalg.c
|
||||
msgid "tuple index out of range"
|
||||
msgstr ""
|
||||
|
||||
#: py/obj.c
|
||||
msgid "tuple/list has wrong length"
|
||||
msgstr ""
|
||||
|
@ -5,21 +5,23 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
|
||||
"PO-Revision-Date: 2020-11-26 03:11+0000\n"
|
||||
"Last-Translator: Daniel Bravo Darriba <bravodarriba@gmail.com>\n"
|
||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||
"PO-Revision-Date: 2021-01-07 18:01+0000\n"
|
||||
"Last-Translator: Dennis Schweer <dennis.schweer@ruhr-uni-bochum.de>\n"
|
||||
"Language: de_DE\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 4.4-dev\n"
|
||||
"X-Generator: Weblate 4.4.1-dev\n"
|
||||
|
||||
#: main.c
|
||||
msgid ""
|
||||
"\n"
|
||||
"Code done running.\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Programm wird ausgeführt.\n"
|
||||
|
||||
#: main.c
|
||||
msgid ""
|
||||
@ -129,7 +131,7 @@ msgstr "'%q' Objekt unterstützt '%q' nicht"
|
||||
|
||||
#: py/obj.c
|
||||
msgid "'%q' object does not support item assignment"
|
||||
msgstr ""
|
||||
msgstr "'%q' Objekt unterschützt keine Elementzuweisung"
|
||||
|
||||
#: py/obj.c
|
||||
msgid "'%q' object does not support item deletion"
|
||||
@ -141,7 +143,7 @@ msgstr "'%q' Objekt hat kein Attribut '%q'"
|
||||
|
||||
#: py/runtime.c
|
||||
msgid "'%q' object is not an iterator"
|
||||
msgstr ""
|
||||
msgstr "'%q' Objekt ist kein Iterator"
|
||||
|
||||
#: py/objtype.c py/runtime.c
|
||||
msgid "'%q' object is not callable"
|
||||
@ -235,7 +237,7 @@ msgstr "'continue' außerhalb einer Schleife"
|
||||
|
||||
#: py/objgenerator.c
|
||||
msgid "'coroutine' object is not an iterator"
|
||||
msgstr ""
|
||||
msgstr "'coroutine' Objekt ist kein Iterator"
|
||||
|
||||
#: py/compile.c
|
||||
msgid "'data' requires at least 2 arguments"
|
||||
@ -307,7 +309,7 @@ msgstr "Alle I2C-Peripheriegeräte sind in Benutzung"
|
||||
#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
|
||||
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
|
||||
msgid "All PCNT units in use"
|
||||
msgstr ""
|
||||
msgstr "Alle PCNT Einheiten sind in Benutzung"
|
||||
|
||||
#: ports/atmel-samd/common-hal/canio/Listener.c
|
||||
#: ports/esp32s2/common-hal/canio/Listener.c
|
||||
@ -710,7 +712,7 @@ msgstr "Konnte Kamera nicht initialisieren"
|
||||
|
||||
#: ports/cxd56/common-hal/gnss/GNSS.c
|
||||
msgid "Could not initialize GNSS"
|
||||
msgstr ""
|
||||
msgstr "GNSS konnte nicht initialisiert werden"
|
||||
|
||||
#: ports/cxd56/common-hal/sdioio/SDCard.c
|
||||
msgid "Could not initialize SDCard"
|
||||
@ -837,7 +839,7 @@ msgstr "Die EZB arbeitet jeweils nur mit 16 Bytes"
|
||||
|
||||
#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
|
||||
msgid "ESP-IDF memory allocation failed"
|
||||
msgstr ""
|
||||
msgstr "ESP-IDF Speicherallozierung fehlgeschlagen"
|
||||
|
||||
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
|
||||
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
|
||||
@ -903,7 +905,7 @@ msgstr "FFT ist nur für ndarrays definiert"
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
msgid "FFT is implemented for linear arrays only"
|
||||
msgstr ""
|
||||
msgstr "FFT ist nur für lineare Arrays implementiert"
|
||||
|
||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||
msgid "Failed SSL handshake"
|
||||
@ -934,7 +936,7 @@ msgstr "Konnte keine RX Buffer mit %d allozieren"
|
||||
|
||||
#: ports/esp32s2/common-hal/wifi/__init__.c
|
||||
msgid "Failed to allocate Wifi memory"
|
||||
msgstr ""
|
||||
msgstr "Zuweisung des Wifi Speichers ist fehlgeschlagen"
|
||||
|
||||
#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c
|
||||
msgid "Failed to allocate wifi scan memory"
|
||||
@ -950,7 +952,7 @@ msgstr "Verbindung nicht erfolgreich: timeout"
|
||||
|
||||
#: ports/esp32s2/common-hal/wifi/__init__.c
|
||||
msgid "Failed to init wifi"
|
||||
msgstr ""
|
||||
msgstr "Wifi Initialisierung ist fehlgeschlagen"
|
||||
|
||||
#: shared-module/audiomp3/MP3Decoder.c
|
||||
msgid "Failed to parse MP3 file"
|
||||
@ -1037,7 +1039,7 @@ msgstr "I2SOut nicht verfügbar"
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/pin/__init__.c
|
||||
msgid "IOs 0, 2 & 4 do not support internal pullup in sleep"
|
||||
msgstr ""
|
||||
msgstr "IOs 0, 2 & 4 unterstützen keinen internen Pull up im sleep-Modus"
|
||||
|
||||
#: shared-bindings/aesio/aes.c
|
||||
#, c-format
|
||||
@ -1058,7 +1060,7 @@ msgstr "Inkorrekte Puffergröße"
|
||||
|
||||
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
|
||||
msgid "Initialization failed due to lack of memory"
|
||||
msgstr ""
|
||||
msgstr "Initialisierung aufgrund von Speichermangel fehlgeschlagen"
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
|
||||
msgid "Input taking too long"
|
||||
@ -1187,6 +1189,7 @@ msgstr "Ungültige Phase"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
|
||||
#: shared-module/rgbmatrix/RGBMatrix.c
|
||||
msgid "Invalid pin"
|
||||
@ -1513,6 +1516,10 @@ msgstr ""
|
||||
msgid "Only one alarm.time alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
msgid "Only one alarm.touch alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/displayio/ColorConverter.c
|
||||
msgid "Only one color can be transparent at a time"
|
||||
msgstr ""
|
||||
@ -2560,6 +2567,10 @@ msgstr ""
|
||||
msgid "data must be of equal length"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "data type not understood"
|
||||
msgstr ""
|
||||
|
||||
#: py/parsenum.c
|
||||
msgid "decimal numbers not supported"
|
||||
msgstr "Dezimalzahlen nicht unterstützt"
|
||||
@ -2873,8 +2884,8 @@ msgid "input and output shapes are not compatible"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "input argument must be an integer or a 2-tuple"
|
||||
msgstr "Das Eingabeargument muss eine Ganzzahl oder ein 2-Tupel sein"
|
||||
msgid "input argument must be an integer, a tuple, or a list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
msgid "input array length must be power of 2"
|
||||
@ -3122,6 +3133,10 @@ msgstr ""
|
||||
msgid "maxiter should be > 0"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "median argument must be an ndarray"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes"
|
||||
@ -3353,10 +3368,6 @@ msgstr "Operanden konnten nicht zusammen gesendet werden"
|
||||
msgid "operation is implemented for 1D Boolean arrays only"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented for flattened array"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented on ndarrays"
|
||||
msgstr "Die Operation ist für ndarrays nicht implementiert"
|
||||
@ -3705,6 +3716,10 @@ msgstr ""
|
||||
msgid "too many arguments provided with the given format"
|
||||
msgstr "zu viele Argumente mit dem angegebenen Format"
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "too many dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "too many indices"
|
||||
msgstr "zu viele Indizes"
|
||||
@ -3714,6 +3729,10 @@ msgstr "zu viele Indizes"
|
||||
msgid "too many values to unpack (expected %d)"
|
||||
msgstr "zu viele Werte zum Auspacken (erwartet %d)"
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays of equal length"
|
||||
msgstr ""
|
||||
@ -3722,10 +3741,6 @@ msgstr ""
|
||||
msgid "trigger level must be 0 or 1"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/linalg/linalg.c
|
||||
msgid "tuple index out of range"
|
||||
msgstr "Tupelindex außerhalb des Bereichs"
|
||||
|
||||
#: py/obj.c
|
||||
msgid "tuple/list has wrong length"
|
||||
msgstr "tupel/list hat falsche Länge"
|
||||
@ -3845,7 +3860,7 @@ msgstr "nicht unterstütztes Formatzeichen '%c' (0x%x) bei Index %d"
|
||||
|
||||
#: py/runtime.c
|
||||
msgid "unsupported type for %q: '%q'"
|
||||
msgstr ""
|
||||
msgstr "nicht unterstützer Typ für %q: '%q'"
|
||||
|
||||
#: py/runtime.c
|
||||
msgid "unsupported type for operator"
|
||||
@ -3853,7 +3868,7 @@ msgstr "nicht unterstützter Typ für Operator"
|
||||
|
||||
#: py/runtime.c
|
||||
msgid "unsupported types for %q: '%q', '%q'"
|
||||
msgstr ""
|
||||
msgstr "nicht unterstützte Typen für %q: '%q', '%q'"
|
||||
|
||||
#: py/objint.c
|
||||
#, c-format
|
||||
@ -3898,7 +3913,7 @@ msgstr ""
|
||||
|
||||
#: extmod/ulab/code/vector/vectorise.c
|
||||
msgid "wrong input type"
|
||||
msgstr ""
|
||||
msgstr "falscher Eingabetyp"
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c py/objstr.c
|
||||
msgid "wrong number of arguments"
|
||||
@ -3914,7 +3929,7 @@ msgstr "falscher Operandentyp"
|
||||
|
||||
#: extmod/ulab/code/vector/vectorise.c
|
||||
msgid "wrong output type"
|
||||
msgstr ""
|
||||
msgstr "Falscher Ausgabetyp"
|
||||
|
||||
#: shared-module/displayio/Shape.c
|
||||
msgid "x value out of bounds"
|
||||
@ -3944,6 +3959,12 @@ msgstr ""
|
||||
msgid "zi must be of shape (n_section, 2)"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "input argument must be an integer or a 2-tuple"
|
||||
#~ msgstr "Das Eingabeargument muss eine Ganzzahl oder ein 2-Tupel sein"
|
||||
|
||||
#~ msgid "tuple index out of range"
|
||||
#~ msgstr "Tupelindex außerhalb des Bereichs"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "\n"
|
||||
#~ "Code done running. Waiting for reload.\n"
|
||||
|
33
locale/el.po
33
locale/el.po
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
|
||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: Automatically generated\n"
|
||||
"Language-Team: none\n"
|
||||
@ -1169,6 +1169,7 @@ msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
|
||||
#: shared-module/rgbmatrix/RGBMatrix.c
|
||||
msgid "Invalid pin"
|
||||
@ -1487,6 +1488,10 @@ msgstr ""
|
||||
msgid "Only one alarm.time alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
msgid "Only one alarm.touch alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/displayio/ColorConverter.c
|
||||
msgid "Only one color can be transparent at a time"
|
||||
msgstr ""
|
||||
@ -2492,6 +2497,10 @@ msgstr ""
|
||||
msgid "data must be of equal length"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "data type not understood"
|
||||
msgstr ""
|
||||
|
||||
#: py/parsenum.c
|
||||
msgid "decimal numbers not supported"
|
||||
msgstr ""
|
||||
@ -2802,7 +2811,7 @@ msgid "input and output shapes are not compatible"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "input argument must be an integer or a 2-tuple"
|
||||
msgid "input argument must be an integer, a tuple, or a list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
@ -3045,6 +3054,10 @@ msgstr ""
|
||||
msgid "maxiter should be > 0"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "median argument must be an ndarray"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes"
|
||||
@ -3274,10 +3287,6 @@ msgstr ""
|
||||
msgid "operation is implemented for 1D Boolean arrays only"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented for flattened array"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented on ndarrays"
|
||||
msgstr ""
|
||||
@ -3621,6 +3630,10 @@ msgstr ""
|
||||
msgid "too many arguments provided with the given format"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "too many dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "too many indices"
|
||||
msgstr ""
|
||||
@ -3630,6 +3643,10 @@ msgstr ""
|
||||
msgid "too many values to unpack (expected %d)"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays of equal length"
|
||||
msgstr ""
|
||||
@ -3638,10 +3655,6 @@ msgstr ""
|
||||
msgid "trigger level must be 0 or 1"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/linalg/linalg.c
|
||||
msgid "tuple index out of range"
|
||||
msgstr ""
|
||||
|
||||
#: py/obj.c
|
||||
msgid "tuple/list has wrong length"
|
||||
msgstr ""
|
||||
|
54
locale/es.po
54
locale/es.po
@ -7,16 +7,16 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
|
||||
"PO-Revision-Date: 2020-11-27 18:34+0000\n"
|
||||
"Last-Translator: Iván Montiel Cardona <ivan_montiel2013@hotmail.com>\n"
|
||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||
"PO-Revision-Date: 2020-12-30 22:25+0000\n"
|
||||
"Last-Translator: Hugo Dahl <hugo@code-jedi.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 4.4-dev\n"
|
||||
"X-Generator: Weblate 4.4.1-dev\n"
|
||||
|
||||
#: main.c
|
||||
msgid ""
|
||||
@ -1190,6 +1190,7 @@ msgstr "Fase inválida"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
|
||||
#: shared-module/rgbmatrix/RGBMatrix.c
|
||||
msgid "Invalid pin"
|
||||
@ -1236,7 +1237,7 @@ msgstr "Modo de ejecución inválido."
|
||||
|
||||
#: shared-module/_bleio/Attribute.c
|
||||
msgid "Invalid security_mode"
|
||||
msgstr "Modo de seguridad no válido"
|
||||
msgstr "'security_mode' no válido"
|
||||
|
||||
#: shared-bindings/audiomixer/Mixer.c
|
||||
msgid "Invalid voice"
|
||||
@ -1276,7 +1277,7 @@ msgstr "Length debe ser un int"
|
||||
|
||||
#: py/objslice.c
|
||||
msgid "Length must be non-negative"
|
||||
msgstr "Longitud no deberia ser negativa"
|
||||
msgstr "Length no deberia ser negativa"
|
||||
|
||||
#: shared-module/bitbangio/SPI.c
|
||||
msgid "MISO pin init failed."
|
||||
@ -1514,6 +1515,10 @@ msgstr ""
|
||||
msgid "Only one alarm.time alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
msgid "Only one alarm.touch alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/displayio/ColorConverter.c
|
||||
msgid "Only one color can be transparent at a time"
|
||||
msgstr "Solo un color puede ser transparente a la vez"
|
||||
@ -2558,6 +2563,10 @@ msgstr "los datos deben permitir iteración"
|
||||
msgid "data must be of equal length"
|
||||
msgstr "los datos deben ser de igual tamaño"
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "data type not understood"
|
||||
msgstr ""
|
||||
|
||||
#: py/parsenum.c
|
||||
msgid "decimal numbers not supported"
|
||||
msgstr "números decimales no soportados"
|
||||
@ -2870,8 +2879,8 @@ msgid "input and output shapes are not compatible"
|
||||
msgstr "Formas de entrada y salida no son compactibles"
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "input argument must be an integer or a 2-tuple"
|
||||
msgstr "el argumento de entrada debe ser un entero o una tupla de par"
|
||||
msgid "input argument must be an integer, a tuple, or a list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
msgid "input array length must be power of 2"
|
||||
@ -3116,6 +3125,10 @@ msgstr "maxiter tiene que ser > 0"
|
||||
msgid "maxiter should be > 0"
|
||||
msgstr "maxiter debe ser > 0"
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "median argument must be an ndarray"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes"
|
||||
@ -3348,10 +3361,6 @@ msgstr "los operandos no se pueden transmitir juntos"
|
||||
msgid "operation is implemented for 1D Boolean arrays only"
|
||||
msgstr "operación solo está implementada para arrays booleanos de 1D"
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented for flattened array"
|
||||
msgstr "operación no está implementada para arrays aplanados"
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented on ndarrays"
|
||||
msgstr "la operación no está implementada para ndarrays"
|
||||
@ -3698,6 +3707,10 @@ msgstr "tobytes solo pueden ser invocados por arrays densos"
|
||||
msgid "too many arguments provided with the given format"
|
||||
msgstr "demasiados argumentos provistos con el formato dado"
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "too many dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "too many indices"
|
||||
msgstr "demasiados índices"
|
||||
@ -3707,6 +3720,10 @@ msgstr "demasiados índices"
|
||||
msgid "too many values to unpack (expected %d)"
|
||||
msgstr "demasiados valores para descomprimir (%d esperado)"
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays of equal length"
|
||||
msgstr "trapz está definido para arreglos 1D de igual tamaño"
|
||||
@ -3715,10 +3732,6 @@ msgstr "trapz está definido para arreglos 1D de igual tamaño"
|
||||
msgid "trigger level must be 0 or 1"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/linalg/linalg.c
|
||||
msgid "tuple index out of range"
|
||||
msgstr "tuple index fuera de rango"
|
||||
|
||||
#: py/obj.c
|
||||
msgid "tuple/list has wrong length"
|
||||
msgstr "tupla/lista tiene una longitud incorrecta"
|
||||
@ -3933,6 +3946,15 @@ msgstr "zi debe ser de tipo flotante"
|
||||
msgid "zi must be of shape (n_section, 2)"
|
||||
msgstr "zi debe ser una forma (n_section,2)"
|
||||
|
||||
#~ msgid "input argument must be an integer or a 2-tuple"
|
||||
#~ msgstr "el argumento de entrada debe ser un entero o una tupla de par"
|
||||
|
||||
#~ msgid "operation is not implemented for flattened array"
|
||||
#~ msgstr "operación no está implementada para arrays aplanados"
|
||||
|
||||
#~ msgid "tuple index out of range"
|
||||
#~ msgstr "tuple index fuera de rango"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "\n"
|
||||
#~ "Code done running. Waiting for reload.\n"
|
||||
|
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
|
||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
|
||||
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
|
||||
"Language-Team: fil\n"
|
||||
@ -1184,6 +1184,7 @@ msgstr "Mali ang phase"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
|
||||
#: shared-module/rgbmatrix/RGBMatrix.c
|
||||
msgid "Invalid pin"
|
||||
@ -1505,6 +1506,10 @@ msgstr ""
|
||||
msgid "Only one alarm.time alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
msgid "Only one alarm.touch alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/displayio/ColorConverter.c
|
||||
msgid "Only one color can be transparent at a time"
|
||||
msgstr ""
|
||||
@ -2529,6 +2534,10 @@ msgstr ""
|
||||
msgid "data must be of equal length"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "data type not understood"
|
||||
msgstr ""
|
||||
|
||||
#: py/parsenum.c
|
||||
msgid "decimal numbers not supported"
|
||||
msgstr "decimal numbers hindi sinusuportahan"
|
||||
@ -2845,7 +2854,7 @@ msgid "input and output shapes are not compatible"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "input argument must be an integer or a 2-tuple"
|
||||
msgid "input argument must be an integer, a tuple, or a list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
@ -3092,6 +3101,10 @@ msgstr ""
|
||||
msgid "maxiter should be > 0"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "median argument must be an ndarray"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes"
|
||||
@ -3322,10 +3335,6 @@ msgstr ""
|
||||
msgid "operation is implemented for 1D Boolean arrays only"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented for flattened array"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented on ndarrays"
|
||||
msgstr ""
|
||||
@ -3674,6 +3683,10 @@ msgstr ""
|
||||
msgid "too many arguments provided with the given format"
|
||||
msgstr "masyadong maraming mga argumento na ibinigay sa ibinigay na format"
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "too many dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "too many indices"
|
||||
msgstr ""
|
||||
@ -3683,6 +3696,10 @@ msgstr ""
|
||||
msgid "too many values to unpack (expected %d)"
|
||||
msgstr "masyadong maraming values para i-unpact (umaasa ng %d)"
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays of equal length"
|
||||
msgstr ""
|
||||
@ -3691,10 +3708,6 @@ msgstr ""
|
||||
msgid "trigger level must be 0 or 1"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/linalg/linalg.c
|
||||
msgid "tuple index out of range"
|
||||
msgstr "indeks ng tuple wala sa sakop"
|
||||
|
||||
#: py/obj.c
|
||||
msgid "tuple/list has wrong length"
|
||||
msgstr "mali ang haba ng tuple/list"
|
||||
@ -3911,6 +3924,9 @@ msgstr ""
|
||||
msgid "zi must be of shape (n_section, 2)"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "tuple index out of range"
|
||||
#~ msgstr "indeks ng tuple wala sa sakop"
|
||||
|
||||
#~ msgid "Press any key to enter the REPL. Use CTRL-D to reload."
|
||||
#~ msgstr ""
|
||||
#~ "Pindutin ang anumang key upang pumasok sa REPL. Gamitin ang CTRL-D upang "
|
||||
|
390
locale/fr.po
390
locale/fr.po
File diff suppressed because it is too large
Load Diff
33
locale/hi.po
33
locale/hi.po
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
|
||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: Automatically generated\n"
|
||||
"Language-Team: none\n"
|
||||
@ -1169,6 +1169,7 @@ msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
|
||||
#: shared-module/rgbmatrix/RGBMatrix.c
|
||||
msgid "Invalid pin"
|
||||
@ -1487,6 +1488,10 @@ msgstr ""
|
||||
msgid "Only one alarm.time alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
msgid "Only one alarm.touch alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/displayio/ColorConverter.c
|
||||
msgid "Only one color can be transparent at a time"
|
||||
msgstr ""
|
||||
@ -2492,6 +2497,10 @@ msgstr ""
|
||||
msgid "data must be of equal length"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "data type not understood"
|
||||
msgstr ""
|
||||
|
||||
#: py/parsenum.c
|
||||
msgid "decimal numbers not supported"
|
||||
msgstr ""
|
||||
@ -2802,7 +2811,7 @@ msgid "input and output shapes are not compatible"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "input argument must be an integer or a 2-tuple"
|
||||
msgid "input argument must be an integer, a tuple, or a list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
@ -3045,6 +3054,10 @@ msgstr ""
|
||||
msgid "maxiter should be > 0"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "median argument must be an ndarray"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes"
|
||||
@ -3274,10 +3287,6 @@ msgstr ""
|
||||
msgid "operation is implemented for 1D Boolean arrays only"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented for flattened array"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented on ndarrays"
|
||||
msgstr ""
|
||||
@ -3621,6 +3630,10 @@ msgstr ""
|
||||
msgid "too many arguments provided with the given format"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "too many dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "too many indices"
|
||||
msgstr ""
|
||||
@ -3630,6 +3643,10 @@ msgstr ""
|
||||
msgid "too many values to unpack (expected %d)"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays of equal length"
|
||||
msgstr ""
|
||||
@ -3638,10 +3655,6 @@ msgstr ""
|
||||
msgid "trigger level must be 0 or 1"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/linalg/linalg.c
|
||||
msgid "tuple index out of range"
|
||||
msgstr ""
|
||||
|
||||
#: py/obj.c
|
||||
msgid "tuple/list has wrong length"
|
||||
msgstr ""
|
||||
|
@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
|
||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
|
||||
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
|
||||
"Language-Team: \n"
|
||||
@ -1186,6 +1186,7 @@ msgstr "Fase non valida"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
|
||||
#: shared-module/rgbmatrix/RGBMatrix.c
|
||||
msgid "Invalid pin"
|
||||
@ -1510,6 +1511,10 @@ msgstr ""
|
||||
msgid "Only one alarm.time alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
msgid "Only one alarm.touch alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/displayio/ColorConverter.c
|
||||
msgid "Only one color can be transparent at a time"
|
||||
msgstr ""
|
||||
@ -2532,6 +2537,10 @@ msgstr ""
|
||||
msgid "data must be of equal length"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "data type not understood"
|
||||
msgstr ""
|
||||
|
||||
#: py/parsenum.c
|
||||
msgid "decimal numbers not supported"
|
||||
msgstr "numeri decimali non supportati"
|
||||
@ -2847,7 +2856,7 @@ msgid "input and output shapes are not compatible"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "input argument must be an integer or a 2-tuple"
|
||||
msgid "input argument must be an integer, a tuple, or a list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
@ -3095,6 +3104,10 @@ msgstr ""
|
||||
msgid "maxiter should be > 0"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "median argument must be an ndarray"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes"
|
||||
@ -3328,10 +3341,6 @@ msgstr ""
|
||||
msgid "operation is implemented for 1D Boolean arrays only"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented for flattened array"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented on ndarrays"
|
||||
msgstr ""
|
||||
@ -3682,6 +3691,10 @@ msgstr ""
|
||||
msgid "too many arguments provided with the given format"
|
||||
msgstr "troppi argomenti forniti con il formato specificato"
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "too many dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "too many indices"
|
||||
msgstr ""
|
||||
@ -3691,6 +3704,10 @@ msgstr ""
|
||||
msgid "too many values to unpack (expected %d)"
|
||||
msgstr "troppi valori da scompattare (%d attesi)"
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays of equal length"
|
||||
msgstr ""
|
||||
@ -3699,10 +3716,6 @@ msgstr ""
|
||||
msgid "trigger level must be 0 or 1"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/linalg/linalg.c
|
||||
msgid "tuple index out of range"
|
||||
msgstr "indice della tupla fuori intervallo"
|
||||
|
||||
#: py/obj.c
|
||||
msgid "tuple/list has wrong length"
|
||||
msgstr "tupla/lista ha la lunghezza sbagliata"
|
||||
@ -3919,6 +3932,9 @@ msgstr ""
|
||||
msgid "zi must be of shape (n_section, 2)"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "tuple index out of range"
|
||||
#~ msgstr "indice della tupla fuori intervallo"
|
||||
|
||||
#~ msgid "Press any key to enter the REPL. Use CTRL-D to reload."
|
||||
#~ msgstr ""
|
||||
#~ "Premi un qualunque tasto per entrare nel REPL. Usa CTRL-D per ricaricare."
|
||||
|
33
locale/ja.po
33
locale/ja.po
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
|
||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||
"PO-Revision-Date: 2020-11-27 18:34+0000\n"
|
||||
"Last-Translator: sporeball <sporeballdev@gmail.com>\n"
|
||||
"Language-Team: none\n"
|
||||
@ -1182,6 +1182,7 @@ msgstr "不正なphase"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
|
||||
#: shared-module/rgbmatrix/RGBMatrix.c
|
||||
msgid "Invalid pin"
|
||||
@ -1502,6 +1503,10 @@ msgstr ""
|
||||
msgid "Only one alarm.time alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
msgid "Only one alarm.touch alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/displayio/ColorConverter.c
|
||||
msgid "Only one color can be transparent at a time"
|
||||
msgstr ""
|
||||
@ -2517,6 +2522,10 @@ msgstr "dataはイテレート可能でなければなりません"
|
||||
msgid "data must be of equal length"
|
||||
msgstr "dataは同じ長さでなければなりません"
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "data type not understood"
|
||||
msgstr ""
|
||||
|
||||
#: py/parsenum.c
|
||||
msgid "decimal numbers not supported"
|
||||
msgstr ""
|
||||
@ -2830,7 +2839,7 @@ msgid "input and output shapes are not compatible"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "input argument must be an integer or a 2-tuple"
|
||||
msgid "input argument must be an integer, a tuple, or a list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
@ -3073,6 +3082,10 @@ msgstr ""
|
||||
msgid "maxiter should be > 0"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "median argument must be an ndarray"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes"
|
||||
@ -3302,10 +3315,6 @@ msgstr ""
|
||||
msgid "operation is implemented for 1D Boolean arrays only"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented for flattened array"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented on ndarrays"
|
||||
msgstr "この演算はndarray上で実装されていません"
|
||||
@ -3652,6 +3661,10 @@ msgstr ""
|
||||
msgid "too many arguments provided with the given format"
|
||||
msgstr "指定された書式に対して引数が多すぎます"
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "too many dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "too many indices"
|
||||
msgstr "インデクスが多すぎます"
|
||||
@ -3661,6 +3674,10 @@ msgstr "インデクスが多すぎます"
|
||||
msgid "too many values to unpack (expected %d)"
|
||||
msgstr "アンパックする値が多すぎます (%d個を期待)"
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays of equal length"
|
||||
msgstr "trapzは同じ長さの1次元arrayに対して定義されています"
|
||||
@ -3669,10 +3686,6 @@ msgstr "trapzは同じ長さの1次元arrayに対して定義されています"
|
||||
msgid "trigger level must be 0 or 1"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/linalg/linalg.c
|
||||
msgid "tuple index out of range"
|
||||
msgstr ""
|
||||
|
||||
#: py/obj.c
|
||||
msgid "tuple/list has wrong length"
|
||||
msgstr "タプル/リストの長さが正しくありません"
|
||||
|
33
locale/ko.po
33
locale/ko.po
@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
|
||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||
"PO-Revision-Date: 2020-10-05 12:12+0000\n"
|
||||
"Last-Translator: Michal Čihař <michal@cihar.com>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -1172,6 +1172,7 @@ msgstr "단계가 잘못되었습니다"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
|
||||
#: shared-module/rgbmatrix/RGBMatrix.c
|
||||
msgid "Invalid pin"
|
||||
@ -1490,6 +1491,10 @@ msgstr ""
|
||||
msgid "Only one alarm.time alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
msgid "Only one alarm.touch alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/displayio/ColorConverter.c
|
||||
msgid "Only one color can be transparent at a time"
|
||||
msgstr ""
|
||||
@ -2496,6 +2501,10 @@ msgstr ""
|
||||
msgid "data must be of equal length"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "data type not understood"
|
||||
msgstr ""
|
||||
|
||||
#: py/parsenum.c
|
||||
msgid "decimal numbers not supported"
|
||||
msgstr ""
|
||||
@ -2806,7 +2815,7 @@ msgid "input and output shapes are not compatible"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "input argument must be an integer or a 2-tuple"
|
||||
msgid "input argument must be an integer, a tuple, or a list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
@ -3049,6 +3058,10 @@ msgstr ""
|
||||
msgid "maxiter should be > 0"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "median argument must be an ndarray"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes"
|
||||
@ -3278,10 +3291,6 @@ msgstr ""
|
||||
msgid "operation is implemented for 1D Boolean arrays only"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented for flattened array"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented on ndarrays"
|
||||
msgstr ""
|
||||
@ -3625,6 +3634,10 @@ msgstr ""
|
||||
msgid "too many arguments provided with the given format"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "too many dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "too many indices"
|
||||
msgstr ""
|
||||
@ -3634,6 +3647,10 @@ msgstr ""
|
||||
msgid "too many values to unpack (expected %d)"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays of equal length"
|
||||
msgstr ""
|
||||
@ -3642,10 +3659,6 @@ msgstr ""
|
||||
msgid "trigger level must be 0 or 1"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/linalg/linalg.c
|
||||
msgid "tuple index out of range"
|
||||
msgstr ""
|
||||
|
||||
#: py/obj.c
|
||||
msgid "tuple/list has wrong length"
|
||||
msgstr ""
|
||||
|
44
locale/nl.po
44
locale/nl.po
@ -5,7 +5,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
|
||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||
"PO-Revision-Date: 2020-12-23 20:14+0000\n"
|
||||
"Last-Translator: _fonzlate <vooralfred@gmail.com>\n"
|
||||
"Language-Team: none\n"
|
||||
@ -1183,6 +1183,7 @@ msgstr "Ongeldige fase"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
|
||||
#: shared-module/rgbmatrix/RGBMatrix.c
|
||||
msgid "Invalid pin"
|
||||
@ -1507,6 +1508,10 @@ msgstr ""
|
||||
msgid "Only one alarm.time alarm can be set."
|
||||
msgstr "Slechts één alarm.time alarm kan worden ingesteld."
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
msgid "Only one alarm.touch alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/displayio/ColorConverter.c
|
||||
msgid "Only one color can be transparent at a time"
|
||||
msgstr "Er kan maar één kleur per keer transparant zijn"
|
||||
@ -2547,6 +2552,10 @@ msgstr "data moet itereerbaar zijn"
|
||||
msgid "data must be of equal length"
|
||||
msgstr "data moet van gelijke lengte zijn"
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "data type not understood"
|
||||
msgstr ""
|
||||
|
||||
#: py/parsenum.c
|
||||
msgid "decimal numbers not supported"
|
||||
msgstr "decimale getallen zijn niet ondersteund"
|
||||
@ -2860,8 +2869,8 @@ msgid "input and output shapes are not compatible"
|
||||
msgstr "in- en uitvoervormen zijn niet compatibel"
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "input argument must be an integer or a 2-tuple"
|
||||
msgstr "invoerargument moet een integer of 2-tuple zijn"
|
||||
msgid "input argument must be an integer, a tuple, or a list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
msgid "input array length must be power of 2"
|
||||
@ -3106,6 +3115,10 @@ msgstr "maxiter moet groter dan 0 zijn"
|
||||
msgid "maxiter should be > 0"
|
||||
msgstr "maxiter moet groter dan 0 zijn"
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "median argument must be an ndarray"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes"
|
||||
@ -3335,10 +3348,6 @@ msgstr "operands konden niet samen verzonden worden"
|
||||
msgid "operation is implemented for 1D Boolean arrays only"
|
||||
msgstr "operatie is alleen geïmplementeerd voor 1D Booleaanse arrays"
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented for flattened array"
|
||||
msgstr "operatie is niet geïmplementeerd voor vlakke array"
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented on ndarrays"
|
||||
msgstr "bewerking is voor ndarrays niet geïmplementeerd"
|
||||
@ -3685,6 +3694,10 @@ msgstr "tobytes kunnen alleen ingeroepen worden voor gesloten arrays"
|
||||
msgid "too many arguments provided with the given format"
|
||||
msgstr "te veel argumenten opgegeven bij dit formaat"
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "too many dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "too many indices"
|
||||
msgstr "te veel indices"
|
||||
@ -3694,6 +3707,10 @@ msgstr "te veel indices"
|
||||
msgid "too many values to unpack (expected %d)"
|
||||
msgstr "te veel waarden om uit te pakken (%d verwacht)"
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays of equal length"
|
||||
msgstr "trapz is gedefinieerd voor eendimensionale arrays van gelijke lengte"
|
||||
@ -3702,10 +3719,6 @@ msgstr "trapz is gedefinieerd voor eendimensionale arrays van gelijke lengte"
|
||||
msgid "trigger level must be 0 or 1"
|
||||
msgstr "triggerniveau moet 0 of 1 zijn"
|
||||
|
||||
#: extmod/ulab/code/linalg/linalg.c
|
||||
msgid "tuple index out of range"
|
||||
msgstr "tuple index buiten bereik"
|
||||
|
||||
#: py/obj.c
|
||||
msgid "tuple/list has wrong length"
|
||||
msgstr "tuple of lijst heeft onjuiste lengte"
|
||||
@ -3920,6 +3933,15 @@ msgstr "zi moet van type float zijn"
|
||||
msgid "zi must be of shape (n_section, 2)"
|
||||
msgstr "zi moet vorm (n_section, 2) hebben"
|
||||
|
||||
#~ msgid "input argument must be an integer or a 2-tuple"
|
||||
#~ msgstr "invoerargument moet een integer of 2-tuple zijn"
|
||||
|
||||
#~ msgid "operation is not implemented for flattened array"
|
||||
#~ msgstr "operatie is niet geïmplementeerd voor vlakke array"
|
||||
|
||||
#~ msgid "tuple index out of range"
|
||||
#~ msgstr "tuple index buiten bereik"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "\n"
|
||||
#~ "Code done running. Waiting for reload.\n"
|
||||
|
36
locale/pl.po
36
locale/pl.po
@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
|
||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||
"PO-Revision-Date: 2020-12-02 20:29+0000\n"
|
||||
"Last-Translator: Maciej Stankiewicz <tawezik@gmail.com>\n"
|
||||
"Language-Team: pl\n"
|
||||
@ -1182,6 +1182,7 @@ msgstr "Zła faza"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
|
||||
#: shared-module/rgbmatrix/RGBMatrix.c
|
||||
msgid "Invalid pin"
|
||||
@ -1501,6 +1502,10 @@ msgstr ""
|
||||
msgid "Only one alarm.time alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
msgid "Only one alarm.touch alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/displayio/ColorConverter.c
|
||||
msgid "Only one color can be transparent at a time"
|
||||
msgstr "W danym momencie przezroczysty może być tylko jeden kolor"
|
||||
@ -2512,6 +2517,10 @@ msgstr ""
|
||||
msgid "data must be of equal length"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "data type not understood"
|
||||
msgstr ""
|
||||
|
||||
#: py/parsenum.c
|
||||
msgid "decimal numbers not supported"
|
||||
msgstr "liczby dziesiętne nieobsługiwane"
|
||||
@ -2823,7 +2832,7 @@ msgid "input and output shapes are not compatible"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "input argument must be an integer or a 2-tuple"
|
||||
msgid "input argument must be an integer, a tuple, or a list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
@ -3066,6 +3075,10 @@ msgstr ""
|
||||
msgid "maxiter should be > 0"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "median argument must be an ndarray"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes"
|
||||
@ -3295,10 +3308,6 @@ msgstr "operandy nie mogły być rozgłaszane razem"
|
||||
msgid "operation is implemented for 1D Boolean arrays only"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented for flattened array"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented on ndarrays"
|
||||
msgstr ""
|
||||
@ -3644,6 +3653,10 @@ msgstr ""
|
||||
msgid "too many arguments provided with the given format"
|
||||
msgstr "zbyt wiele argumentów podanych dla tego formatu"
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "too many dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "too many indices"
|
||||
msgstr "zbyt wiele indeksów"
|
||||
@ -3653,6 +3666,10 @@ msgstr "zbyt wiele indeksów"
|
||||
msgid "too many values to unpack (expected %d)"
|
||||
msgstr "zbyt wiele wartości do rozpakowania (oczekiwano %d)"
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays of equal length"
|
||||
msgstr ""
|
||||
@ -3661,10 +3678,6 @@ msgstr ""
|
||||
msgid "trigger level must be 0 or 1"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/linalg/linalg.c
|
||||
msgid "tuple index out of range"
|
||||
msgstr "indeks krotki poza zakresem"
|
||||
|
||||
#: py/obj.c
|
||||
msgid "tuple/list has wrong length"
|
||||
msgstr "krotka/lista ma złą długość"
|
||||
@ -3879,6 +3892,9 @@ msgstr ""
|
||||
msgid "zi must be of shape (n_section, 2)"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "tuple index out of range"
|
||||
#~ msgstr "indeks krotki poza zakresem"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "\n"
|
||||
#~ "Code done running. Waiting for reload.\n"
|
||||
|
@ -5,8 +5,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
|
||||
"PO-Revision-Date: 2020-12-29 16:08+0000\n"
|
||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||
"PO-Revision-Date: 2021-01-05 21:03+0000\n"
|
||||
"Last-Translator: Wellington Terumi Uemura <wellingtonuemura@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: pt_BR\n"
|
||||
@ -1199,6 +1199,7 @@ msgstr "Fase Inválida"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
|
||||
#: shared-module/rgbmatrix/RGBMatrix.c
|
||||
msgid "Invalid pin"
|
||||
@ -1522,6 +1523,10 @@ msgstr ""
|
||||
msgid "Only one alarm.time alarm can be set."
|
||||
msgstr "Apenas um alarme alarm.time pode ser definido."
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
msgid "Only one alarm.touch alarm can be set."
|
||||
msgstr "Apenas um alarme alarm.touch pode ser definido."
|
||||
|
||||
#: shared-module/displayio/ColorConverter.c
|
||||
msgid "Only one color can be transparent at a time"
|
||||
msgstr "Apenas uma cor pode ser transparente de cada vez"
|
||||
@ -2575,6 +2580,10 @@ msgstr "os dados devem ser iteráveis"
|
||||
msgid "data must be of equal length"
|
||||
msgstr "os dados devem ser de igual comprimento"
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "data type not understood"
|
||||
msgstr "o tipo do dado não foi compreendido"
|
||||
|
||||
#: py/parsenum.c
|
||||
msgid "decimal numbers not supported"
|
||||
msgstr "os números decimais não são compatíveis"
|
||||
@ -2888,8 +2897,9 @@ msgid "input and output shapes are not compatible"
|
||||
msgstr "as formas de entrada e saída não são compatíveis"
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "input argument must be an integer or a 2-tuple"
|
||||
msgstr "o argumento da entrada deve ser um número inteiro ou uma tupla de 2"
|
||||
msgid "input argument must be an integer, a tuple, or a list"
|
||||
msgstr ""
|
||||
"argumento da entrada deve ser um número inteiro, uma tupla ou uma lista"
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
msgid "input array length must be power of 2"
|
||||
@ -3134,6 +3144,10 @@ msgstr "maxiter deve ser > 0"
|
||||
msgid "maxiter should be > 0"
|
||||
msgstr "maxiter pode ser > 0"
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "median argument must be an ndarray"
|
||||
msgstr "o argumento mediano deve ser um ndarray"
|
||||
|
||||
#: py/runtime.c
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes"
|
||||
@ -3366,10 +3380,6 @@ msgstr "os operandos não puderam ser transmitidos juntos"
|
||||
msgid "operation is implemented for 1D Boolean arrays only"
|
||||
msgstr "A operação é implementada apenas para matrizes booleanas 1D"
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented for flattened array"
|
||||
msgstr "a operação não é implementada para a matriz achatada"
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented on ndarrays"
|
||||
msgstr "a operação não foi implementada nos ndarrays"
|
||||
@ -3719,6 +3729,10 @@ msgstr "os tobytes podem ser invocados apenas nas matrizes densas"
|
||||
msgid "too many arguments provided with the given format"
|
||||
msgstr "Muitos argumentos fornecidos com o formato dado"
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "too many dimensions"
|
||||
msgstr "dimensões demais"
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "too many indices"
|
||||
msgstr "índices demais"
|
||||
@ -3728,6 +3742,10 @@ msgstr "índices demais"
|
||||
msgid "too many values to unpack (expected %d)"
|
||||
msgstr "valores demais para descompactar (esperado %d)"
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays"
|
||||
msgstr "Trapz está definido para arrays 1D"
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays of equal length"
|
||||
msgstr "o trapz está definido para 1D arrays de igual tamanho"
|
||||
@ -3736,10 +3754,6 @@ msgstr "o trapz está definido para 1D arrays de igual tamanho"
|
||||
msgid "trigger level must be 0 or 1"
|
||||
msgstr "nível do gatilho deve ser 0 ou 1"
|
||||
|
||||
#: extmod/ulab/code/linalg/linalg.c
|
||||
msgid "tuple index out of range"
|
||||
msgstr "o índice da tupla está fora do intervalo"
|
||||
|
||||
#: py/obj.c
|
||||
msgid "tuple/list has wrong length"
|
||||
msgstr "a tupla/lista está com tamanho incorreto"
|
||||
@ -3954,6 +3968,18 @@ msgstr "zi deve ser de um tipo float"
|
||||
msgid "zi must be of shape (n_section, 2)"
|
||||
msgstr "zi deve estar na forma (n_section, 2)"
|
||||
|
||||
#~ msgid "TouchAlarm not available in light sleep"
|
||||
#~ msgstr "O TouchAlarm não está disponívle no modo light sleep"
|
||||
|
||||
#~ msgid "input argument must be an integer or a 2-tuple"
|
||||
#~ msgstr "o argumento da entrada deve ser um número inteiro ou uma tupla de 2"
|
||||
|
||||
#~ msgid "operation is not implemented for flattened array"
|
||||
#~ msgstr "a operação não é implementada para a matriz achatada"
|
||||
|
||||
#~ msgid "tuple index out of range"
|
||||
#~ msgstr "o índice da tupla está fora do intervalo"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "\n"
|
||||
#~ "Code done running. Waiting for reload.\n"
|
||||
|
61
locale/sv.po
61
locale/sv.po
@ -5,8 +5,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
|
||||
"PO-Revision-Date: 2020-12-28 17:59+0000\n"
|
||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||
"PO-Revision-Date: 2021-01-05 21:03+0000\n"
|
||||
"Last-Translator: Jonny Bergdahl <jonny@bergdahl.it>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: sv\n"
|
||||
@ -21,12 +21,16 @@ msgid ""
|
||||
"\n"
|
||||
"Code done running.\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Koden har kört klart.\n"
|
||||
|
||||
#: main.c
|
||||
msgid ""
|
||||
"\n"
|
||||
"Code stopped by auto-reload.\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Koden stoppades av auto-omladdning.\n"
|
||||
|
||||
#: supervisor/shared/safe_mode.c
|
||||
msgid ""
|
||||
@ -546,15 +550,16 @@ msgstr "Anropa super().__init__() innan du använder det ursprungliga objektet."
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c
|
||||
msgid "Can only alarm on RTC IO from deep sleep."
|
||||
msgstr ""
|
||||
msgstr "Kan bara larma på RTC-IO från djupsömn."
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c
|
||||
msgid "Can only alarm on one low pin while others alarm high from deep sleep."
|
||||
msgstr ""
|
||||
"Kan bara larma från djup sömn på låg för en pinne medan andra larmar på hög."
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c
|
||||
msgid "Can only alarm on two low pins from deep sleep."
|
||||
msgstr ""
|
||||
msgstr "Kan bara larma från djup sömn på två låga pinnar."
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "Can't set CCCD on local Characteristic"
|
||||
@ -591,7 +596,7 @@ msgstr "Det går inte att mata ut båda kanalerna på samma pinne"
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c
|
||||
msgid "Cannot pull on input-only pin."
|
||||
msgstr ""
|
||||
msgstr "Kan bara använda pull på pinne för input."
|
||||
|
||||
#: shared-module/bitbangio/SPI.c
|
||||
msgid "Cannot read without MISO pin."
|
||||
@ -639,7 +644,7 @@ msgstr "Det går inte att ändra frekvensen på en timer som redan används"
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c
|
||||
msgid "Cannot wake on pin edge. Only level."
|
||||
msgstr ""
|
||||
msgstr "Kan inte vakna på nivåskift, enbart nivå."
|
||||
|
||||
#: shared-module/bitbangio/SPI.c
|
||||
msgid "Cannot write without MOSI pin."
|
||||
@ -1182,6 +1187,7 @@ msgstr "Ogiltig fas"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
|
||||
#: shared-module/rgbmatrix/RGBMatrix.c
|
||||
msgid "Invalid pin"
|
||||
@ -1506,6 +1512,10 @@ msgstr ""
|
||||
msgid "Only one alarm.time alarm can be set."
|
||||
msgstr "Endast ett alarm.time kan ställas in."
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
msgid "Only one alarm.touch alarm can be set."
|
||||
msgstr "Endast ett larm av typ alarm.touch kan ställas in."
|
||||
|
||||
#: shared-module/displayio/ColorConverter.c
|
||||
msgid "Only one color can be transparent at a time"
|
||||
msgstr "Bara en färg kan vara genomskinlig i taget"
|
||||
@ -1616,7 +1626,7 @@ msgstr ""
|
||||
|
||||
#: main.c
|
||||
msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n"
|
||||
msgstr ""
|
||||
msgstr "Fingerar djup sömn tills larm, Ctrl-C eller filskrivning.\n"
|
||||
|
||||
#: shared-bindings/digitalio/DigitalInOut.c
|
||||
msgid "Pull not used when direction is output."
|
||||
@ -2542,6 +2552,10 @@ msgstr "data måste vara itererbar"
|
||||
msgid "data must be of equal length"
|
||||
msgstr "data måste vara av samma längd"
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "data type not understood"
|
||||
msgstr "datatyp inte förstådd"
|
||||
|
||||
#: py/parsenum.c
|
||||
msgid "decimal numbers not supported"
|
||||
msgstr "decimaltal stöds inte"
|
||||
@ -2855,8 +2869,8 @@ msgid "input and output shapes are not compatible"
|
||||
msgstr "indata- och utdataformer är inte kompatibla"
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "input argument must be an integer or a 2-tuple"
|
||||
msgstr "indataargumentet måste vara ett heltal eller en 2-tupel"
|
||||
msgid "input argument must be an integer, a tuple, or a list"
|
||||
msgstr "indataargument måste vara integer, en tuple eller list"
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
msgid "input array length must be power of 2"
|
||||
@ -3101,6 +3115,10 @@ msgstr "maxiter måste vara > 0"
|
||||
msgid "maxiter should be > 0"
|
||||
msgstr "maxiter bör vara > 0"
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "median argument must be an ndarray"
|
||||
msgstr "argumentet median måste vara en ndarray"
|
||||
|
||||
#: py/runtime.c
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes"
|
||||
@ -3330,10 +3348,6 @@ msgstr "operander kan inte sändas tillsammans"
|
||||
msgid "operation is implemented for 1D Boolean arrays only"
|
||||
msgstr "operationen är enbart implementerad för 1D Boolean-matriser"
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented for flattened array"
|
||||
msgstr "operationen inte implementeras för tillplattad matris"
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented on ndarrays"
|
||||
msgstr "åtgärden är inte implementerad för ndarray:er"
|
||||
@ -3680,6 +3694,10 @@ msgstr "tobyte kan enbart anropas för täta matriser"
|
||||
msgid "too many arguments provided with the given format"
|
||||
msgstr "för många argument för det givna formatet"
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "too many dimensions"
|
||||
msgstr "för många dimensioner"
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "too many indices"
|
||||
msgstr "för många index"
|
||||
@ -3689,6 +3707,10 @@ msgstr "för många index"
|
||||
msgid "too many values to unpack (expected %d)"
|
||||
msgstr "för många värden att packa upp (förväntat %d)"
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays"
|
||||
msgstr "trapz är definierat för 1D-matriser"
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays of equal length"
|
||||
msgstr "trapz är definierad för 1D-matriser med samma längd"
|
||||
@ -3697,10 +3719,6 @@ msgstr "trapz är definierad för 1D-matriser med samma längd"
|
||||
msgid "trigger level must be 0 or 1"
|
||||
msgstr "triggernivå måste vara 0 eller 1"
|
||||
|
||||
#: extmod/ulab/code/linalg/linalg.c
|
||||
msgid "tuple index out of range"
|
||||
msgstr "tupelindex utanför intervallet"
|
||||
|
||||
#: py/obj.c
|
||||
msgid "tuple/list has wrong length"
|
||||
msgstr "tupel/lista har fel längd"
|
||||
@ -3915,6 +3933,15 @@ msgstr "zi måste vara av typ float"
|
||||
msgid "zi must be of shape (n_section, 2)"
|
||||
msgstr "zi måste vara i formen (n_section, 2)"
|
||||
|
||||
#~ msgid "input argument must be an integer or a 2-tuple"
|
||||
#~ msgstr "indataargumentet måste vara ett heltal eller en 2-tupel"
|
||||
|
||||
#~ msgid "operation is not implemented for flattened array"
|
||||
#~ msgstr "operationen inte implementeras för tillplattad matris"
|
||||
|
||||
#~ msgid "tuple index out of range"
|
||||
#~ msgstr "tupelindex utanför intervallet"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "\n"
|
||||
#~ "Code done running. Waiting for reload.\n"
|
||||
|
@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: circuitpython-cn\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
|
||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||
"PO-Revision-Date: 2020-11-19 01:28+0000\n"
|
||||
"Last-Translator: hexthat <hexthat@gmail.com>\n"
|
||||
"Language-Team: Chinese Hanyu Pinyin\n"
|
||||
@ -1180,6 +1180,7 @@ msgstr "Jiēduàn wúxiào"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
|
||||
#: shared-module/rgbmatrix/RGBMatrix.c
|
||||
msgid "Invalid pin"
|
||||
@ -1503,6 +1504,10 @@ msgstr ""
|
||||
msgid "Only one alarm.time alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
|
||||
msgid "Only one alarm.touch alarm can be set."
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/displayio/ColorConverter.c
|
||||
msgid "Only one color can be transparent at a time"
|
||||
msgstr "Yīcì zhǐ néng yǒuyī zhǒng yánsè shì tòumíng de"
|
||||
@ -2534,6 +2539,10 @@ msgstr "shùjù bìxū shì kě diédài de"
|
||||
msgid "data must be of equal length"
|
||||
msgstr "shùjù chángdù bìxū xiāngděng"
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "data type not understood"
|
||||
msgstr ""
|
||||
|
||||
#: py/parsenum.c
|
||||
msgid "decimal numbers not supported"
|
||||
msgstr "bù zhīchí xiǎoshù shù"
|
||||
@ -2846,8 +2855,8 @@ msgid "input and output shapes are not compatible"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "input argument must be an integer or a 2-tuple"
|
||||
msgstr "shūrù cānshù bìxū shì zhěngshù huò 2 yuán zǔ"
|
||||
msgid "input argument must be an integer, a tuple, or a list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/fft/fft.c
|
||||
msgid "input array length must be power of 2"
|
||||
@ -3090,6 +3099,10 @@ msgstr "maxiter bì xū > 0"
|
||||
msgid "maxiter should be > 0"
|
||||
msgstr "maxiter yìng wéi > 0"
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "median argument must be an ndarray"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes"
|
||||
@ -3319,10 +3332,6 @@ msgstr "cāozuò shǔ bùnéng yīqǐ guǎngbò"
|
||||
msgid "operation is implemented for 1D Boolean arrays only"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented for flattened array"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/numerical/numerical.c
|
||||
msgid "operation is not implemented on ndarrays"
|
||||
msgstr "cāozuò wèi zài ndarrays shàng shíxiàn"
|
||||
@ -3668,6 +3677,10 @@ msgstr ""
|
||||
msgid "too many arguments provided with the given format"
|
||||
msgstr "tígōng jǐ dìng géshì de cānshù tài duō"
|
||||
|
||||
#: extmod/ulab/code/ulab_create.c
|
||||
msgid "too many dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/ndarray.c
|
||||
msgid "too many indices"
|
||||
msgstr "suǒyǐn tài duō"
|
||||
@ -3677,6 +3690,10 @@ msgstr "suǒyǐn tài duō"
|
||||
msgid "too many values to unpack (expected %d)"
|
||||
msgstr "dǎkāi tài duō zhí (yùqí %d)"
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/approx/approx.c
|
||||
msgid "trapz is defined for 1D arrays of equal length"
|
||||
msgstr "Trapz shì wèi děng zhǎng de 1D shùzǔ dìngyì de"
|
||||
@ -3685,10 +3702,6 @@ msgstr "Trapz shì wèi děng zhǎng de 1D shùzǔ dìngyì de"
|
||||
msgid "trigger level must be 0 or 1"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/ulab/code/linalg/linalg.c
|
||||
msgid "tuple index out of range"
|
||||
msgstr "yuán zǔ suǒyǐn chāochū fànwéi"
|
||||
|
||||
#: py/obj.c
|
||||
msgid "tuple/list has wrong length"
|
||||
msgstr "yuán zǔ/lièbiǎo chángdù cuòwù"
|
||||
@ -3903,6 +3916,12 @@ msgstr "zi bìxū wèi fú diǎn xíng"
|
||||
msgid "zi must be of shape (n_section, 2)"
|
||||
msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)"
|
||||
|
||||
#~ msgid "input argument must be an integer or a 2-tuple"
|
||||
#~ msgstr "shūrù cānshù bìxū shì zhěngshù huò 2 yuán zǔ"
|
||||
|
||||
#~ msgid "tuple index out of range"
|
||||
#~ msgstr "yuán zǔ suǒyǐn chāochū fànwéi"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "\n"
|
||||
#~ "Code done running. Waiting for reload.\n"
|
||||
|
@ -14,6 +14,7 @@ LONGINT_IMPL = MPZ
|
||||
CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_COUNTIO = 0
|
||||
CIRCUITPY_I2CPERIPHERAL = 0
|
||||
CIRCUITPY_MSGPACK = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
CIRCUITPY_BUSDEVICE = 0
|
||||
|
||||
|
@ -15,12 +15,14 @@ LONGINT_IMPL = MPZ
|
||||
CIRCUITPY_DISPLAYIO = 0
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_I2CPERIPHERAL = 0
|
||||
CIRCUITPY_MSGPACK = 0
|
||||
MICROPY_PY_ASYNC_AWAIT = 0
|
||||
|
||||
SUPEROPT_GC = 0
|
||||
CFLAGS_INLINE_LIMIT = 55
|
||||
|
||||
# Include these Python libraries in firmware.
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH
|
||||
|
@ -16,6 +16,7 @@ CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_DISPLAYIO = 0
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_I2CPERIPHERAL = 0
|
||||
CIRCUITPY_MSGPACK = 0
|
||||
CIRCUITPY_PIXELBUF = 1
|
||||
CIRCUITPY_ROTARYIO = 0
|
||||
CIRCUITPY_RTC = 0
|
||||
@ -25,6 +26,7 @@ CFLAGS_INLINE_LIMIT = 50
|
||||
|
||||
|
||||
# Include these Python libraries in firmware.
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Crickit
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH
|
||||
|
@ -16,6 +16,7 @@ CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_COUNTIO = 0
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_I2CPERIPHERAL = 0
|
||||
CIRCUITPY_MSGPACK = 0
|
||||
CIRCUITPY_PIXELBUF = 0
|
||||
CIRCUITPY_ROTARYIO = 0
|
||||
CIRCUITPY_RTC = 0
|
||||
@ -26,6 +27,7 @@ SUPEROPT_GC = 0
|
||||
CFLAGS_INLINE_LIMIT = 55
|
||||
|
||||
# Include these Python libraries in firmware.
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
|
||||
|
@ -15,6 +15,7 @@ CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_COUNTIO = 0
|
||||
CIRCUITPY_I2CPERIPHERAL = 0
|
||||
CIRCUITPY_MSGPACK = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
CIRCUITPY_BUSDEVICE = 0
|
||||
|
||||
|
@ -18,6 +18,7 @@ CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_I2CPERIPHERAL = 0
|
||||
CIRCUITPY_GAMEPAD = 0
|
||||
CFLAGS_INLINE_LIMIT = 50
|
||||
CIRCUITPY_MSGPACK = 0
|
||||
|
||||
# Include these Python libraries in firmware.
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
|
||||
|
@ -15,6 +15,7 @@ CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_COUNTIO = 0
|
||||
CIRCUITPY_I2CPERIPHERAL = 0
|
||||
CIRCUITPY_MSGPACK = 0
|
||||
# supersized, not ultra-supersized
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
CIRCUITPY_BUSDEVICE = 0
|
||||
|
@ -14,6 +14,7 @@ LONGINT_IMPL = MPZ
|
||||
CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_COUNTIO = 0
|
||||
CIRCUITPY_I2CPERIPHERAL = 0
|
||||
CIRCUITPY_MSGPACK = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
CIRCUITPY_BUSDEVICE = 0
|
||||
|
||||
|
@ -15,3 +15,6 @@ LONGINT_IMPL = MPZ
|
||||
CIRCUITPY_AUDIOBUSIO = 0
|
||||
|
||||
CIRCUITPY_BITBANG_APA102 = 1
|
||||
|
||||
#Include these Python libraries in firmware.
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar
|
||||
|
@ -17,6 +17,7 @@ CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_COUNTIO = 0
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_I2CPERIPHERAL = 0
|
||||
CIRCUITPY_MSGPACK = 0
|
||||
|
||||
SUPEROPT_GC = 0
|
||||
|
||||
|
@ -14,6 +14,7 @@ LONGINT_IMPL = MPZ
|
||||
CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_GAMEPAD = 0
|
||||
CIRCUITPY_I2CPERIPHERAL = 0
|
||||
CIRCUITPY_MSGPACK = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
CIRCUITPY_BUSDEVICE = 0
|
||||
|
||||
|
@ -15,6 +15,7 @@ CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_COUNTIO = 0
|
||||
CIRCUITPY_GAMEPAD = 0
|
||||
CIRCUITPY_I2CPERIPHERAL = 0
|
||||
CIRCUITPY_MSGPACK = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
CIRCUITPY_BUSDEVICE = 0
|
||||
|
||||
|
@ -16,6 +16,7 @@ CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_COUNTIO = 0
|
||||
CIRCUITPY_I2CPERIPHERAL = 0
|
||||
CIRCUITPY_MSGPACK = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
CIRCUITPY_BUSDEVICE = 0
|
||||
|
||||
|
@ -44,6 +44,7 @@
|
||||
|
||||
# define _TCC_SIZE(unused, n) TCC ## n ## _SIZE,
|
||||
# define TCC_SIZES { REPEAT_MACRO(_TCC_SIZE, 0, TCC_INST_NUM) }
|
||||
static const uint8_t tcc_sizes[TCC_INST_NUM] = TCC_SIZES;
|
||||
|
||||
static uint32_t tcc_periods[TCC_INST_NUM];
|
||||
static uint32_t tc_periods[TC_INST_NUM];
|
||||
@ -233,8 +234,7 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t* self,
|
||||
resolution = 16;
|
||||
} else {
|
||||
// TCC resolution varies so look it up.
|
||||
const uint8_t _tcc_sizes[TCC_INST_NUM] = TCC_SIZES;
|
||||
resolution = _tcc_sizes[timer->index];
|
||||
resolution = tcc_sizes[timer->index];
|
||||
}
|
||||
// First determine the divisor that gets us the highest resolution.
|
||||
uint32_t system_clock = common_hal_mcu_processor_get_frequency();
|
||||
@ -421,7 +421,8 @@ void common_hal_pwmio_pwmout_set_frequency(pwmio_pwmout_obj_t* self,
|
||||
if (t->is_tc) {
|
||||
resolution = 16;
|
||||
} else {
|
||||
resolution = 24;
|
||||
// TCC resolution varies so look it up.
|
||||
resolution = tcc_sizes[t->index];
|
||||
}
|
||||
uint32_t system_clock = common_hal_mcu_processor_get_frequency();
|
||||
uint32_t new_top;
|
||||
|
@ -429,9 +429,11 @@ uint32_t port_get_saved_word(void) {
|
||||
// TODO: Move this to an RTC backup register so we can preserve it when only the BACKUP power domain
|
||||
// is enabled.
|
||||
static volatile uint64_t overflowed_ticks = 0;
|
||||
#ifdef SAMD21
|
||||
static volatile bool _ticks_enabled = false;
|
||||
#endif
|
||||
|
||||
static uint32_t _get_count(uint32_t* overflow_count) {
|
||||
static uint32_t _get_count(uint64_t* overflow_count) {
|
||||
#ifdef SAM_D5X_E5X
|
||||
while ((RTC->MODE0.SYNCBUSY.reg & (RTC_MODE0_SYNCBUSY_COUNTSYNC | RTC_MODE0_SYNCBUSY_COUNT)) != 0) {}
|
||||
#endif
|
||||
@ -500,7 +502,7 @@ void RTC_Handler(void) {
|
||||
}
|
||||
|
||||
uint64_t port_get_raw_ticks(uint8_t* subticks) {
|
||||
uint32_t overflow_count;
|
||||
uint64_t overflow_count;
|
||||
uint32_t current_ticks = _get_count(&overflow_count);
|
||||
if (subticks != NULL) {
|
||||
*subticks = (current_ticks % 16) * 2;
|
||||
@ -537,9 +539,11 @@ void port_disable_tick(void) {
|
||||
// they'll wake us up earlier. If we don't, we'll mess up ticks by overwriting
|
||||
// the next RTC wake up time.
|
||||
void port_interrupt_after_ticks(uint32_t ticks) {
|
||||
#ifdef SAMD21
|
||||
if (_ticks_enabled) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
_port_interrupt_after_ticks(ticks);
|
||||
}
|
||||
|
||||
|
@ -4,3 +4,5 @@ USB_PRODUCT = "Spresense"
|
||||
USB_MANUFACTURER = "Sony"
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
|
||||
CIRCUITPY_MSGPACK = 0
|
||||
|
@ -1,84 +0,0 @@
|
||||
# Circuitpython on ESP32-S2 #
|
||||
|
||||
This port adds the ESP32-S2 line of modules from Espressif to Circuitpython. ESP32-S2 modules are low power, single-core Wi-Fi microcontroller SoCs designed for IoT applications.
|
||||
|
||||
## How this port is organized: ##
|
||||
|
||||
- **bindings/** contains some required bindings to the ESP-IDF for exceptions and memory.
|
||||
- **boards/** contains the configuration files for each development board and breakout available on the port.
|
||||
- **common-hal/** contains the port-specific module implementations, used by shared-module and shared-bindings.
|
||||
- **esp-idf/** contains the Espressif IoT development framework installation, including all the drivers for the port.
|
||||
- **modules/** contains information specific to certain ESP32-S2 hardware modules, such as the pins used for flash and RAM on the WROVER and WROOM.
|
||||
- **peripherals/** contains peripheral setup files and peripheral mapping information, sorted by family and sub-variant. Most files in this directory can be generated with the python scripts in **tools/**.
|
||||
- **supervisor/** contains port-specific implementations of internal flash, serial and USB, as well as the **port.c** file, which initializes the port at startup.
|
||||
- **tools/** includes useful python scripts for debugging and other purposes.
|
||||
|
||||
At the root level, refer to **mpconfigboard.h** and **mpconfigport.mk** for port specific settings and a list of enabled circuitpython modules.
|
||||
|
||||
## Connecting to the ESP32-S2 ##
|
||||
|
||||
The USB port built into ESP32-S2 boards such as the Saola is not the native USB of the board, but a debugging and programming interface. The actual ESP32-S2 native USB which exposes the Circuitpython drive and CDC connection is located on IO pins 19 and 20:
|
||||
|
||||
| GPIO | USB |
|
||||
| ---- | ----------- |
|
||||
| 20 | D+ (green) |
|
||||
| 19 | D- (white) |
|
||||
| GND | GND (black) |
|
||||
| 5V | +5V (red) |
|
||||
|
||||
Connect these pins using a [USB adapter](https://www.adafruit.com/product/4090) or [breakout cable](https://www.adafruit.com/product/4448) to access the Circuitpython drive.
|
||||
|
||||
## Building and flashing ##
|
||||
|
||||
Before building or flashing the ESP32-S2, you must [install the esp-idf](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html). This must be re-done every time the esp-idf is updated, but not every time you build. Run `cd ports/esp32s2` from `circuitpython/` to move to the esp32s2 port root, and run:
|
||||
|
||||
```
|
||||
./esp-idf/install.sh
|
||||
```
|
||||
|
||||
After this initial installation, you must add the esp-idf tools to your path. You must also do this **any time you open a new bash environment for building or flashing**:
|
||||
|
||||
```
|
||||
. esp-idf/export.sh
|
||||
```
|
||||
|
||||
When Circuitpython updates the ESP-IDF to a new release, you may need to run this installation process again. The exact commands used may also vary based on your bash environment.
|
||||
|
||||
Building boards such as the Saola is typically done through `make flash`. The default port is `tty.SLAB_USBtoUART`, which will only work on certain Mac setups. On most machines, both Mac and Linux, you will need to set the port yourself by running `ls /dev/tty.usb*` and selecting the one that only appears when your development board is plugged in. An example make command with the port setting is as follows:
|
||||
|
||||
```
|
||||
make BOARD=espressif_saola_1_wrover flash PORT=/dev/tty.usbserial-1421120
|
||||
```
|
||||
|
||||
## Debugging ##
|
||||
|
||||
The ESP32-S2 supports JTAG debugging over OpenOCD using a JLink or other probe hardware. The official tutorials can be found on the Espressif website [here](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-guides/jtag-debugging/index.html), but they are mostly for the ESP32-S2 Kaluga, which has built-in debugging.
|
||||
|
||||
OpenOCD is automatically installed and added to your bash environment during the esp-idf installation and setup process. You can double check that it is installed by using `openocd --version`, as per the tutorial. Attach the JTAG probe pins according to the [instructions](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-guides/jtag-debugging/configure-other-jtag.html) for JTAG debugging on boards that do not contain an integrated debugger.
|
||||
|
||||
Once the debugger is connected physically, you must run OpenOCD with attached configuration files specifying the **interface** (your debugger probe) and either a **target** or a **board** (targets are for SoCs only, and can be used when a full board configuration file doesn't exist). You can find the path location of these files by checking the `OPENOCD_SCRIPTS` environmental variable by running `echo $OPENOCD_SCRIPTS` in bash. Interfaces will be in the `interface/` directory, and targets and boards in the `target/` and `board/` directories, respectively.
|
||||
|
||||
**Note:** Unfortunately, there are no board files for the esp32-s2 other than the Kaluga, and the included `target/esp32s2.cfg` target file will not work by default on the Jlink for boards like the Saola 1, as the default speed is incorrect. In addition, these files are covered under the GPL and cannot be included in Circuitpython. Thus, you must make a copy of the esp32s2.cfg file yourself and add the following line manually, under `transport select jtag` at the start of the file:
|
||||
|
||||
```
|
||||
adapter_khz 1000
|
||||
```
|
||||
|
||||
Once this is complete, your final OpenOCD command may look something like this:
|
||||
|
||||
`openocd -f interface/jlink.cfg -f SOMEPATH/copied-esp32s2-saola-1.cfg`
|
||||
|
||||
Where `SOMEPATH` is the location of your copied configuration file (this can be placed in the port/boards director with a prefix to ignore it with `.gitignore`, for instance). Interface, target and board config files sourced from espressif only need their paths from the $OPENOCD_SCRIPTS location, you don't need to include their full path. Once OpenOCD is running, connect to GDB with:
|
||||
|
||||
`xtensa-esp32s2-elf-gdb build-espressif_saola_1_wrover/firmware.elf`
|
||||
|
||||
And follow the Espressif GDB tutorial [instructions](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-guides/jtag-debugging/using-debugger.html) for connecting, or add them to your `gdbinit`:
|
||||
|
||||
```
|
||||
target remote :3333
|
||||
set remote hardware-watchpoint-limit 2
|
||||
mon reset halt
|
||||
flushregs
|
||||
thb app_main
|
||||
c
|
||||
```
|
94
ports/esp32s2/README.rst
Normal file
94
ports/esp32s2/README.rst
Normal file
@ -0,0 +1,94 @@
|
||||
Circuitpython on ESP32-S2
|
||||
=======================================
|
||||
|
||||
This port adds the ESP32-S2 line of modules from Espressif to Circuitpython. ESP32-S2 modules are low power, single-core Wi-Fi microcontroller SoCs designed for IoT applications.
|
||||
|
||||
How this port is organized:
|
||||
---------------------------------------
|
||||
|
||||
- **bindings/** contains some required bindings to the ESP-IDF for exceptions and memory.
|
||||
- **boards/** contains the configuration files for each development board and breakout available on the port.
|
||||
- **common-hal/** contains the port-specific module implementations, used by shared-module and shared-bindings.
|
||||
- **esp-idf/** contains the Espressif IoT development framework installation, including all the drivers for the port.
|
||||
- **modules/** contains information specific to certain ESP32-S2 hardware modules, such as the pins used for flash and RAM on the WROVER and WROOM.
|
||||
- **peripherals/** contains peripheral setup files and peripheral mapping information, sorted by family and sub-variant. Most files in this directory can be generated with the python scripts in **tools/**.
|
||||
- **supervisor/** contains port-specific implementations of internal flash, serial and USB, as well as the **port.c** file, which initializes the port at startup.
|
||||
- **tools/** includes useful python scripts for debugging and other purposes.
|
||||
|
||||
At the root level, refer to **mpconfigboard.h** and **mpconfigport.mk** for port specific settings and a list of enabled circuitpython modules.
|
||||
|
||||
Connecting to the ESP32-S2
|
||||
---------------------------------------
|
||||
|
||||
The USB port built into ESP32-S2 boards such as the Saola is not the native USB of the board, but a debugging and programming interface. The actual ESP32-S2 native USB which exposes the Circuitpython drive and CDC connection is located on IO pins 19 and 20:
|
||||
|
||||
.. csv-table::
|
||||
:header: GPIO, USB
|
||||
|
||||
20, "D+ (green)"
|
||||
19, "D- (white)"
|
||||
GND, "GND (black)"
|
||||
5V, "+5V (red)"
|
||||
|
||||
Connect these pins using a `USB adapter <https://www.adafruit.com/product/4090>`_ or `breakout cable <https://www.adafruit.com/product/4448>`_ to access the Circuitpython drive.
|
||||
|
||||
Building and flashing
|
||||
---------------------------------------
|
||||
|
||||
Before building or flashing the ESP32-S2, you must `install the esp-idf <https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html>`_. This must be re-done every time the esp-idf is updated, but not every time you build. Run ``cd ports/esp32s2`` from ``circuitpython/`` to move to the esp32s2 port root, and run:
|
||||
|
||||
.. code-block::
|
||||
|
||||
./esp-idf/install.sh
|
||||
|
||||
After this initial installation, you must add the esp-idf tools to your path. You must also do this **any time you open a new bash environment for building or flashing**:
|
||||
|
||||
.. code-block::
|
||||
|
||||
. esp-idf/export.sh
|
||||
|
||||
When Circuitpython updates the ESP-IDF to a new release, you may need to run this installation process again. The exact commands used may also vary based on your bash environment.
|
||||
|
||||
Building boards such as the Saola is typically done through ``make flash``. The default port is ``tty.SLAB_USBtoUART``, which will only work on certain Mac setups. On most machines, both Mac and Linux, you will need to set the port yourself by running ``ls /dev/tty.usb*`` and selecting the one that only appears when your development board is plugged in. An example make command with the port setting is as follows:
|
||||
|
||||
.. code-block::
|
||||
|
||||
make BOARD=espressif_saola_1_wrover flash PORT=/dev/tty.usbserial-1421120
|
||||
|
||||
Debugging
|
||||
---------------------------------------
|
||||
|
||||
The ESP32-S2 supports JTAG debugging over OpenOCD using a JLink or other probe hardware. The official tutorials can be found on the Espressif website `here <https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-guides/jtag-debugging/index.html>`_, but they are mostly for the ESP32-S2 Kaluga, which has built-in debugging.
|
||||
|
||||
OpenOCD is automatically installed and added to your bash environment during the esp-idf installation and setup process. You can double check that it is installed by using ``openocd --version``, as per the tutorial. Attach the JTAG probe pins according to the `instructions for JTAG debugging <https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-guides/jtag-debugging/configure-other-jtag.html>`_ on boards that do not contain an integrated debugger.
|
||||
|
||||
Once the debugger is connected physically, you must run OpenOCD with attached configuration files specifying the **interface** (your debugger probe) and either a **target** or a **board** (targets are for SoCs only, and can be used when a full board configuration file doesn't exist). You can find the path location of these files by checking the ``OPENOCD_SCRIPTS`` environmental variable by running ``echo $OPENOCD_SCRIPTS`` in bash. Interfaces will be in the ``interface/`` directory, and targets and boards in the ``target/`` and ``board/`` directories, respectively.
|
||||
|
||||
**Note:** Unfortunately, there are no board files for the esp32-s2 other than the Kaluga, and the included ``target/esp32s2.cfg`` target file will not work by default on the Jlink for boards like the Saola 1, as the default speed is incorrect. In addition, these files are covered under the GPL and cannot be included in Circuitpython. Thus, you must make a copy of the esp32s2.cfg file yourself and add the following line manually, under ``transport select jtag`` at the start of the file:
|
||||
|
||||
.. code-block::
|
||||
|
||||
adapter_khz 1000
|
||||
|
||||
Once this is complete, your final OpenOCD command may look something like this:
|
||||
|
||||
.. code-block::
|
||||
|
||||
openocd -f interface/jlink.cfg -f SOMEPATH/copied-esp32s2-saola-1.cfg
|
||||
|
||||
Where ``SOMEPATH`` is the location of your copied configuration file (this can be placed in the port/boards directory with a prefix to ignore it with ``.gitignore``, for instance). Interface, target and board config files sourced from espressif only need their paths from the $OPENOCD_SCRIPTS location, you don't need to include their full path. Once OpenOCD is running, connect to GDB with:
|
||||
|
||||
.. code-block::
|
||||
|
||||
xtensa-esp32s2-elf-gdb build-espressif_saola_1_wrover/firmware.elf
|
||||
|
||||
And follow the Espressif GDB tutorial `instructions for connecting <https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-guides/jtag-debugging/using-debugger.html>`_, or add them to your ``gdbinit``:
|
||||
|
||||
.. code-block::
|
||||
|
||||
target remote :3333
|
||||
set remote hardware-watchpoint-limit 2
|
||||
mon reset halt
|
||||
flushregs
|
||||
thb app_main
|
||||
c
|
@ -49,6 +49,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].epaper_display)}
|
||||
{ MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].epaper_display)},
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_ACCELEROMETER_INTERRUPT), MP_ROM_PTR(&pin_GPIO9) },
|
||||
};
|
||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
||||
|
@ -27,6 +27,8 @@
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "shared-bindings/microcontroller/Pin.h"
|
||||
#include "components/driver/include/driver/gpio.h"
|
||||
#include "components/soc/include/hal/gpio_hal.h"
|
||||
|
||||
void board_init(void) {
|
||||
// USB
|
||||
@ -47,6 +49,12 @@ void board_init(void) {
|
||||
common_hal_never_reset_pin(&pin_GPIO30);
|
||||
common_hal_never_reset_pin(&pin_GPIO31);
|
||||
common_hal_never_reset_pin(&pin_GPIO32);
|
||||
|
||||
|
||||
// Add LDO2 to never reset list, set to output and enable
|
||||
common_hal_never_reset_pin(&pin_GPIO21);
|
||||
gpio_set_direction(pin_GPIO21.number, GPIO_MODE_DEF_OUTPUT);
|
||||
gpio_set_level(pin_GPIO21.number, true);
|
||||
}
|
||||
|
||||
bool board_requests_safe_mode(void) {
|
||||
|
@ -30,13 +30,12 @@
|
||||
#define MICROPY_HW_MCU_NAME "ESP32S2"
|
||||
|
||||
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0)
|
||||
|
||||
#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n")
|
||||
|
||||
#define AUTORESET_DELAY_MS 500
|
||||
|
||||
// #define MICROPY_HW_APA102_MOSI (&pin_GPIO40)
|
||||
// #define MICROPY_HW_APA102_SCK (&pin_GPIO45)
|
||||
#define MICROPY_HW_APA102_MOSI (&pin_GPIO40)
|
||||
#define MICROPY_HW_APA102_SCK (&pin_GPIO45)
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO9)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO8)
|
||||
|
@ -9,9 +9,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO18) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO14) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO12) },
|
||||
@ -82,18 +82,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO11) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_GPIO40) }, // MTDO
|
||||
{ MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_GPIO45) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, // Blue LED
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_GPIO40) }, // APA102
|
||||
{ MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_GPIO45) }, // APA102
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_LDO2), MP_ROM_PTR(&pin_GPIO21) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LDO2), MP_ROM_PTR(&pin_GPIO21) }, // Second LDO Enable control
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, // Second LDO Enable control
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AMB), MP_ROM_PTR(&pin_GPIO4) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, // Ambient Light Sensor
|
||||
{ MP_ROM_QSTR(MP_QSTR_AMB), MP_ROM_PTR(&pin_GPIO4) }, // Ambient Light Sensor
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||
|
@ -36,3 +36,13 @@
|
||||
|
||||
// #define MICROPY_HW_APA102_MOSI (&pin_GPIO40)
|
||||
// #define MICROPY_HW_APA102_SCK (&pin_GPIO45)
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO38)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO33)
|
||||
|
||||
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36)
|
||||
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35)
|
||||
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37)
|
||||
|
||||
#define DEFAULT_UART_BUS_RX (&pin_GPIO44)
|
||||
#define DEFAULT_UART_BUS_TX (&pin_GPIO43)
|
||||
|
@ -9,10 +9,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO18) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO14) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO12) },
|
||||
@ -26,7 +25,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO5) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO36) },
|
||||
|
||||
@ -83,17 +82,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO11) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_GPIO40) }, // MTDO
|
||||
{ MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_GPIO45) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, // Blue LED
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_LDO2), MP_ROM_PTR(&pin_GPIO21) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_GPIO40) }, // APA102
|
||||
{ MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_GPIO45) }, // APA102
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LDO2), MP_ROM_PTR(&pin_GPIO21) }, // Second LDO Enable control
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, // Second LDO Enable control
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AMB), MP_ROM_PTR(&pin_GPIO4) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, // Ambient Light Sensor
|
||||
{ MP_ROM_QSTR(MP_QSTR_AMB), MP_ROM_PTR(&pin_GPIO4) }, // Ambient Light Sensor
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||
|
@ -37,13 +37,14 @@
|
||||
#ifdef MICROPY_HW_NEOPIXEL
|
||||
bool neopixel_in_use;
|
||||
#endif
|
||||
#ifdef MICROPY_HW_APA102_MOSI
|
||||
bool apa102_sck_in_use;
|
||||
bool apa102_mosi_in_use;
|
||||
#endif
|
||||
|
||||
STATIC uint32_t never_reset_pins[2];
|
||||
STATIC uint32_t in_use[2];
|
||||
|
||||
bool apa102_mosi_in_use;
|
||||
bool apa102_sck_in_use;
|
||||
|
||||
STATIC void floating_gpio_reset(gpio_num_t pin_number) {
|
||||
// This is the same as gpio_reset_pin(), but without the pullup.
|
||||
// Note that gpio_config resets the iomatrix to GPIO_FUNC as well.
|
||||
@ -86,6 +87,20 @@ void reset_pin_number(gpio_num_t pin_number) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#ifdef MICROPY_HW_APA102_MOSI
|
||||
if (pin_number == MICROPY_HW_APA102_MOSI->number ||
|
||||
pin_number == MICROPY_HW_APA102_SCK->number) {
|
||||
apa102_mosi_in_use = apa102_mosi_in_use && pin_number != MICROPY_HW_APA102_MOSI->number;
|
||||
apa102_sck_in_use = apa102_sck_in_use && pin_number != MICROPY_HW_APA102_SCK->number;
|
||||
if (!apa102_sck_in_use && !apa102_mosi_in_use) {
|
||||
rgb_led_status_init();
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void common_hal_reset_pin(const mcu_pin_obj_t* pin) {
|
||||
@ -110,6 +125,11 @@ void reset_all_pins(void) {
|
||||
#ifdef MICROPY_HW_NEOPIXEL
|
||||
neopixel_in_use = false;
|
||||
#endif
|
||||
#ifdef MICROPY_HW_APA102_MOSI
|
||||
apa102_sck_in_use = false;
|
||||
apa102_mosi_in_use = false;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void claim_pin(const mcu_pin_obj_t* pin) {
|
||||
@ -119,6 +139,15 @@ void claim_pin(const mcu_pin_obj_t* pin) {
|
||||
neopixel_in_use = true;
|
||||
}
|
||||
#endif
|
||||
#ifdef MICROPY_HW_APA102_MOSI
|
||||
if (pin == MICROPY_HW_APA102_MOSI) {
|
||||
apa102_mosi_in_use = true;
|
||||
}
|
||||
if (pin == MICROPY_HW_APA102_SCK) {
|
||||
apa102_sck_in_use = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void common_hal_mcu_pin_claim(const mcu_pin_obj_t* pin) {
|
||||
@ -131,10 +160,18 @@ bool pin_number_is_free(gpio_num_t pin_number) {
|
||||
return !neopixel_in_use;
|
||||
}
|
||||
#endif
|
||||
#ifdef MICROPY_HW_APA102_MOSI
|
||||
if (pin_number == MICROPY_HW_APA102_MOSI->number) {
|
||||
return !apa102_mosi_in_use;
|
||||
}
|
||||
if (pin_number == MICROPY_HW_APA102_SCK->number) {
|
||||
return !apa102_sck_in_use;
|
||||
}
|
||||
#endif
|
||||
|
||||
uint8_t offset = pin_number / 32;
|
||||
uint32_t mask = 1 << (pin_number % 32);
|
||||
return (never_reset_pins[offset] & mask) == 0 && (in_use[offset] & mask) == 0;
|
||||
return (in_use[offset] & mask) == 0;
|
||||
}
|
||||
|
||||
bool common_hal_mcu_pin_is_free(const mcu_pin_obj_t *pin) {
|
||||
|
@ -31,8 +31,10 @@
|
||||
|
||||
#include "peripherals/pins.h"
|
||||
|
||||
extern bool apa102_mosi_in_use;
|
||||
#ifdef MICROPY_HW_APA102_MOSI
|
||||
extern bool apa102_sck_in_use;
|
||||
extern bool apa102_mosi_in_use;
|
||||
#endif
|
||||
|
||||
#ifdef MICROPY_HW_NEOPIXEL
|
||||
extern bool neopixel_in_use;
|
||||
|
@ -178,7 +178,7 @@ mp_uint_t common_hal_socketpool_socket_recvfrom_into(socketpool_socket_obj_t* se
|
||||
|
||||
struct sockaddr_in source_addr;
|
||||
socklen_t socklen = sizeof(source_addr);
|
||||
int bytes_received = lwip_recvfrom(self->num, buf, len - 1, 0, (struct sockaddr *)&source_addr, &socklen);
|
||||
int bytes_received = lwip_recvfrom(self->num, buf, len, 0, (struct sockaddr *)&source_addr, &socklen);
|
||||
|
||||
memcpy((void *)ip, (void*)&source_addr.sin_addr.s_addr, sizeof source_addr.sin_addr.s_addr);
|
||||
*port = source_addr.sin_port;
|
||||
@ -186,10 +186,9 @@ mp_uint_t common_hal_socketpool_socket_recvfrom_into(socketpool_socket_obj_t* se
|
||||
if (bytes_received < 0) {
|
||||
mp_raise_BrokenPipeError();
|
||||
return 0;
|
||||
} else {
|
||||
buf[bytes_received] = 0; // Null-terminate whatever we received
|
||||
return bytes_received;
|
||||
}
|
||||
|
||||
return bytes_received;
|
||||
}
|
||||
|
||||
void common_hal_socketpool_socket_close(socketpool_socket_obj_t* self) {
|
||||
|
@ -54,3 +54,37 @@ mp_obj_t common_hal_wifi_network_get_country(wifi_network_obj_t *self) {
|
||||
// 2 instead of strlen(cstr) as this gives us only the country-code
|
||||
return mp_obj_new_str(cstr, 2);
|
||||
}
|
||||
|
||||
mp_obj_t common_hal_wifi_network_get_authmode(wifi_network_obj_t *self) {
|
||||
const char* authmode = "";
|
||||
switch (self->record.authmode) {
|
||||
case WIFI_AUTH_OPEN:
|
||||
authmode = "OPEN";
|
||||
break;
|
||||
case WIFI_AUTH_WEP:
|
||||
authmode = "WEP";
|
||||
break;
|
||||
case WIFI_AUTH_WPA_PSK:
|
||||
authmode = "WPA_PSK";
|
||||
break;
|
||||
case WIFI_AUTH_WPA2_PSK:
|
||||
authmode = "WPA2_PSK";
|
||||
break;
|
||||
case WIFI_AUTH_WPA_WPA2_PSK:
|
||||
authmode = "WPA_WPA2_PSK";
|
||||
break;
|
||||
case WIFI_AUTH_WPA2_ENTERPRISE:
|
||||
authmode = "WPA2_ENTERPRISE";
|
||||
break;
|
||||
case WIFI_AUTH_WPA3_PSK:
|
||||
authmode = "WPA3_PSK";
|
||||
break;
|
||||
case WIFI_AUTH_WPA2_WPA3_PSK:
|
||||
authmode = "WPA2_WPA3_PSK";
|
||||
break;
|
||||
default:
|
||||
authmode = "UNKNOWN";
|
||||
break;
|
||||
}
|
||||
return mp_obj_new_str(authmode, strlen(authmode));
|
||||
}
|
||||
|
@ -55,8 +55,6 @@ static void start_station(wifi_radio_obj_t *self) {
|
||||
esp_wifi_set_mode(next_mode);
|
||||
|
||||
self->sta_mode = 1;
|
||||
|
||||
esp_wifi_set_config(WIFI_MODE_STA, &self->sta_config);
|
||||
}
|
||||
|
||||
bool common_hal_wifi_radio_get_enabled(wifi_radio_obj_t *self) {
|
||||
|
@ -47,23 +47,23 @@ static void event_handler(void* arg, esp_event_base_t event_base,
|
||||
if (event_base == WIFI_EVENT) {
|
||||
switch (event_id) {
|
||||
case WIFI_EVENT_SCAN_DONE:
|
||||
ESP_EARLY_LOGW(TAG, "scan");
|
||||
ESP_LOGW(TAG, "scan");
|
||||
xEventGroupSetBits(radio->event_group_handle, WIFI_SCAN_DONE_BIT);
|
||||
break;
|
||||
case WIFI_EVENT_STA_START:
|
||||
ESP_EARLY_LOGW(TAG, "start");
|
||||
ESP_LOGW(TAG, "start");
|
||||
break;
|
||||
case WIFI_EVENT_STA_STOP:
|
||||
ESP_EARLY_LOGW(TAG, "stop");
|
||||
ESP_LOGW(TAG, "stop");
|
||||
break;
|
||||
case WIFI_EVENT_STA_CONNECTED:
|
||||
ESP_EARLY_LOGW(TAG, "connected");
|
||||
ESP_LOGW(TAG, "connected");
|
||||
break;
|
||||
case WIFI_EVENT_STA_DISCONNECTED: {
|
||||
ESP_EARLY_LOGW(TAG, "disconnected");
|
||||
ESP_LOGW(TAG, "disconnected");
|
||||
wifi_event_sta_disconnected_t* d = (wifi_event_sta_disconnected_t*) event_data;
|
||||
uint8_t reason = d->reason;
|
||||
ESP_EARLY_LOGW(TAG, "reason %d 0x%02x", reason, reason);
|
||||
ESP_LOGW(TAG, "reason %d 0x%02x", reason, reason);
|
||||
if (radio->retries_left > 0 &&
|
||||
(reason == WIFI_REASON_AUTH_EXPIRE ||
|
||||
reason == WIFI_REASON_NOT_AUTHED ||
|
||||
@ -71,24 +71,27 @@ static void event_handler(void* arg, esp_event_base_t event_base,
|
||||
reason == WIFI_REASON_CONNECTION_FAIL ||
|
||||
reason == WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT)) {
|
||||
radio->retries_left--;
|
||||
ESP_EARLY_LOGI(TAG, "Retrying connect. %d retries remaining", radio->retries_left);
|
||||
ESP_LOGI(TAG, "Retrying connect. %d retries remaining", radio->retries_left);
|
||||
esp_wifi_connect();
|
||||
return;
|
||||
}
|
||||
|
||||
radio->last_disconnect_reason = reason;
|
||||
xEventGroupSetBits(radio->event_group_handle, WIFI_DISCONNECTED_BIT);
|
||||
break;
|
||||
}
|
||||
|
||||
// Cases to handle later.
|
||||
// case WIFI_EVENT_STA_AUTHMODE_CHANGE:
|
||||
default:
|
||||
default: {
|
||||
ESP_LOGW(TAG, "event %d 0x%02x", event_id, event_id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) {
|
||||
ESP_EARLY_LOGW(TAG, "got ip");
|
||||
ESP_LOGW(TAG, "got ip");
|
||||
radio->retries_left = radio->starting_retries;
|
||||
xEventGroupSetBits(radio->event_group_handle, WIFI_CONNECTED_BIT);
|
||||
}
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
#define MICROPY_PY_UJSON (1)
|
||||
#define MICROPY_USE_INTERNAL_PRINTF (0)
|
||||
#define MICROPY_PY_SYS_PLATFORM "Espressif ESP32-S2"
|
||||
|
||||
#include "py/circuitpy_mpconfig.h"
|
||||
|
||||
|
@ -15,6 +15,7 @@ CIRCUITPY_DISPLAYIO = 0
|
||||
CIRCUITPY_FRAMEBUFFERIO = 0
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_I2CPERIPHERAL = 0
|
||||
CIRCUITPY_MSGPACK = 0
|
||||
CIRCUITPY_NEOPIXEL_WRITE = 0
|
||||
CIRCUITPY_NVM = 0
|
||||
CIRCUITPY_PIXELBUF = 0
|
||||
|
@ -16,6 +16,7 @@ CIRCUITPY_AUDIOMP3 = 0
|
||||
CIRCUITPY_BUSIO = 1
|
||||
CIRCUITPY_DISPLAYIO = 0
|
||||
CIRCUITPY_FRAMEBUFFERIO = 0
|
||||
CIRCUITPY_MSGPACK = 0
|
||||
CIRCUITPY_GAMEPAD = 0
|
||||
CIRCUITPY_NEOPIXEL_WRITE = 0
|
||||
CIRCUITPY_NVM = 0
|
||||
|
@ -276,7 +276,7 @@ uint32_t port_get_saved_word(void) {
|
||||
uint64_t port_get_raw_ticks(uint8_t* subticks) {
|
||||
common_hal_mcu_disable_interrupts();
|
||||
uint32_t rtc = nrfx_rtc_counter_get(&rtc_instance);
|
||||
uint32_t overflow_count = overflow_tracker.overflowed_ticks;
|
||||
uint64_t overflow_count = overflow_tracker.overflowed_ticks;
|
||||
common_hal_mcu_enable_interrupts();
|
||||
|
||||
if (subticks != NULL) {
|
||||
|
@ -58,6 +58,14 @@ BASE_CFLAGS = \
|
||||
# -H
|
||||
|
||||
|
||||
# Set a global CIRCUITPY_DEBUG flag.
|
||||
# Don't just call it "DEBUG": too many libraries use plain DEBUG.
|
||||
ifneq ($(DEBUG),)
|
||||
CFLAGS += -DCIRCUITPY_DEBUG=$(DEBUG)
|
||||
else
|
||||
CFLAGS += -DCIRCUITPY_DEBUG=0
|
||||
endif
|
||||
|
||||
###
|
||||
# Handle frozen modules.
|
||||
|
||||
@ -292,6 +300,9 @@ endif
|
||||
ifeq ($(CIRCUITPY_PEW),1)
|
||||
SRC_PATTERNS += _pew/%
|
||||
endif
|
||||
ifeq ($(CIRCUITPY_MSGPACK),1)
|
||||
SRC_PATTERNS += msgpack/%
|
||||
endif
|
||||
|
||||
# All possible sources are listed here, and are filtered by SRC_PATTERNS in SRC_COMMON_HAL
|
||||
SRC_COMMON_HAL_ALL = \
|
||||
@ -412,6 +423,8 @@ $(filter $(SRC_PATTERNS), \
|
||||
math/__init__.c \
|
||||
microcontroller/ResetReason.c \
|
||||
microcontroller/RunMode.c \
|
||||
msgpack/__init__.c \
|
||||
msgpack/ExtType.c \
|
||||
supervisor/RunReason.c \
|
||||
)
|
||||
|
||||
@ -481,6 +494,7 @@ SRC_SHARED_MODULE_ALL = \
|
||||
memorymonitor/AllocationAlarm.c \
|
||||
memorymonitor/AllocationSize.c \
|
||||
network/__init__.c \
|
||||
msgpack/__init__.c \
|
||||
os/__init__.c \
|
||||
random/__init__.c \
|
||||
rgbmatrix/RGBMatrix.c \
|
||||
|
@ -774,6 +774,13 @@ extern const struct _mp_obj_module_t wifi_module;
|
||||
#define WIFI_MODULE
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_MSGPACK
|
||||
extern const struct _mp_obj_module_t msgpack_module;
|
||||
#define MSGPACK_MODULE { MP_ROM_QSTR(MP_QSTR_msgpack), MP_ROM_PTR(&msgpack_module) },
|
||||
#else
|
||||
#define MSGPACK_MODULE
|
||||
#endif
|
||||
|
||||
// Define certain native modules with weak links so they can be replaced with Python
|
||||
// implementations. This list may grow over time.
|
||||
#define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
|
||||
@ -830,6 +837,7 @@ extern const struct _mp_obj_module_t wifi_module;
|
||||
_EVE_MODULE \
|
||||
MEMORYMONITOR_MODULE \
|
||||
MICROCONTROLLER_MODULE \
|
||||
MSGPACK_MODULE \
|
||||
NEOPIXEL_WRITE_MODULE \
|
||||
NETWORK_MODULE \
|
||||
SOCKET_MODULE \
|
||||
|
@ -308,3 +308,6 @@ CFLAGS += -DCIRCUITPY_WIFI=$(CIRCUITPY_WIFI)
|
||||
# Enabled micropython.native decorator (experimental)
|
||||
CIRCUITPY_ENABLE_MPY_NATIVE ?= 0
|
||||
CFLAGS += -DCIRCUITPY_ENABLE_MPY_NATIVE=$(CIRCUITPY_ENABLE_MPY_NATIVE)
|
||||
|
||||
CIRCUITPY_MSGPACK ?= $(CIRCUITPY_FULL_BUILD)
|
||||
CFLAGS += -DCIRCUITPY_MSGPACK=$(CIRCUITPY_MSGPACK)
|
||||
|
@ -185,7 +185,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(pixelbuf_pixelbuf_get_brightness_obj, pixelbuf_pixelbu
|
||||
|
||||
|
||||
STATIC mp_obj_t pixelbuf_pixelbuf_obj_set_brightness(mp_obj_t self_in, mp_obj_t value) {
|
||||
mp_float_t brightness = mp_obj_float_get(value);
|
||||
mp_float_t brightness = mp_obj_get_float(value);
|
||||
if (brightness > 1) {
|
||||
brightness = 1;
|
||||
} else if (brightness < 0) {
|
||||
|
@ -53,6 +53,25 @@
|
||||
//| """Not used. Access the sole instance through `alarm.sleep_memory`."""
|
||||
//| ...
|
||||
//|
|
||||
//| def __bool__(self) -> bool:
|
||||
//| """``sleep_memory`` is ``True`` if its length is greater than zero.
|
||||
//| This is an easy way to check for its existence.
|
||||
//| """
|
||||
//| ...
|
||||
//|
|
||||
//| def __len__(self) -> int:
|
||||
//| """Return the length. This is used by (`len`)"""
|
||||
//| ...
|
||||
//|
|
||||
STATIC mp_obj_t alarm_sleep_memory_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
|
||||
alarm_sleep_memory_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
uint16_t len = common_hal_alarm_sleep_memory_get_length(self);
|
||||
switch (op) {
|
||||
case MP_UNARY_OP_BOOL: return mp_obj_new_bool(len != 0);
|
||||
case MP_UNARY_OP_LEN: return MP_OBJ_NEW_SMALL_INT(len);
|
||||
default: return MP_OBJ_NULL; // op not supported
|
||||
}
|
||||
}
|
||||
|
||||
STATIC const mp_rom_map_elem_t alarm_sleep_memory_locals_dict_table[] = {
|
||||
};
|
||||
@ -154,6 +173,7 @@ const mp_obj_type_t alarm_sleep_memory_type = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_SleepMemory,
|
||||
.subscr = alarm_sleep_memory_subscr,
|
||||
.unary_op = alarm_sleep_memory_unary_op,
|
||||
.print = NULL,
|
||||
.locals_dict = (mp_obj_t)&alarm_sleep_memory_locals_dict,
|
||||
};
|
||||
|
126
shared-bindings/msgpack/ExtType.c
Normal file
126
shared-bindings/msgpack/ExtType.c
Normal file
@ -0,0 +1,126 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2019 Bernhard Boser
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "py/smallint.h"
|
||||
#include "py/objproperty.h"
|
||||
#include "shared-bindings/msgpack/ExtType.h"
|
||||
|
||||
//| class ExtType:
|
||||
//| """ExtType represents ext type in msgpack."""
|
||||
//| def __init__(self, code: int, data: bytes) -> None:
|
||||
//| """Constructor
|
||||
//| :param int code: type code in range 0~127.
|
||||
//| :param bytes data: representation."""
|
||||
//|
|
||||
STATIC mp_obj_t mod_msgpack_exttype_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
||||
mod_msgpack_extype_obj_t *self = m_new_obj(mod_msgpack_extype_obj_t);
|
||||
self->base.type = &mod_msgpack_exttype_type;
|
||||
enum { ARG_code, ARG_data };
|
||||
static const mp_arg_t allowed_args[] = {
|
||||
{ MP_QSTR_code, MP_ARG_INT | MP_ARG_REQUIRED },
|
||||
{ MP_QSTR_data, MP_ARG_OBJ | MP_ARG_REQUIRED },
|
||||
};
|
||||
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
|
||||
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
|
||||
|
||||
int code = args[ARG_code].u_int;
|
||||
if (code < 0 || code > 127) {
|
||||
mp_raise_AttributeError(translate("code outside range 0~127"));
|
||||
}
|
||||
self->code = code;
|
||||
|
||||
mp_obj_t data = args[ARG_data].u_obj;
|
||||
self->data = data;
|
||||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
|
||||
//| code: int
|
||||
//| """The type code, in range 0~127."""
|
||||
//| ...
|
||||
//|
|
||||
STATIC mp_obj_t mod_msgpack_exttype_get_code(mp_obj_t self_in) {
|
||||
mod_msgpack_extype_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
return MP_OBJ_NEW_SMALL_INT(self->code);
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(mod_msgpack_exttype_get_code_obj, mod_msgpack_exttype_get_code);
|
||||
|
||||
STATIC mp_obj_t mod_msgpack_exttype_set_code(mp_obj_t self_in, mp_obj_t code_in) {
|
||||
mod_msgpack_extype_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
int code = mp_obj_get_int(code_in);
|
||||
if (code < 0 || code > 127) {
|
||||
mp_raise_AttributeError(translate("code outside range 0~127"));
|
||||
}
|
||||
self->code = code;
|
||||
return mp_const_none;
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_2(mod_msgpack_exttype_set_code_obj, mod_msgpack_exttype_set_code);
|
||||
|
||||
const mp_obj_property_t mod_msgpack_exttype_code_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&mod_msgpack_exttype_get_code_obj,
|
||||
(mp_obj_t)&mod_msgpack_exttype_set_code_obj,
|
||||
(mp_obj_t)&mp_const_none_obj},
|
||||
};
|
||||
|
||||
//| data: bytes
|
||||
//| """Data."""
|
||||
//| ...
|
||||
//|
|
||||
STATIC mp_obj_t mod_msgpack_exttype_get_data(mp_obj_t self_in) {
|
||||
mod_msgpack_extype_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
return self->data;
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(mod_msgpack_exttype_get_data_obj, mod_msgpack_exttype_get_data);
|
||||
|
||||
STATIC mp_obj_t mod_msgpack_exttype_set_data(mp_obj_t self_in, mp_obj_t data_in) {
|
||||
mod_msgpack_extype_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
self->data = data_in;
|
||||
return mp_const_none;
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_2(mod_msgpack_exttype_set_data_obj, mod_msgpack_exttype_set_data);
|
||||
|
||||
const mp_obj_property_t mod_msgpack_exttype_data_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&mod_msgpack_exttype_get_data_obj,
|
||||
(mp_obj_t)&mod_msgpack_exttype_set_data_obj,
|
||||
(mp_obj_t)&mp_const_none_obj},
|
||||
};
|
||||
|
||||
STATIC mp_rom_map_elem_t mod_msgpack_exttype_locals_dict_table[] = {
|
||||
// Properties
|
||||
{ MP_ROM_QSTR(MP_QSTR_code), MP_ROM_PTR(&mod_msgpack_exttype_code_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_data), MP_ROM_PTR(&mod_msgpack_exttype_data_obj) },
|
||||
};
|
||||
STATIC MP_DEFINE_CONST_DICT(mod_msgpack_exttype_locals_dict, mod_msgpack_exttype_locals_dict_table);
|
||||
|
||||
const mp_obj_type_t mod_msgpack_exttype_type = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_ExtType,
|
||||
.make_new = mod_msgpack_exttype_make_new,
|
||||
.locals_dict = (mp_obj_dict_t*)&mod_msgpack_exttype_locals_dict,
|
||||
};
|
40
shared-bindings/msgpack/ExtType.h
Normal file
40
shared-bindings/msgpack/ExtType.h
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2020 Bernhard Boser
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_MSGPACK_EXTTYPE___INIT___H
|
||||
#define MICROPY_INCLUDED_SHARED_BINDINGS_MSGPACK_EXTTYPE___INIT___H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
typedef struct {
|
||||
mp_obj_base_t base;
|
||||
int32_t code;
|
||||
mp_obj_t data;
|
||||
} mod_msgpack_extype_obj_t;
|
||||
|
||||
extern const mp_obj_type_t mod_msgpack_exttype_type;
|
||||
|
||||
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_MSGPACK_EXTTYPE___INIT___H
|
162
shared-bindings/msgpack/__init__.c
Normal file
162
shared-bindings/msgpack/__init__.c
Normal file
@ -0,0 +1,162 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2019 Bernhard Boser
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "py/obj.h"
|
||||
#include "py/runtime.h"
|
||||
#include "shared-bindings/msgpack/__init__.h"
|
||||
#include "shared-module/msgpack/__init__.h"
|
||||
#include "shared-bindings/msgpack/ExtType.h"
|
||||
|
||||
#define MP_OBJ_IS_METH(o) (MP_OBJ_IS_OBJ(o) && (((mp_obj_base_t*)MP_OBJ_TO_PTR(o))->type->name == MP_QSTR_bound_method))
|
||||
|
||||
//| """Pack object in msgpack format
|
||||
//|
|
||||
//| The msgpack format is similar to json, except that the encoded data is binary.
|
||||
//| See https://msgpack.org for details. The module implements a subset of the cpython
|
||||
//| module msgpack-python.
|
||||
//|
|
||||
//| Not implemented: 64-bit int, uint, float.
|
||||
//|
|
||||
//| Example 1::
|
||||
//|
|
||||
//| import msgpack
|
||||
//| from io import BytesIO
|
||||
//|
|
||||
//| b = BytesIO()
|
||||
//| msgpack.pack({'list': [True, False, None, 1, 3.14], 'str': 'blah'}, b)
|
||||
//| b.seek(0)
|
||||
//| print(msgpack.unpack(b))
|
||||
//|
|
||||
//| Example 2: handling objects::
|
||||
//|
|
||||
//| from msgpack import pack, unpack, ExtType
|
||||
//| from io import BytesIO
|
||||
//|
|
||||
//| class MyClass:
|
||||
//| def __init__(self, val):
|
||||
//| self.value = val
|
||||
//| def __str__(self):
|
||||
//| return str(self.value)
|
||||
//|
|
||||
//| data = MyClass(b'my_value')
|
||||
//|
|
||||
//| def encoder(obj):
|
||||
//| if isinstance(obj, MyClass):
|
||||
//| return ExtType(1, obj.value)
|
||||
//| return f"no encoder for {obj}"
|
||||
//|
|
||||
//| def decoder(code, data):
|
||||
//| if code == 1:
|
||||
//| return MyClass(data)
|
||||
//| return f"no decoder for type {code}"
|
||||
//|
|
||||
//| buffer = BytesIO()
|
||||
//| pack(data, buffer, default=encoder)
|
||||
//| buffer.seek(0)
|
||||
//| decoded = unpack(buffer, ext_hook=decoder)
|
||||
//| print(f"{data} -> {buffer.getvalue()} -> {decoded}")
|
||||
//|
|
||||
//| """
|
||||
//|
|
||||
|
||||
//| def pack(obj: object, buffer: WriteableBuffer, *, default: Union[Callable[[object], None], None] = None) -> None:
|
||||
//| """Ouput object to buffer in msgpack format.
|
||||
//|
|
||||
//| :param object obj: Object to convert to msgpack format.
|
||||
//| :param ~_typing.WriteableBuffer buffer: buffer to write into
|
||||
//| :param Optional[~_typing.Callable[[object], None]] default:
|
||||
//| function called for python objects that do not have
|
||||
//| a representation in msgpack format.
|
||||
//| """
|
||||
//| ...
|
||||
//|
|
||||
STATIC mp_obj_t mod_msgpack_pack(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
||||
enum { ARG_obj, ARG_buffer, ARG_default };
|
||||
STATIC const mp_arg_t allowed_args[] = {
|
||||
{ MP_QSTR_obj, MP_ARG_REQUIRED | MP_ARG_OBJ },
|
||||
{ MP_QSTR_buffer, MP_ARG_REQUIRED | MP_ARG_OBJ },
|
||||
{ MP_QSTR_default, MP_ARG_KW_ONLY | MP_ARG_OBJ, { .u_obj = mp_const_none } },
|
||||
};
|
||||
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
|
||||
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
|
||||
|
||||
mp_obj_t handler = args[ARG_default].u_obj;
|
||||
if (handler != mp_const_none && !MP_OBJ_IS_FUN(handler) && !MP_OBJ_IS_METH(handler)) {
|
||||
mp_raise_ValueError(translate("default is not a function"));
|
||||
}
|
||||
|
||||
common_hal_msgpack_pack(args[ARG_obj].u_obj, args[ARG_buffer].u_obj, handler);
|
||||
return mp_const_none;
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_KW(mod_msgpack_pack_obj, 1, mod_msgpack_pack);
|
||||
|
||||
|
||||
//| def unpack(buffer: ReadableBuffer, *, ext_hook: Union[Callable[[int, bytes], object], None] = None, use_list: bool=True) -> object:
|
||||
//| """Unpack and return one object from buffer.
|
||||
//|
|
||||
//| :param ~_typing.ReadableBuffer buffer: buffer to read from
|
||||
//| :param Optional[~_typing.Callable[[int, bytes], object]] ext_hook: function called for objects in
|
||||
//| msgpack ext format.
|
||||
//| :param Optional[bool] use_list: return array as list or tuple (use_list=False).
|
||||
//|
|
||||
//| :return object: object read from buffer.
|
||||
//| """
|
||||
//| ...
|
||||
//|
|
||||
STATIC mp_obj_t mod_msgpack_unpack(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
||||
enum { ARG_buffer, ARG_ext_hook, ARG_use_list };
|
||||
STATIC const mp_arg_t allowed_args[] = {
|
||||
{ MP_QSTR_buffer, MP_ARG_REQUIRED | MP_ARG_OBJ, },
|
||||
{ MP_QSTR_ext_hook, MP_ARG_KW_ONLY | MP_ARG_OBJ, { .u_obj = mp_const_none } },
|
||||
{ MP_QSTR_use_list, MP_ARG_KW_ONLY | MP_ARG_BOOL, { .u_bool = true } },
|
||||
};
|
||||
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
|
||||
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
|
||||
|
||||
mp_obj_t hook = args[ARG_ext_hook].u_obj;
|
||||
if (hook != mp_const_none && !MP_OBJ_IS_FUN(hook) && !MP_OBJ_IS_METH(hook)) {
|
||||
mp_raise_ValueError(translate("ext_hook is not a function"));
|
||||
}
|
||||
|
||||
return common_hal_msgpack_unpack(args[ARG_buffer].u_obj, hook, args[ARG_use_list].u_bool);
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_KW(mod_msgpack_unpack_obj, 1, mod_msgpack_unpack);
|
||||
|
||||
|
||||
STATIC const mp_rom_map_elem_t msgpack_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_msgpack) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ExtType), MP_ROM_PTR(&mod_msgpack_exttype_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_pack), MP_ROM_PTR(&mod_msgpack_pack_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_unpack), MP_ROM_PTR(&mod_msgpack_unpack_obj) },
|
||||
};
|
||||
|
||||
STATIC MP_DEFINE_CONST_DICT(msgpack_module_globals, msgpack_module_globals_table);
|
||||
|
||||
const mp_obj_module_t msgpack_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t*)&msgpack_module_globals,
|
||||
};
|
34
shared-bindings/msgpack/__init__.h
Normal file
34
shared-bindings/msgpack/__init__.h
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2016 Scott Shawcroft for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_MSGPACK___INIT___H
|
||||
#define MICROPY_INCLUDED_SHARED_BINDINGS_MSGPACK___INIT___H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
// nothing for now
|
||||
|
||||
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_MSGPACK___INIT___H
|
@ -124,6 +124,21 @@ const mp_obj_property_t wifi_network_country_obj = {
|
||||
(mp_obj_t)&mp_const_none_obj },
|
||||
};
|
||||
|
||||
//| authmode: str
|
||||
//| """String id of the authmode"""
|
||||
//|
|
||||
STATIC mp_obj_t wifi_network_get_authmode(mp_obj_t self) {
|
||||
return common_hal_wifi_network_get_authmode(self);
|
||||
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(wifi_network_get_authmode_obj, wifi_network_get_authmode);
|
||||
|
||||
const mp_obj_property_t wifi_network_authmode_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_network_get_authmode_obj,
|
||||
(mp_obj_t)&mp_const_none_obj,
|
||||
(mp_obj_t)&mp_const_none_obj },
|
||||
};
|
||||
|
||||
STATIC const mp_rom_map_elem_t wifi_network_locals_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_ssid), MP_ROM_PTR(&wifi_network_ssid_obj) },
|
||||
@ -131,6 +146,7 @@ STATIC const mp_rom_map_elem_t wifi_network_locals_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_rssi), MP_ROM_PTR(&wifi_network_rssi_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_channel), MP_ROM_PTR(&wifi_network_channel_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_country), MP_ROM_PTR(&wifi_network_country_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_authmode), MP_ROM_PTR(&wifi_network_authmode_obj) },
|
||||
};
|
||||
|
||||
STATIC MP_DEFINE_CONST_DICT(wifi_network_locals_dict, wifi_network_locals_dict_table);
|
||||
|
@ -40,5 +40,6 @@ extern mp_obj_t common_hal_wifi_network_get_bssid(wifi_network_obj_t *self);
|
||||
extern mp_obj_t common_hal_wifi_network_get_rssi(wifi_network_obj_t *self);
|
||||
extern mp_obj_t common_hal_wifi_network_get_channel(wifi_network_obj_t *self);
|
||||
extern mp_obj_t common_hal_wifi_network_get_country(wifi_network_obj_t *self);
|
||||
extern mp_obj_t common_hal_wifi_network_get_authmode(wifi_network_obj_t *self);
|
||||
|
||||
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_WIFI_NETWORK_H
|
||||
|
@ -295,7 +295,7 @@ const mp_obj_property_t wifi_radio_ipv4_dns_obj = {
|
||||
};
|
||||
|
||||
//| ap_info: Optional[Network]
|
||||
//| """Network object containing BSSID, SSID, channel, country and RSSI when connected to an access point. None otherwise."""
|
||||
//| """Network object containing BSSID, SSID, authmode, channel, country and RSSI when connected to an access point. None otherwise."""
|
||||
//|
|
||||
STATIC mp_obj_t wifi_radio_get_ap_info(mp_obj_t self) {
|
||||
return common_hal_wifi_radio_get_ap_info(self);
|
||||
|
464
shared-module/msgpack/__init__.c
Normal file
464
shared-module/msgpack/__init__.c
Normal file
@ -0,0 +1,464 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2019 Bernhard Boser
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "py/binary.h"
|
||||
#include "py/objarray.h"
|
||||
#include "py/objlist.h"
|
||||
#include "py/objstringio.h"
|
||||
#include "py/parsenum.h"
|
||||
#include "py/runtime.h"
|
||||
#include "py/stream.h"
|
||||
|
||||
#include "supervisor/shared/translate.h"
|
||||
#include "shared-bindings/msgpack/ExtType.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// stream management
|
||||
|
||||
typedef struct _msgpack_stream_t {
|
||||
mp_obj_t stream_obj;
|
||||
mp_uint_t (*read)(mp_obj_t obj, void *buf, mp_uint_t size, int *errcode);
|
||||
mp_uint_t (*write)(mp_obj_t obj, const void *buf, mp_uint_t size, int *errcode);
|
||||
int errcode;
|
||||
} msgpack_stream_t;
|
||||
|
||||
STATIC msgpack_stream_t get_stream(mp_obj_t stream_obj, int flags) {
|
||||
const mp_stream_p_t *stream_p = mp_get_stream_raise(stream_obj, flags);
|
||||
msgpack_stream_t s = {stream_obj, stream_p->read, stream_p->write, 0};
|
||||
return s;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// readers
|
||||
|
||||
STATIC void read(msgpack_stream_t *s, void *buf, mp_uint_t size) {
|
||||
if (size == 0) return;
|
||||
mp_uint_t ret = s->read(s->stream_obj, buf, size, &s->errcode);
|
||||
if (s->errcode != 0) {
|
||||
mp_raise_OSError(s->errcode);
|
||||
}
|
||||
if (ret == 0) {
|
||||
mp_raise_msg(&mp_type_EOFError, NULL);
|
||||
}
|
||||
if (ret < size) {
|
||||
mp_raise_ValueError(translate("short read"));
|
||||
}
|
||||
}
|
||||
|
||||
STATIC uint8_t read1(msgpack_stream_t *s) {
|
||||
uint8_t res = 0;
|
||||
read(s, &res, 1);
|
||||
return res;
|
||||
}
|
||||
|
||||
STATIC uint16_t read2(msgpack_stream_t *s) {
|
||||
uint16_t res = 0;
|
||||
read(s, &res, 2);
|
||||
int n = 1;
|
||||
if (*(char *)&n == 1) res = __builtin_bswap16(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
STATIC uint32_t read4(msgpack_stream_t *s) {
|
||||
uint32_t res = 0;
|
||||
read(s, &res, 4);
|
||||
int n = 1;
|
||||
if (*(char *)&n == 1) res = __builtin_bswap32(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
STATIC size_t read_size(msgpack_stream_t *s, uint8_t len_index) {
|
||||
size_t res = 0;
|
||||
switch (len_index) {
|
||||
case 0: res = (size_t)read1(s); break;
|
||||
case 1: res = (size_t)read2(s); break;
|
||||
case 2: res = (size_t)read4(s); break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// writers
|
||||
|
||||
STATIC void write(msgpack_stream_t *s, const void *buf, mp_uint_t size) {
|
||||
mp_uint_t ret = s->write(s->stream_obj, buf, size, &s->errcode);
|
||||
if (s->errcode != 0) {
|
||||
mp_raise_OSError(s->errcode);
|
||||
}
|
||||
if (ret == 0) {
|
||||
mp_raise_msg(&mp_type_EOFError, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
STATIC void write1(msgpack_stream_t *s, uint8_t obj) {
|
||||
write(s, &obj, 1);
|
||||
}
|
||||
|
||||
STATIC void write2(msgpack_stream_t *s, uint16_t obj) {
|
||||
int n = 1;
|
||||
if (*(char *)&n == 1) obj = __builtin_bswap16(obj);
|
||||
write(s, &obj, 2);
|
||||
}
|
||||
|
||||
STATIC void write4(msgpack_stream_t *s, uint32_t obj) {
|
||||
int n = 1;
|
||||
if (*(char *)&n == 1) obj = __builtin_bswap32(obj);
|
||||
write(s, &obj, 4);
|
||||
}
|
||||
|
||||
// compute and write msgpack size code (array structures)
|
||||
STATIC void write_size(msgpack_stream_t *s, uint8_t code, size_t size) {
|
||||
if ((uint8_t)size == size) {
|
||||
write1(s, code);
|
||||
write1(s, size);
|
||||
} else if ((uint16_t)size == size) {
|
||||
write1(s, code+1);
|
||||
write2(s, size);
|
||||
} else {
|
||||
write1(s, code+2);
|
||||
write4(s, size);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// packers
|
||||
|
||||
// This is a helper function to iterate through a dictionary. The state of
|
||||
// the iteration is held in *cur and should be initialised with zero for the
|
||||
// first call. Will return NULL when no more elements are available.
|
||||
STATIC mp_map_elem_t *dict_iter_next(mp_obj_dict_t *dict, size_t *cur) {
|
||||
size_t max = dict->map.alloc;
|
||||
mp_map_t *map = &dict->map;
|
||||
|
||||
for (size_t i = *cur; i < max; i++) {
|
||||
if (MP_MAP_SLOT_IS_FILLED(map, i)) {
|
||||
*cur = i + 1;
|
||||
return &(map->table[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
STATIC void pack_int(msgpack_stream_t *s, int32_t x) {
|
||||
if (x > -32 && x < 128) {
|
||||
write1(s, x);
|
||||
} else if ((int8_t)x == x) {
|
||||
write1(s, 0xd0);
|
||||
write1(s, x);
|
||||
} else if ((int16_t)x == x) {
|
||||
write1(s, 0xd1);
|
||||
write2(s, x);
|
||||
} else {
|
||||
write1(s, 0xd2);
|
||||
write4(s, x);
|
||||
}
|
||||
}
|
||||
|
||||
STATIC void pack_bin(msgpack_stream_t *s, const uint8_t* data, size_t len) {
|
||||
write_size(s, 0xc4, len);
|
||||
if (len > 0) write(s, data, len);
|
||||
}
|
||||
|
||||
STATIC void pack_ext(msgpack_stream_t *s, int8_t code, const uint8_t* data, size_t len) {
|
||||
if (len == 1) {
|
||||
write1(s, 0xd4);
|
||||
} else if (len == 2) {
|
||||
write1(s, 0xd5);
|
||||
} else if (len == 4) {
|
||||
write1(s, 0xd6);
|
||||
} else if (len == 8) {
|
||||
write1(s, 0xd7);
|
||||
} else if (len == 16) {
|
||||
write1(s, 0xd8);
|
||||
} else {
|
||||
write_size(s, 0xc7, len);
|
||||
}
|
||||
write1(s, code); // type byte
|
||||
if (len > 0) write(s, data, len);
|
||||
}
|
||||
|
||||
STATIC void pack_str(msgpack_stream_t *s, const char* str, size_t len) {
|
||||
if (len < 32) {
|
||||
write1(s, 0b10100000 | (uint8_t)len);
|
||||
} else {
|
||||
write_size(s, 0xd9, len);
|
||||
}
|
||||
if (len > 0) write(s, str, len);
|
||||
}
|
||||
|
||||
STATIC void pack_array(msgpack_stream_t *s, size_t len) {
|
||||
// only writes the header, manually write the objects after calling pack_array!
|
||||
if (len < 16) {
|
||||
write1(s, 0b10010000 | (uint8_t)len);
|
||||
} else if (len < 0x10000) {
|
||||
write1(s, 0xdc);
|
||||
write2(s, len);
|
||||
} else {
|
||||
write1(s, 0xdd);
|
||||
write4(s, len);
|
||||
}
|
||||
}
|
||||
|
||||
STATIC void pack_dict(msgpack_stream_t *s, size_t len) {
|
||||
// only writes the header, manually write the objects after calling pack_array!
|
||||
if (len < 16) {
|
||||
write1(s, 0b10000000 | (uint8_t)len);
|
||||
} else if (len < 0x10000) {
|
||||
write1(s, 0xde);
|
||||
write2(s, len);
|
||||
} else {
|
||||
write1(s, 0xdf);
|
||||
write4(s, len);
|
||||
}
|
||||
}
|
||||
|
||||
STATIC void pack(mp_obj_t obj, msgpack_stream_t *s, mp_obj_t default_handler) {
|
||||
if (MP_OBJ_IS_SMALL_INT(obj)) {
|
||||
// int
|
||||
int32_t x = MP_OBJ_SMALL_INT_VALUE(obj);
|
||||
pack_int(s, x);
|
||||
} else if (MP_OBJ_IS_STR(obj)) {
|
||||
// string
|
||||
size_t len;
|
||||
const char *data = mp_obj_str_get_data(obj, &len);
|
||||
pack_str(s, data, len);
|
||||
} else if (MP_OBJ_IS_TYPE(obj, &mod_msgpack_exttype_type)) {
|
||||
mod_msgpack_extype_obj_t *ext = MP_OBJ_TO_PTR(obj);
|
||||
mp_buffer_info_t bufinfo;
|
||||
mp_get_buffer_raise(ext->data, &bufinfo, MP_BUFFER_READ);
|
||||
pack_ext(s, ext->code, bufinfo.buf, bufinfo.len);
|
||||
} else if (MP_OBJ_IS_TYPE(obj, &mp_type_bytes)) {
|
||||
// bytes
|
||||
mp_buffer_info_t bufinfo;
|
||||
mp_get_buffer_raise(obj, &bufinfo, MP_BUFFER_READ);
|
||||
pack_bin(s, bufinfo.buf, bufinfo.len);
|
||||
} else if (MP_OBJ_IS_TYPE(obj, &mp_type_tuple)) {
|
||||
// tuple
|
||||
mp_obj_tuple_t *self = MP_OBJ_TO_PTR(obj);
|
||||
pack_array(s, self->len);
|
||||
for (size_t i=0; i<self->len; i++) {
|
||||
pack(self->items[i], s, default_handler);
|
||||
}
|
||||
} else if (MP_OBJ_IS_TYPE(obj, &mp_type_list)) {
|
||||
// list (layout differs from tuple)
|
||||
mp_obj_list_t *self = MP_OBJ_TO_PTR(obj);
|
||||
pack_array(s, self->len);
|
||||
for (size_t i=0; i<self->len; i++) {
|
||||
pack(self->items[i], s, default_handler);
|
||||
}
|
||||
} else if (MP_OBJ_IS_TYPE(obj, &mp_type_dict)) {
|
||||
// dict
|
||||
mp_obj_dict_t *self = MP_OBJ_TO_PTR(obj);
|
||||
pack_dict(s, self->map.used);
|
||||
size_t cur = 0;
|
||||
mp_map_elem_t *next = NULL;
|
||||
while ((next = dict_iter_next(self, &cur)) != NULL) {
|
||||
pack(next->key, s, default_handler);
|
||||
pack(next->value, s, default_handler);
|
||||
}
|
||||
} else if (mp_obj_is_float(obj)) {
|
||||
union Float { mp_float_t f; uint32_t u; };
|
||||
union Float data;
|
||||
data.f = mp_obj_float_get(obj);
|
||||
write1(s, 0xca);
|
||||
write4(s, data.u);
|
||||
} else if (obj == mp_const_none) {
|
||||
write1(s, 0xc0);
|
||||
} else if (obj == mp_const_false) {
|
||||
write1(s, 0xc2);
|
||||
} else if (obj == mp_const_true) {
|
||||
write1(s, 0xc3);
|
||||
} else {
|
||||
if (default_handler != mp_const_none) {
|
||||
// set default_handler to mp_const_none to avoid infinite recursion
|
||||
// this also precludes some valid outputs
|
||||
pack(mp_call_function_1(default_handler, obj), s, mp_const_none);
|
||||
} else {
|
||||
mp_raise_ValueError(translate("no default packer"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// unpacker
|
||||
|
||||
STATIC mp_obj_t unpack(msgpack_stream_t *s, mp_obj_t ext_hook, bool use_list);
|
||||
|
||||
STATIC mp_obj_t unpack_array_elements(msgpack_stream_t *s, size_t size, mp_obj_t ext_hook, bool use_list) {
|
||||
if (use_list) {
|
||||
mp_obj_list_t *t = MP_OBJ_TO_PTR(mp_obj_new_list(size, NULL));
|
||||
for (size_t i=0; i<size; i++) {
|
||||
t->items[i] = unpack(s, ext_hook, use_list);
|
||||
}
|
||||
return MP_OBJ_FROM_PTR(t);
|
||||
} else {
|
||||
mp_obj_tuple_t *t = MP_OBJ_TO_PTR(mp_obj_new_tuple(size, NULL));
|
||||
for (size_t i=0; i<size; i++) {
|
||||
t->items[i] = unpack(s, ext_hook, use_list);
|
||||
}
|
||||
return MP_OBJ_FROM_PTR(t);
|
||||
}
|
||||
}
|
||||
|
||||
STATIC mp_obj_t unpack_bytes(msgpack_stream_t *s, size_t size) {
|
||||
vstr_t vstr;
|
||||
vstr_init_len(&vstr, size);
|
||||
byte *p = (byte*)vstr.buf;
|
||||
read(s, p, size);
|
||||
return mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr);
|
||||
}
|
||||
|
||||
STATIC mp_obj_t unpack_ext(msgpack_stream_t *s, size_t size, mp_obj_t ext_hook) {
|
||||
int8_t code = read1(s);
|
||||
mp_obj_t data = unpack_bytes(s, size);
|
||||
if (ext_hook != mp_const_none) {
|
||||
return mp_call_function_2(ext_hook, MP_OBJ_NEW_SMALL_INT(code), data);
|
||||
} else {
|
||||
mod_msgpack_extype_obj_t *o = m_new_obj(mod_msgpack_extype_obj_t);
|
||||
o->base.type = &mod_msgpack_exttype_type;
|
||||
o->code = code;
|
||||
o->data = data;
|
||||
return MP_OBJ_FROM_PTR(o);
|
||||
}
|
||||
}
|
||||
|
||||
STATIC mp_obj_t unpack(msgpack_stream_t *s, mp_obj_t ext_hook, bool use_list) {
|
||||
uint8_t code = read1(s);
|
||||
if (((code & 0b10000000) == 0) || ((code & 0b11100000) == 0b11100000)) {
|
||||
// int
|
||||
return MP_OBJ_NEW_SMALL_INT((int8_t)code);
|
||||
}
|
||||
if ((code & 0b11100000) == 0b10100000) {
|
||||
// str
|
||||
size_t len = code & 0b11111;
|
||||
// allocate on stack; len < 32
|
||||
char str[len];
|
||||
read(s, &str, len);
|
||||
return mp_obj_new_str(str, len);
|
||||
}
|
||||
if ((code & 0b11110000) == 0b10010000) {
|
||||
// array (list / tuple)
|
||||
return unpack_array_elements(s, code & 0b1111, ext_hook, use_list);
|
||||
}
|
||||
if ((code & 0b11110000) == 0b10000000) {
|
||||
// map (dict)
|
||||
size_t len = code & 0b1111;
|
||||
mp_obj_dict_t *d = MP_OBJ_TO_PTR(mp_obj_new_dict(len));
|
||||
for (size_t i=0; i<len; i++) {
|
||||
mp_obj_dict_store(d, unpack(s, ext_hook, use_list), unpack(s, ext_hook, use_list));
|
||||
}
|
||||
return MP_OBJ_FROM_PTR(d);
|
||||
}
|
||||
switch (code) {
|
||||
case 0xc0: return mp_const_none;
|
||||
case 0xc2: return mp_const_false;
|
||||
case 0xc3: return mp_const_true;
|
||||
case 0xc4:
|
||||
case 0xc5:
|
||||
case 0xc6: {
|
||||
// bin 8, 16, 32
|
||||
return unpack_bytes(s, read_size(s, code-0xc4));
|
||||
}
|
||||
case 0xcc: // uint8
|
||||
case 0xd0: // int8
|
||||
return MP_OBJ_NEW_SMALL_INT((int8_t)read1(s));
|
||||
case 0xcd: // uint16
|
||||
case 0xd1: // int16
|
||||
return MP_OBJ_NEW_SMALL_INT((int16_t)read2(s));
|
||||
case 0xce: // uint32
|
||||
case 0xd2: // int32
|
||||
return MP_OBJ_NEW_SMALL_INT((int32_t)read4(s));
|
||||
case 0xca: {
|
||||
union Float { mp_float_t f; uint32_t u; };
|
||||
union Float data;
|
||||
data.u = read4(s);
|
||||
return mp_obj_new_float(data.f);
|
||||
}
|
||||
case 0xd9:
|
||||
case 0xda:
|
||||
case 0xdb: {
|
||||
// str 8, 16, 32
|
||||
size_t size = read_size(s, code-0xd9);
|
||||
vstr_t vstr;
|
||||
vstr_init_len(&vstr, size);
|
||||
byte *p = (byte*)vstr.buf;
|
||||
read(s, p, size);
|
||||
return mp_obj_new_str_from_vstr(&mp_type_str, &vstr);
|
||||
}
|
||||
case 0xde:
|
||||
case 0xdf: {
|
||||
// map 16 & 32
|
||||
size_t len = read_size(s, code - 0xde + 1);
|
||||
mp_obj_dict_t *d = MP_OBJ_TO_PTR(mp_obj_new_dict(len));
|
||||
for (size_t i=0; i<len; i++) {
|
||||
mp_obj_dict_store(d, unpack(s, ext_hook, use_list), unpack(s, ext_hook, use_list));
|
||||
}
|
||||
return MP_OBJ_FROM_PTR(d);
|
||||
}
|
||||
case 0xdc:
|
||||
case 0xdd: {
|
||||
// array 16 & 32
|
||||
size_t size = read_size(s, code - 0xdc + 1);
|
||||
return unpack_array_elements(s, size, ext_hook, use_list);
|
||||
}
|
||||
case 0xd4: // fixenxt 1
|
||||
return unpack_ext(s, 1, ext_hook);
|
||||
case 0xd5: // fixenxt 2
|
||||
return unpack_ext(s, 2, ext_hook);
|
||||
case 0xd6: // fixenxt 4
|
||||
return unpack_ext(s, 4, ext_hook);
|
||||
case 0xd7: // fixenxt 8
|
||||
return unpack_ext(s, 8, ext_hook);
|
||||
case 0xd8: // fixenxt 16
|
||||
return unpack_ext(s, 16, ext_hook);
|
||||
case 0xc7: // ext 8
|
||||
case 0xc8: // ext 16
|
||||
case 0xc9:
|
||||
// ext 8, 16, 32
|
||||
return unpack_ext(s, read_size(s, code-0xc7), ext_hook);
|
||||
case 0xc1: // never used
|
||||
case 0xcb: // float 64
|
||||
case 0xcf: // uint 64
|
||||
case 0xd3: // int 64
|
||||
default:
|
||||
mp_raise_NotImplementedError(translate("64 bit types"));
|
||||
}
|
||||
}
|
||||
|
||||
void common_hal_msgpack_pack(mp_obj_t obj, mp_obj_t stream_obj, mp_obj_t default_handler) {
|
||||
msgpack_stream_t stream = get_stream(stream_obj, MP_STREAM_OP_WRITE);
|
||||
pack(obj, &stream, default_handler);
|
||||
}
|
||||
|
||||
mp_obj_t common_hal_msgpack_unpack(mp_obj_t stream_obj, mp_obj_t ext_hook, bool use_list) {
|
||||
msgpack_stream_t stream = get_stream(stream_obj, MP_STREAM_OP_WRITE);
|
||||
return unpack(&stream, ext_hook, use_list);
|
||||
}
|
34
shared-module/msgpack/__init__.h
Normal file
34
shared-module/msgpack/__init__.h
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#ifndef MICROPY_INCLUDED_SHARED_MODULE_MSGPACK___INIT___H
|
||||
#define MICROPY_INCLUDED_SHARED_MODULE_MSGPACK___INIT___H
|
||||
|
||||
#include "py/stream.h"
|
||||
|
||||
void common_hal_msgpack_pack(mp_obj_t obj, mp_obj_t stream_obj, mp_obj_t default_handler);
|
||||
mp_obj_t common_hal_msgpack_unpack(mp_obj_t stream_obj, mp_obj_t ext_hook, bool use_list);
|
||||
|
||||
#endif
|
@ -36,7 +36,7 @@
|
||||
void board_reset_user_neopixels(const mcu_pin_obj_t* pin, size_t count) {
|
||||
// Turn off on-board NeoPixel string
|
||||
uint8_t empty[count * 3];
|
||||
memset(empty, 0, count);
|
||||
memset(empty, 0, count * 3);
|
||||
digitalio_digitalinout_obj_t neopixel_pin;
|
||||
common_hal_digitalio_digitalinout_construct(&neopixel_pin, pin);
|
||||
common_hal_digitalio_digitalinout_switch_to_output(&neopixel_pin, false,
|
||||
|
@ -122,7 +122,12 @@ char* decompress(const compressed_string_t* compressed, char* decompressed) {
|
||||
return decompressed;
|
||||
}
|
||||
|
||||
inline __attribute__((always_inline)) const compressed_string_t* translate(const char* original) {
|
||||
inline
|
||||
// gcc10 -flto has issues with this being always_inline for debug builds.
|
||||
#if CIRCUITPY_DEBUG < 1
|
||||
__attribute__((always_inline))
|
||||
#endif
|
||||
const compressed_string_t* translate(const char* original) {
|
||||
#ifndef NO_QSTR
|
||||
#define QDEF(id, str)
|
||||
#define TRANSLATION(id, firstbyte, ...) if (strcmp(original, id) == 0) { static const compressed_string_t v = { .data = firstbyte, .tail = { __VA_ARGS__ } }; return &v; } else
|
||||
|
30
tests/extmod/umsgpack_pack.py
Normal file
30
tests/extmod/umsgpack_pack.py
Normal file
@ -0,0 +1,30 @@
|
||||
try:
|
||||
from uio import BytesIO
|
||||
import umsgpack as msgpack
|
||||
except:
|
||||
try:
|
||||
from io import BytesIO
|
||||
import msgpack
|
||||
except ImportError:
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
b = BytesIO()
|
||||
msgpack.pack(False, s)
|
||||
print(b.getvalue())
|
||||
|
||||
b = BytesIO()
|
||||
msgpack.pack({"a": (-1, 0, 2, [3, None], 128)}, b)
|
||||
print(b.getvalue())
|
||||
|
||||
# pack to a small-int not allowed
|
||||
try:
|
||||
msgpack.pack(123, 1)
|
||||
except (AttributeError, OSError): # CPython and uPy have different errors
|
||||
print('Exception')
|
||||
|
||||
# pack to an object not allowed
|
||||
try:
|
||||
msgpack.pack(123, {})
|
||||
except (AttributeError, OSError): # CPython and uPy have different errors
|
||||
print('Exception')
|
5
tests/extmod/umsgpack_pack.py.ext
Normal file
5
tests/extmod/umsgpack_pack.py.ext
Normal file
@ -0,0 +1,5 @@
|
||||
b'\xc2'
|
||||
b'\x82\xa1a\x96\xff\x00\x02\x92\x03\xc0\xd1\x00\x80\xc4\x07abcdefg\xa1b\xd4\x05x'
|
||||
Exception ExtType
|
||||
Exception to int
|
||||
Exception to object
|
Loading…
x
Reference in New Issue
Block a user