Skip to content

Commit de9ea47

Browse files
authored
Merge branch 'main' into color-converter-transparency
2 parents 3370196 + 9de9678 commit de9ea47

File tree

90 files changed

+2142
-1197
lines changed

Some content is hidden

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

90 files changed

+2142
-1197
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: CircuitPython version
2929
run: |
3030
git describe --dirty --tags
31-
echo "::set-env name=CP_VERSION::$(git describe --dirty --tags)"
31+
echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)
3232
- name: Set up Python 3.8
3333
uses: actions/setup-python@v1
3434
with:
@@ -132,7 +132,7 @@ jobs:
132132
- name: Install dependencies
133133
run: |
134134
brew install gettext awscli
135-
echo "::set-env name=PATH::/usr/local/opt/gettext/bin:$PATH"
135+
echo >>$GITHUB_PATH /usr/local/opt/gettext/bin
136136
- name: Versions
137137
run: |
138138
gcc --version
@@ -146,7 +146,7 @@ jobs:
146146
- name: CircuitPython version
147147
run: |
148148
git describe --dirty --tags
149-
echo "::set-env name=CP_VERSION::$(git describe --dirty --tags)"
149+
echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)
150150
- name: Build mpy-cross
151151
run: make -C mpy-cross -j2
152152
- uses: actions/upload-artifact@v2
@@ -243,6 +243,7 @@ jobs:
243243
- "metro_m0_express"
244244
- "metro_m4_airlift_lite"
245245
- "metro_m4_express"
246+
- "metro_m7_1011"
246247
- "metro_nrf52840_express"
247248
- "mini_sam_m4"
248249
- "monster_m4sk"

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v1
1717
- uses: actions/setup-python@v1
1818
- name: set PY
19-
run: echo "::set-env name=PY::$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
19+
run: echo >>$GITHUB_ENV PY="$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
2020
- uses: actions/cache@v1
2121
with:
2222
path: ~/.cache/pre-commit

