Commit Graph

25894 Commits

Author SHA1 Message Date
Kattni Rembor
a63af1d04a Update D13 to LED, add PWM example. 2021-10-28 13:30:51 -04:00
Jeff Epler
e733876574 dither in x/y, not i/j
The easiest thing to implement was to use the i/j numbers, but they were not
directly related to image x/y coordinates.  This may slow things down a tiny
little bit, but it looks much better.
2021-10-27 16:52:56 -05:00
Jeff Epler
ef4623dfae gifio: Add dithered output
It's not a great dither, but we're low on CPU time sooo
2021-10-27 10:54:31 -05:00
Jeff Epler
dc00226143 gifio: write block data directly into output buffer 2021-10-27 09:38:07 -05:00
Dan Halbert
a8b69f2852
Merge pull request #5518 from jepler/deleted-board-ci
account for deleted boards
2021-10-26 17:49:13 -04:00
Dan Halbert
62cd878e0c
Merge pull request #5517 from ladyada/main
add a nuuuuuboard
2021-10-26 17:48:44 -04:00
Dan Halbert
c61ab864da
Update ports/espressif/boards/adafruit_feather_esp32s2/board.c 2021-10-26 17:14:23 -04:00
Limor "Ladyada" Fried
037d893923
Update ports/espressif/boards/adafruit_feather_esp32s2/pins.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2021-10-26 15:55:18 -04:00
Limor "Ladyada" Fried
ccb6c5e5a9
Update ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2021-10-26 15:55:11 -04:00
Limor "Ladyada" Fried
5e59fa65ec
Update ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.mk
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2021-10-26 15:54:49 -04:00
Jeff Epler
b881aec4c5 disable gifio on meowbit 2021-10-26 14:24:11 -05:00
lady ada
613f314857 will delete later 2021-10-26 15:09:05 -04:00
Jeff Epler
30f3cf31e2 account for deleted boards 2021-10-26 14:06:07 -05:00
lady ada
ba4e9797c7 add a nuuuuuboard 2021-10-26 15:05:10 -04:00
Jeff Epler
7d6ac96001 GifWriter: improve efficiency
* Increase colorspace conversion efficiency.
   This not only avoids a function call, it avoids the time-consuming
   switch statement in conver_pixel (replacing it with a single
   conditional on the byteswap flag + accounting for BGR/RGB during
   palette creation)

 * Buffer all the bytes of a single frame together.  By reducing
   low level write calls we get a decent speed increase even though
   it increases data-shuffling a bit.

Together with some other changes that enable "double buffered" camera
capture, this gets me to 8.8fps capturing QVGA (320x240) gifs and
11fps capturing 240x240 square gifs.
2021-10-26 11:11:28 -05:00
Jeff Epler
3e020a73a8 Disable gifio if no displayio & for small boards
Technically all gifio needs from displayio is the definition of
colorspaces, but let's just disable it for now.
2021-10-26 08:54:18 -05:00
Jeff Epler
8c7760b1a6 don't include gifio on samd21 boards 2021-10-26 08:54:18 -05:00
Jeff Epler
081f636c17 Fix typing 2021-10-26 08:54:18 -05:00
Jeff Epler
b0203381db Update module list in test 2021-10-26 08:54:18 -05:00
Jeff Epler
c34b6f757f Implement gifio.GifWriter
This involves:
 * Adding a new "L8" colorspace for colorconverters
 * factoring out displayio_colorconverter_convert_pixel
 * Making a minimal "colorspace only" version of displayio for the
   unix port (testing purposes)
 * fixing an error message

