Commit Graph

1749 Commits

Author SHA1 Message Date
Kenny
17b53c7ebe vectorio: Add width and height properties to rectangle
Closes: https://github.com/adafruit/circuitpython/issues/5695
2021-12-12 19:50:00 -08:00
Hosted Weblate
ea92303b0f
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-12-06 19:47:17 +01:00
Jeff Epler
40d947cee3
Merge pull request #5655 from jepler/esp32s3-devkitc
Espressif: Add Esp32s3 devkitc board definitions
2021-12-06 12:47:04 -06:00
Clay
d6665e2a59
Translated using Weblate (Russian)
Currently translated at 35.8% (369 of 1028 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ru/
2021-12-04 13:51:53 +01:00
Jeff Epler
659babc620 Add the esp32s3 devkitc (psram variant) 2021-12-03 15:09:59 -06:00
Clay
e4285e2cca
Translated using Weblate (Russian)
Currently translated at 35.6% (366 of 1028 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ru/
2021-11-29 13:53:42 +01:00
Maxime Leroy
fbe58518f8
Translated using Weblate (French)
Currently translated at 99.9% (1027 of 1028 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/
2021-11-26 14:46:49 +01:00
Hosted Weblate
6111b158ff
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-11-25 01:02:32 +01:00
Hosted Weblate
59962b55bd
Merge remote-tracking branch 'origin/main' 2021-11-25 01:02:29 +01:00
Jonny Bergdahl
3802362e14
Translated using Weblate (Swedish)
Currently translated at 100.0% (1028 of 1028 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2021-11-25 01:02:29 +01:00
Wellington Terumi Uemura
7dca46b0b4
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1028 of 1028 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2021-11-25 00:51:17 +01:00
Scott Shawcroft
ee5536386d
Merge remote-tracking branch 'adafruit/main' into rpi 2021-11-24 14:23:23 -08:00
Hosted Weblate
726ebdf43b
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-11-24 20:42:00 +01:00
Hosted Weblate
6db3161548
Merge remote-tracking branch 'origin/main' 2021-11-24 20:41:57 +01:00
Timon
a1052d5f73
Initial broadcom port for Raspberry Pi
This targets the 64-bit CPU Raspberry Pis. The BCM2711 on the Pi 4
and the BCM2837 on the Pi 3 and Zero 2W. There are 64-bit fixes
outside of the ports directory for it.

There are a couple other cleanups that were incidental:
* Use const mcu_pin_obj_t instead of omitting the const. The structs
  themselves are const because they are in ROM.
* Use PTR <-> OBJ conversions in more places. They were found when
  mp_obj_t was set to an integer type rather than pointer.
* Optimize submodule checkout because the Pi submodules are heavy
  and unnecessary for the vast majority of builds.

Fixes #4314
2021-11-22 14:54:44 -08:00
gamblor21
5243a33584 Check map to display size 2021-11-20 14:04:49 -06:00
gamblor21
6b2d43d3c8 Mapping for LEDs to diplay 2021-11-20 14:04:49 -06:00
Clay
c927dd1ddf
Translated using Weblate (Russian)
Currently translated at 35.1% (361 of 1026 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ru/
2021-11-19 13:53:13 +01:00
Jonny Bergdahl
07317e3807
Translated using Weblate (Swedish)
Currently translated at 100.0% (1026 of 1026 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2021-11-19 13:53:12 +01:00
Wellington Terumi Uemura
51c28f67ca
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1026 of 1026 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2021-11-19 13:53:12 +01:00
Hosted Weblate
9dff70adb2
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-11-17 19:26:47 +01:00
Hosted Weblate
6296a73aa9
Merge remote-tracking branch 'origin/main' 2021-11-17 19:26:45 +01:00
Clay
a51bfdf88a
Translated using Weblate (Russian)
Currently translated at 31.7% (326 of 1026 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ru/
2021-11-17 19:26:44 +01:00
Wellington Terumi Uemura
3871926e44
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1026 of 1026 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2021-11-17 19:26:42 +01:00
Scott Shawcroft
3b7d2f1dc3
Merge pull request #5593 from anecdata/ap_extras
Set AP MAC address
2021-11-17 10:26:36 -08:00
anecdata
193e936807 like #5571, but for AP 2021-11-16 12:21:50 -06:00
Clay
e39c874db4
Translated using Weblate (Russian)
Currently translated at 10.8% (111 of 1026 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ru/
2021-11-16 14:32:16 +01:00
Jonny Bergdahl
295ba8c48e
Translated using Weblate (Swedish)
Currently translated at 100.0% (1026 of 1026 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2021-11-16 14:32:15 +01:00
Hosted Weblate
5d8acca777
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-11-16 02:34:03 +01:00
Hosted Weblate
924769c2ee
Merge remote-tracking branch 'origin/main' 2021-11-16 02:34:00 +01:00
River Wang
1b20580640
Translated using Weblate (Chinese (Pinyin))
Currently translated at 99.4% (1016 of 1022 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/
2021-11-16 02:34:00 +01:00
Dan Halbert
bd22667eb5
Merge pull request #5571 from anecdata/set_mac
Set Station MAC address & validate connect SSID len
2021-11-15 20:33:54 -05:00
River Wang
ca6dbf8fc9
Translated using Weblate (Chinese (Pinyin))
Currently translated at 99.6% (1018 of 1022 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/
2021-11-15 19:21:38 +01:00
Wellington Terumi Uemura
c450fcd48d
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1022 of 1022 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2021-11-15 19:21:37 +01:00
Maxime Leroy
3ffd738461
Translated using Weblate (French)
Currently translated at 98.8% (1010 of 1022 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/
2021-11-15 19:21:36 +01:00
Scott Shawcroft
e1767bbe76
Added translation using Weblate (Russian) 2021-11-15 19:06:20 +01:00
microDev
7a89f62e6a
update translation 2021-11-15 20:58:50 +05:30
microDev
733bfbc10a
Merge branch 'main' into set_mac 2021-11-15 20:44:30 +05:30
anecdata
31d45a3f32 fix old bug that was masking new bug 2021-11-12 16:27:13 -06:00
River Wang
839db7791f
Translated using Weblate (Chinese (Pinyin))
Currently translated at 99.9% (1021 of 1022 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/
2021-11-12 19:46:06 +01:00
Paul Leung
8871338f53
Translated using Weblate (Chinese (Pinyin))
Currently translated at 99.9% (1021 of 1022 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/
2021-11-12 19:46:06 +01:00
anecdata
e4f06f69cd maybe fewer bytes 2021-11-11 23:23:52 -06:00
anecdata
bb8e9ef483 tweak exception messages (re-tested) 2021-11-11 21:54:41 -06:00
anecdata
85301cb0e5 fix typo 2021-11-11 17:26:07 -06:00
anecdata
18f2019300 Set Station MAC address & validate connect SSID len 2021-11-11 17:04:35 -06:00
Hosted Weblate
90d5a90567
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-11-11 19:10:47 +01:00
Hosted Weblate
e471217a00
Merge remote-tracking branch 'origin/main' 2021-11-11 19:10:45 +01:00
Jonny Bergdahl
e8e7e0a66e
Translated using Weblate (Swedish)
Currently translated at 100.0% (1020 of 1020 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2021-11-11 19:10:44 +01:00
Scott Shawcroft
c1177662cd
Merge pull request #5537 from microDev1/monitor-mode
Add Monitor Mode
2021-11-11 10:10:39 -08:00
Wellington Terumi Uemura
fea781207b
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1020 of 1020 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2021-11-10 10:53:31 +01:00
Hosted Weblate
2ce13c8c7b
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-11-09 18:54:04 +01:00
Hosted Weblate
dc6bf3890b
Merge remote-tracking branch 'origin/main' 2021-11-09 18:54:02 +01:00
Jonny Bergdahl
77cb2a15d0
Translated using Weblate (Swedish)
Currently translated at 100.0% (1015 of 1015 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2021-11-09 18:54:02 +01:00
Wellington Terumi Uemura
cba6a684bc
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1015 of 1015 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2021-11-09 18:54:01 +01:00
Scott Shawcroft
05b9ba82aa
Merge pull request #5558 from jepler/dither3
Implement dithering
2021-11-09 09:53:52 -08:00
Jeff Epler
cbfa41f238 Merge remote-tracking branch 'origin/main' into dither3 2021-11-08 16:46:36 -06:00
Hosted Weblate
e119c88600
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-11-08 19:50:11 +01:00
Hosted Weblate
df7a39c7d2
Merge remote-tracking branch 'origin/main' 2021-11-08 19:50:09 +01:00
Reza Almanda
13d05aa229
Translated using Weblate (Indonesian)
Currently translated at 44.3% (448 of 1011 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/id/
2021-11-08 19:50:09 +01:00
Scott Shawcroft
bb71f8c9b3
Merge pull request #5544 from jepler/alphablend
bitmaptools: add alphablend
2021-11-08 10:50:03 -08:00
Jeff Epler
eaf8bc0abe bitmaptools: add dither
This can convert a BGR565_SWAPPED bitmap to B&W in about 82ms on
esp32-s2.
2021-11-08 10:35:44 -06:00
Wellington Terumi Uemura
f1ea57e032
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1011 of 1011 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2021-11-07 17:53:21 +01:00
Jonny Bergdahl
a555475e65
Translated using Weblate (Swedish)
Currently translated at 100.0% (1011 of 1011 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2021-11-05 19:37:42 +01:00
Jeff Epler
8e8c44afea Merge remote-tracking branch 'origin/main' into alphablend 2021-11-05 11:24:51 -05:00
Hosted Weblate
4ed1249927
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-11-05 16:24:32 +01:00
Scott Shawcroft
c27b3a0e4f
Merge pull request #5490 from jepler/gifio
Implement gifio.GifWriter
2021-11-05 08:24:24 -07:00
Jeff Epler
2ec2761ce0 bitmaptools: add alphablend
This blends two "565"-format bitmaps, including byteswapped ones. All
the bitmaps have to have the same memory format.

The routine takes about 63ms on a Kaluga when operating on 320x240 bitmaps.
Of course, displaying the bitmap also takes time.

There's untested code for the L8 (8-bit greyscale) case. This can be
enabled once gifio is merged.
2021-11-05 08:16:48 -05:00
hexthat
f7ba0d23de
Translated using Weblate (Chinese (Pinyin))
Currently translated at 100.0% (1010 of 1010 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/
2021-11-05 05:07:54 +01:00
Jonny Bergdahl
9db5d57e50
Translated using Weblate (Swedish)
Currently translated at 100.0% (1010 of 1010 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2021-11-05 05:07:53 +01:00
Wellington Terumi Uemura
6d7e6dfabd
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1010 of 1010 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2021-11-05 05:07:53 +01:00
Jeff Epler
334a9c85ce Merge remote-tracking branch 'origin/main' into gifio 2021-11-04 20:22:00 -05:00
Hosted Weblate
7f9fa8c201
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-11-04 21:33:40 +01:00
Jeff Epler
a8614a61dc ParallelImageCapture: Add continuous capture on espressif
By having a pair of buffers, the capture hardware can fill one buffer while
Python code (including displayio, etc) operates on the other buffer.  This
increases the responsiveness of camera-using code.

On the Kaluga it makes the following improvements:
 * 320x240 viewfinder at 30fps instead of 15fps using directio
 * 240x240 animated gif capture at 10fps instead of 7.5fps

As discussed at length on Discord, the "usual end user" code will look like
this:

    camera = ...

    with camera.continuous_capture(buffer1, buffer2) as capture:
        for frame in capture:
            # Do something with frame

However, rather than presenting a context manager, the core code consists of
three new functions to start & stop continuous capture, and to get the next
frame.  The reason is twofold.  First, it's simply easier to implement the
context manager object in pure Python.  Second, for more advanced usage, the
context manager may be too limiting, and it's easier to iterate on the right
design in Python code.  In particular, I noticed that adapting the
JPEG-capturing programs to use continuous capture mode needed a change in
program structure.

The camera app was structured as
```python
while True:
    if shutter button was just pressed:
        capture a jpeg frame
    else:
        update the viewfinder
```

However, "capture a jpeg frame" needs to (A) switch the camera settings and (B)
capture into a different, larger buffer then (C) return to the earlier
settings. This can't be done during continuous capture mode. So just
restructuring it as follows isn't going to work:

```python
with camera.continuous_capture(buffer1, buffer2) as capture:
    for frame in capture:
        if shutter button was just pressed:
            capture a jpeg frame, without disturbing continuous capture mode
        else:
            update the viewfinder
```

The continuous mode is only implemented in the espressif port; others
will throw an exception if the associated methods are invoked.  It's not
impossible to implement there, just not a priority, since these micros don't
have enough RAM for two framebuffer copies at any resonable sizes.

The capture code, including single-shot capture, now take mp_obj_t in the
common-hal layer, instead of a buffer & length.  This was done for the
continuous capture mode because it has to identify & return to the user the
proper Python object representing the original buffer.  In the Espressif port,
it was convenient to implement single capture in terms of a multi-capture,
which is why I changed the singleshot routine's signature too.
2021-11-03 11:02:46 -05:00
microDev
27b137f931
Merge branch 'main' into monitor-mode 2021-11-02 13:56:56 +05:30
microDev
95172cf3ce
add monitor class
Co-authored-by: anecdata <16617689+anecdata@users.noreply.github.com>
2021-11-02 12:32:09 +05:30
Hosted Weblate
b26e6a04c5
Merge remote-tracking branch 'origin/main' 2021-10-31 12:37:11 +01:00
hexthat
ef95ff3fa5
Translated using Weblate (Chinese (Pinyin))
Currently translated at 100.0% (1007 of 1007 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/
2021-10-31 12:37:11 +01:00
Senuros
409092b180 several more german translations added 2021-10-31 06:17:31 +01:00
Senuros
7734e85eeb Added some german translations 2021-10-29 17:55:23 +02: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
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
Max Holliday
e45fe3d778
Merge branch 'adafruit:main' into samd-sleep 2021-10-24 15:46:07 -07:00
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
Wellington Terumi Uemura
77bc2bae45
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1007 of 1007 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2021-10-23 09:37:02 +02:00
Max Holliday
f7ba711ec6
Merge branch 'adafruit:main' into samd-sleep 2021-10-22 14:56:44 -07:00
Hosted Weblate
f53cb19958
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-22 01:43:30 +02:00
Kattni Rembor
2c15f5439b Update help() to have circuitpython.org 2021-10-21 18:07:07 -04:00
Max Holliday
e74a8e38fe
Merge branch 'adafruit:main' into samd-sleep 2021-10-21 09:52:55 -07:00
Jonny Bergdahl
95e4902468
Translated using Weblate (Swedish)
Currently translated at 100.0% (1008 of 1008 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2021-10-20 09:36:08 +02:00
Wellington Terumi Uemura
2f22498263
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1008 of 1008 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2021-10-20 09:36:08 +02:00
Hosted Weblate
0658e31645
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-19 00:56:41 +02:00
Hosted Weblate
fdb0522c3c
Merge remote-tracking branch 'origin/main' 2021-10-19 00:56:38 +02:00
Jonny Bergdahl
a3050d1f1e
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-19 00:56:38 +02:00
Scott Shawcroft
dc4e5cb33b
Merge pull request #5481 from dhalbert/hid-boot-protocol
HID Boot device support; HID feature report support
2021-10-18 15:56:30 -07:00
Dan Halbert
fa96ea1f72 Merge remote-tracking branch 'adafruit/main' into hid-boot-protocol 2021-10-18 15:30:24 -04:00
Hosted Weblate
f44fec8282
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-18 14:14:04 +02:00
Dan Halbert
00aeb6b9d0
Merge pull request #5468 from jepler/encoder-divisor
rotaryio: Add the ability to set the divisor
2021-10-18 08:13:56 -04:00
Jonny Bergdahl
a4ff69becf
Translated using Weblate (Swedish)
Currently translated at 100.0% (1006 of 1006 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2021-10-17 16:36:50 +02:00
Wellington Terumi Uemura
207db45028
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1006 of 1006 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2021-10-17 16:36:49 +02:00
Jeff Epler
9eebb3dbab rotaryio: Add the ability to set the divisor
At present, Adafruit's rotary encoders all move 1 quadrature cycle per
detent, so we originally hard-coded division-by-4.  However, other
encoders exist, including ones without detents, ones with 2 detents per
cycle, and others with 4 detents per cycle.

The new `divisor` property and constructor argument allows selecting
a divisor of 1, 2, or 4; with the default of 4 giving backward
compatibility.

The property is not supported (yet?) on espressif MCUs; it throws an
error if a value other than 4 is set.
2021-10-16 09:43:45 -05:00