extmod/vfs_fat_diskio.c

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ DRESULT disk_write (
123123

124124
DRESULT disk_ioctl (
125125
bdev_t pdrv, /* Physical drive nmuber (0..) */
126-
BYTE cmd, /* Control code */
126+
BYTE cmd, /* Control code */
127127
void *buff /* Buffer to send/receive control data */
128128
)
129129
{
@@ -133,7 +133,7 @@ DRESULT disk_ioctl (
133133
}
134134

135135
// First part: call the relevant method of the underlying block device
136-
mp_obj_t ret = mp_const_none;
136+
mp_int_t out_value = 0;
137137
if (vfs->flags & FSUSER_HAVE_IOCTL) {
138138
// new protocol with ioctl
139139
static const uint8_t op_map[8] = {
@@ -144,9 +144,19 @@ DRESULT disk_ioctl (
144144
};
145145
uint8_t bp_op = op_map[cmd & 7];
146146
if (bp_op != 0) {
147-
vfs->u.ioctl[2] = MP_OBJ_NEW_SMALL_INT(bp_op);
148-
vfs->u.ioctl[3] = MP_OBJ_NEW_SMALL_INT(0); // unused
149-
ret = mp_call_method_n_kw(2, 0, vfs->u.ioctl);
147+
if (vfs->flags & FSUSER_NATIVE) {
148+
bool (*f)(size_t, mp_int_t*) = (void*)(uintptr_t)vfs->u.ioctl[2];
149+
if (!f(bp_op, (mp_int_t*) &out_value)) {
150+
return RES_ERROR;
151+
}
152+
} else {
153+
vfs->u.ioctl[2] = MP_OBJ_NEW_SMALL_INT(bp_op);
154+
vfs->u.ioctl[3] = MP_OBJ_NEW_SMALL_INT(0); // unused
155+
mp_obj_t ret = mp_call_method_n_kw(2, 0, vfs->u.ioctl);
156+
if (ret != mp_const_none) {
157+
out_value = mp_obj_get_int(ret);
158+
}
159+
}
150160
}
151161
} else {
152162
// old protocol with sync and count
@@ -157,10 +167,13 @@ DRESULT disk_ioctl (
157167
}
158168
break;
159169

160-
case GET_SECTOR_COUNT:
161-
ret = mp_call_method_n_kw(0, 0, vfs->u.old.count);
170+
case GET_SECTOR_COUNT: {
171+
mp_obj_t ret = mp_call_method_n_kw(0, 0, vfs->u.old.count);
172+
if (ret != mp_const_none) {
173+
out_value = mp_obj_get_int(ret);
174+
}
162175
break;
163-
176+
}
164177
case GET_SECTOR_SIZE:
165178
// old protocol has fixed sector size of 512 bytes
166179
break;
@@ -177,16 +190,16 @@ DRESULT disk_ioctl (
177190
return RES_OK;
178191

179192
case GET_SECTOR_COUNT: {
180-
*((DWORD*)buff) = mp_obj_get_int(ret);
193+
*((DWORD*)buff) = out_value;
181194
return RES_OK;
182195
}
183196

184197
case GET_SECTOR_SIZE: {
185-
if (ret == mp_const_none) {
198+
if (out_value == 0) {
186199
// Default sector size
187200
*((WORD*)buff) = 512;
188201
} else {
189-
*((WORD*)buff) = mp_obj_get_int(ret);
202+
*((WORD*)buff) = out_value;
190203
}
191204
#if _MAX_SS != _MIN_SS
192205
// need to store ssize because we use it in disk_read/disk_write
@@ -202,7 +215,7 @@ DRESULT disk_ioctl (
202215
case IOCTL_INIT:
203216
case IOCTL_STATUS: {
204217
DSTATUS stat;
205-
if (ret != mp_const_none && MP_OBJ_SMALL_INT_VALUE(ret) != 0) {
218+
if (out_value != 0) {
206219
// error initialising
207220
stat = STA_NOINIT;
208221
} else if (vfs->writeblocks[0] == MP_OBJ_NULL) {

locale/ID.po

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ msgid ""
55
msgstr ""
66
"Project-Id-Version: PACKAGE VERSION\n"
77
"Report-Msgid-Bugs-To: \n"
8-
"POT-Creation-Date: 2020-09-29 20:14-0500\n"
9-
"PO-Revision-Date: 2020-10-08 16:22+0000\n"
8+
"POT-Creation-Date: 2020-10-06 13:26-0400\n"
9+
"PO-Revision-Date: 2020-10-10 23:51+0000\n"
1010
"Last-Translator: oon arfiandwi <[email protected]>\n"
1111
"Language-Team: LANGUAGE <[email protected]>\n"
1212
"Language: ID\n"
@@ -275,6 +275,10 @@ msgstr "pow() 3-arg tidak didukung"
275275
msgid "A hardware interrupt channel is already in use"
276276
msgstr "Sebuah channel hardware interrupt sedang digunakan"
277277

278+
#: ports/esp32s2/common-hal/analogio/AnalogIn.c
279+
msgid "ADC2 is being used by WiFi"
280+
msgstr ""
281+
278282
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
279283
#, c-format
280284
msgid "Address must be %d bytes long"
@@ -1246,6 +1250,7 @@ msgid "No CCCD for this Characteristic"
12461250
msgstr "Tidak ada CCCD untuk Karakteristik ini"
12471251

12481252
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
1253+
#: ports/esp32s2/common-hal/analogio/AnalogOut.c
12491254
#: ports/stm/common-hal/analogio/AnalogOut.c
12501255
msgid "No DAC on chip"
12511256
msgstr "Tidak ada DAC (Digital Analog Converter) di dalam chip"
@@ -1450,6 +1455,7 @@ msgstr "Izin ditolak"
14501455

14511456
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
14521457
#: ports/cxd56/common-hal/analogio/AnalogIn.c
1458+
#: ports/esp32s2/common-hal/analogio/AnalogIn.c
14531459
#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
14541460
#: ports/nrf/common-hal/analogio/AnalogIn.c
14551461
#: ports/stm/common-hal/analogio/AnalogIn.c
@@ -1606,15 +1612,15 @@ msgstr ""
16061612

16071613
#: ports/stm/common-hal/busio/SPI.c
16081614
msgid "SPI Init Error"
1609-
msgstr ""
1615+
msgstr "Kesalahan Init SPI"
16101616

16111617
#: ports/stm/common-hal/busio/SPI.c
16121618
msgid "SPI Re-initialization error"
1613-
msgstr ""
1619+
msgstr "Kesalahan Inisialisasi ulang SPI"
16141620

16151621
#: shared-bindings/audiomixer/Mixer.c
16161622
msgid "Sample rate must be positive"
1617-
msgstr ""
1623+
msgstr "Tingkat sampel harus positif"
16181624

16191625
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
16201626
#, c-format
@@ -1623,15 +1629,15 @@ msgstr "Nilai sampel terlalu tinggi. Nilai harus kurang dari %d"
16231629

16241630
#: ports/nrf/common-hal/_bleio/Adapter.c
16251631
msgid "Scan already in progess. Stop with stop_scan."
1626-
msgstr ""
1632+
msgstr "Pindai sudah dalam proses. Hentikan dengan stop_scan."
16271633

16281634
#: ports/mimxrt10xx/common-hal/busio/UART.c
16291635
msgid "Selected CTS pin not valid"
1630-
msgstr ""
1636+
msgstr "Pin CTS yang dipilih tidak valid"
16311637

16321638
#: ports/mimxrt10xx/common-hal/busio/UART.c
16331639
msgid "Selected RTS pin not valid"
1634-
msgstr ""
1640+
msgstr "Pin RTS yang dipilih tidak valid"
16351641

16361642
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
16371643
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
@@ -1648,58 +1654,62 @@ msgstr ""
16481654

16491655
#: shared-bindings/nvm/ByteArray.c
16501656
msgid "Slice and value different lengths."
1651-
msgstr ""
1657+
msgstr "Potongan dan nilai panjangnya berbeda."
16521658

16531659
#: shared-bindings/displayio/Bitmap.c shared-bindings/displayio/Group.c
16541660
#: shared-bindings/displayio/TileGrid.c
16551661
#: shared-bindings/memorymonitor/AllocationSize.c
16561662
#: shared-bindings/pulseio/PulseIn.c
16571663
msgid "Slices not supported"
1658-
msgstr ""
1664+
msgstr "Potongan tidak didukung"
16591665

16601666
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
16611667
msgid "SocketPool can only be used with wifi.radio"
16621668
msgstr ""
16631669

16641670
#: shared-bindings/aesio/aes.c
16651671
msgid "Source and destination buffers must be the same length"
1666-
msgstr ""
1672+
msgstr "Buffer sumber dan tujuan harus memiliki panjang yang sama"
16671673

16681674
#: extmod/modure.c
16691675
msgid "Splitting with sub-captures"
16701676
msgstr "Memisahkan dengan menggunakan sub-captures"
16711677

16721678
#: shared-bindings/supervisor/__init__.c
16731679
msgid "Stack size must be at least 256"
1674-
msgstr ""
1680+
msgstr "Ukuran stack minimal harus 256"
16751681

16761682
#: shared-bindings/multiterminal/__init__.c
16771683
msgid "Stream missing readinto() or write() method."
1678-
msgstr ""
1684+
msgstr "Aliran tidak menemukan metode readinto() atau write()."
16791685

16801686
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
16811687
msgid "Supply at least one UART pin"
1682-
msgstr ""
1688+
msgstr "Berikan setidaknya satu pin UART"
16831689

16841690
#: shared-bindings/gnss/GNSS.c
16851691
msgid "System entry must be gnss.SatelliteSystem"
16861692
msgstr ""
16871693

16881694
#: ports/stm/common-hal/microcontroller/Processor.c
16891695
msgid "Temperature read timed out"
1690-
msgstr ""
1696+
msgstr "Waktu baca suhu habis"
16911697

16921698
#: supervisor/shared/safe_mode.c
16931699
msgid ""
16941700
"The CircuitPython heap was corrupted because the stack was too small.\n"
16951701
"Please increase the stack size if you know how, or if not:"
16961702
msgstr ""
1703+
"heap dari CircuitPython rusak karena stack terlalu kecil.\n"
1704+
"Harap tambah ukuran stack jika Anda tahu caranya, atau jika tidak:"
16971705

16981706
#: supervisor/shared/safe_mode.c
16991707
msgid ""
17001708
"The `microcontroller` module was used to boot into safe mode. Press reset to "
17011709
"exit safe mode.\n"
17021710
msgstr ""
1711+
"Modul `microcontroller` digunakan untukboot ke mode aman. Tekan reset untuk "
1712+
"keluar dari mode aman.\n"
17031713

17041714
#: shared-bindings/rgbmatrix/RGBMatrix.c
17051715
msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30"
@@ -3188,13 +3198,15 @@ msgstr ""
31883198
msgid "pow() with 3 arguments requires integers"
31893199
msgstr ""
31903200

3201+
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
31913202
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
31923203
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
31933204
#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h
31943205
#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h
31953206
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
31963207
#: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h
31973208
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
3209+
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
31983210
msgid "pressing boot button at start up.\n"
31993211
msgstr ""
32003212

locale/circuitpython.pot

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,10 @@ msgstr ""
246246
msgid "'return' outside function"
247247
msgstr ""
248248

249+
#: py/compile.c
250+
msgid "'yield from' inside async function"
251+
msgstr ""
252+
249253
#: py/compile.c
250254
msgid "'yield' outside function"
251255
msgstr ""
@@ -271,6 +275,10 @@ msgstr ""
271275
msgid "A hardware interrupt channel is already in use"
272276
msgstr ""
273277

278+
#: ports/esp32s2/common-hal/analogio/AnalogIn.c
279+
msgid "ADC2 is being used by WiFi"
280+
msgstr ""
281+
274282
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
275283
#, c-format
276284
msgid "Address must be %d bytes long"
@@ -1229,6 +1237,7 @@ msgid "No CCCD for this Characteristic"
12291237
msgstr ""
12301238

12311239
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
1240+
#: ports/esp32s2/common-hal/analogio/AnalogOut.c
12321241
#: ports/stm/common-hal/analogio/AnalogOut.c
12331242
msgid "No DAC on chip"
12341243
msgstr ""
@@ -1425,6 +1434,7 @@ msgstr ""
14251434

14261435
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
14271436
#: ports/cxd56/common-hal/analogio/AnalogIn.c
1437+
#: ports/esp32s2/common-hal/analogio/AnalogIn.c
14281438
#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
14291439
#: ports/nrf/common-hal/analogio/AnalogIn.c
14301440
#: ports/stm/common-hal/analogio/AnalogIn.c
@@ -3436,6 +3446,10 @@ msgstr ""
34363446
msgid "type object '%q' has no attribute '%q'"
34373447
msgstr ""
34383448

3449+
#: py/objgenerator.c
3450+
msgid "type object 'generator' has no attribute '__await__'"
3451+
msgstr ""
3452+
34393453
#: py/objtype.c
34403454
msgid "type takes 1 or 3 arguments"
34413455
msgstr ""

locale/cs.po

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ msgid ""
55
msgstr ""
66
"Project-Id-Version: PACKAGE VERSION\n"
77
"Report-Msgid-Bugs-To: \n"
8-
"POT-Creation-Date: 2020-09-29 20:14-0500\n"
8+
"POT-Creation-Date: 2020-10-06 13:26-0400\n"
99
"PO-Revision-Date: 2020-05-24 03:22+0000\n"
1010
"Last-Translator: dronecz <[email protected]>\n"
1111
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -275,6 +275,10 @@ msgstr ""
275275
msgid "A hardware interrupt channel is already in use"
276276
msgstr ""
277277

278+
#: ports/esp32s2/common-hal/analogio/AnalogIn.c
279+
msgid "ADC2 is being used by WiFi"
280+
msgstr ""
281+
278282
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
279283
#, c-format
280284
msgid "Address must be %d bytes long"
@@ -1229,6 +1233,7 @@ msgid "No CCCD for this Characteristic"
12291233
msgstr ""
12301234

12311235
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
1236+
#: ports/esp32s2/common-hal/analogio/AnalogOut.c
12321237
#: ports/stm/common-hal/analogio/AnalogOut.c
12331238
msgid "No DAC on chip"
12341239
msgstr ""
@@ -1425,6 +1430,7 @@ msgstr ""
14251430

14261431
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
14271432
#: ports/cxd56/common-hal/analogio/AnalogIn.c
1433+
#: ports/esp32s2/common-hal/analogio/AnalogIn.c
14281434
#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
14291435
#: ports/nrf/common-hal/analogio/AnalogIn.c
14301436
#: ports/stm/common-hal/analogio/AnalogIn.c
@@ -3148,13 +3154,15 @@ msgstr ""
31483154
msgid "pow() with 3 arguments requires integers"
31493155
msgstr ""
31503156

3157+
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
31513158
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
31523159
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
31533160
#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h
31543161
#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h
31553162
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
31563163
#: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h
31573164
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
3165+
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
31583166
msgid "pressing boot button at start up.\n"
31593167
msgstr ""
31603168

0 commit comments

Comments
 (0)