I only tested writing B&W animated images, with the following script:
```python
import displayio
import gifio

with gifio.GifWriter("foo.gif", 64, 64, displayio.Colorspace.L8) as g:
    for i in range(0, 256, 14):
        data = bytes([i, 255-i] * 32 + [255-i, i] * 32) * 32
        print("add_frame")
        g.add_frame(data)

# expected to raise an error, buffer is not big enough
with gifio.GifWriter("/dev/null", 64, 64, displayio.Colorspace.L8) as g:
    g.add_frame(bytes([3,3,3]))
```
2021-10-26 08:54:18 -05:00
Jeff Epler
9da541ed2b
Merge pull request #5513 from weblate/weblate-circuitpython-main
Translations update from Weblate
2021-10-26 08:05:17 -05:00
Hosted Weblate
fb928b017f
Merge remote-tracking branch 'origin/main' 2021-10-26 14:46:40 +02:00
Dan Halbert
e868f1b1fe
Merge pull request #5510 from jepler/cmd25-v2
sdcardio: Use CMD25 across multiple writeblocks() calls
2021-10-26 08:46:28 -04:00
Hosted Weblate
67794e0b9d
Merge remote-tracking branch 'origin/main' 2021-10-25 23:54:32 +02:00
Jeff Epler
9dea5ec724
Merge pull request #5473 from microDev1/patch
Allow any character except / in port or board name
2021-10-25 16:54:27 -05:00
Jeff Epler
015bfb6e63
remove debug print 2021-10-25 16:52:23 -05:00
Hosted Weblate
e0460e03e0
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2021-10-25 23:42:22 +02:00
Scott Shawcroft
5315348b11
Merge pull request #5425 from maholli/samd-sleep
functioning samd deep sleep ('alarm.time' & 'alarm.pin')
2021-10-25 14:42:12 -07:00
Scott Shawcroft
e049db7c6f
Merge pull request #5508 from dhalbert/arg-fixes
Fix _bleio.start_advertising arg check; add doc to SocketPool.socket()
2021-10-25 14:11:44 -07:00
Scott Shawcroft
de45382599
Merge pull request #5504 from solderparty/rp2040_stamp
Add the Solder Party RP2040 Stamp board
2021-10-25 14:08:04 -07:00
Jeff Epler
d999a88e57 Drop Adafruit_CircuitPython_SD where sdcardio is enabled 2021-10-25 16:07:27 -05:00
Dan Halbert
7377375e8d
Merge pull request #5506 from maholli/nvm-toml-fix
NVM toml fix (MRAM)
2021-10-25 16:50:43 -04:00
Dan Halbert
644272ee8b
Merge pull request #5509 from DavePutz/issue_5469
Added reset of pulsein buffer pointer
2021-10-25 16:35:24 -04:00
Jeff Epler
f22299d2b3 sdcardio: Use CMD25 across multiple writeblocks() calls
This increases write rates (of gifio from #5490) from about 2.4fps to over
5fps by making more efficient use of the SD card protocol.

Because of details of oofatfs, it usually manages 64 writes in a single
CMD25, then two writes in a different area of the SD card (presumably,
filesystem metadata).  I couldn't find where to increase "64" to a higher
number. This may depend on the allocation size of the filesystem.

I tried preallocating too, but oddly it significantly lowered the write
rate.

Any trailing data is committed when the file is close()d, or when
the `sync` method of the SDCard object is called.
2021-10-25 10:59:28 -05:00
Jeff Epler
02182578ad sdcardio: Remove errant kwarg 2021-10-25 10:03:21 -05:00
Jeff Epler
3fb12fe289 Introduce SDCard.sync method, does nothing 2021-10-25 10:03:07 -05:00
Dan Halbert
c933f26543 Fix _bleio.start_advertising arg check; add doc to SocketPool.socket() 2021-10-25 08:43:57 -04:00
root
d2febfaf20 Added reset of pulsein buffer pointer 2021-10-24 20:46:18 -05:00
Limor "Ladyada" Fried
66e7dbea08
Merge pull request #5507 from jpconstantineau/pykey60-updates
PyKey60: added startup delay multiplier to help some hardware start up...
2021-10-24 18:57:47 -04:00
Max Holliday
339cf5ecf9 staying caught up with runtime changes 2021-10-24 15:49:14 -07:00
Max Holliday
e45fe3d778
Merge branch 'adafruit:main' into samd-sleep 2021-10-24 15:46:07 -07:00
Pierre Constantineau
3425bcc910 added startup delay multiplier 2021-10-24 14:20:07 -06:00
Max Holliday
adbff053ce fix QSPI_SINGLE pin definitions 2021-10-24 12:37:30 -07:00
Max Holliday
c999e2a329 add missing varriables to devices.h generator 2021-10-24 11:45:15 -07:00
arturo182
915275e5fd Add the Solder Party RP2040 Stamp board 2021-10-24 17:13:41 +02:00
Max Holliday
943f2b2085 remove interrupt_char.h 2021-10-23 09:01:40 -07:00
microDev
210ce1d1dc
Merge pull request #5499 from weblate/weblate-circuitpython-main
Translations update from Weblate
2021-10-23 17:46:50 +05:30
Hosted Weblate
b4324f48db
Merge remote-tracking branch 'origin/main' 2021-10-23 14:16:15 +02:00
microDev
1e52cc6043
Merge pull request #5497 from jpconstantineau/pykey60-updates
Pykey60 updates: Add Neopixel to board config
2021-10-23 17:46:00 +05:30
Jonny Bergdahl
39f62aaae5
Translated using Weblate (Swedish)
Currently translated at 100.0% (1007 of 1007 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2021-10-23 09:37:02 +02:00