Commit Graph

26006 Commits

Author SHA1 Message Date
Jeff Epler 6790f95953 Fix disabling of FRAMEBUFFERIO on atmel-samd
.. this needs to imply the disabling of RGBMATRIX too
2021-11-05 15:19:01 -05:00
Jeff Epler 4f62b540a2 Disable bitmaptools on thunderpack_v11 2021-11-05 15:18:41 -05:00
Hosted Weblate 0e086678e1
Merge remote-tracking branch 'origin/main' 2021-11-05 19:40:04 +01:00
Dan Halbert 49207fba2c
Merge pull request #5549 from jepler/samd-watchdog-rounding
atmel-samd: Fix converting watchdog seconds to cycles
2021-11-05 14:39:59 -04:00
Hosted Weblate 2681fa3975
Merge remote-tracking branch 'origin/main' 2021-11-05 19:37:43 +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
Dan Halbert 11e37b7512
Merge pull request #5550 from ladyada/main
add KB2040 and fix Trinkey QT2040 pid
2021-11-05 14:37:33 -04:00
lady ada 02573676e7 add KB2040 and fix Trinkey QT2040 pid 2021-11-05 12:43:44 -04:00
Jeff Epler 43b593725b atmel-samd: Fix converting watchdog seconds to cycles
It's intended that the actual timeout always be at least the requested
timeout.  However, due to multiplying by the wrong factor to get from
seconds to cycles, a timeout request of e.g., 8.1s (which is less than
8.192s) would give an actual timeout of 8, not 16 as it should.
2021-11-05 11:40:08 -05:00
Jeff Epler dfafab675f Enable L8 mode for alphablend 2021-11-05 11:26:07 -05:00
Jeff Epler 8e8c44afea Merge remote-tracking branch 'origin/main' into alphablend 2021-11-05 11:24:51 -05:00
Jeff Epler d532ad388b disable framebufferio so bitmaptools can fit 2021-11-05 11:24:03 -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
Jeff Epler 102af55e0a
Merge pull request #5542 from weblate/weblate-circuitpython-main
Translations update from Weblate
2021-11-05 08:15:28 -05:00
Hosted Weblate 93f6071e64
Merge remote-tracking branch 'origin/main' 2021-11-05 05:07:54 +01: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
Dan Halbert c263175221
Merge pull request #5545 from jepler/fix-rtd
Request RTD to use python3.9 for building
2021-11-05 00:07:48 -04:00
Jeff Epler 115402f4b8 Ask readthedocs to use python3.9 for building 2021-11-04 21:14:45 -05: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
Scott Shawcroft a08412420e
Merge pull request #5540 from jepler/continuous-capture
ParallelImageCapture: Add continuous capture on espressif
2021-11-04 13:33:32 -07:00
Jeff Epler f498cfa538 clarify that ParallelImageCapture holds references to the buffers until capture_stop 2021-11-04 08:39:26 -05:00
microDev b435e7b56a
update wifi monitor
- rename loss method to lost
- add method to get queued packet count

Co-authored-by: anecdata <16617689+anecdata@users.noreply.github.com>
2021-11-04 16:21:18 +05:30
microDev d5f0323ff7
increase wifi channel limit
Co-authored-by: anecdata <16617689+anecdata@users.noreply.github.com>
2021-11-04 09:12:11 +05:30
Scott Shawcroft 0dfb7a9a2d
Merge pull request #5541 from DavePutz/issue_5477
Corrected number of serial bytes returned
2021-11-03 16:53:15 -07:00
root 1e3215f4ee Corrected number of serial bytes returned 2021-11-03 16:29:05 -05:00
Jeff Epler 0ac6adb460 spelling 2021-11-03 14:14:55 -05: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
Dan Halbert 38c381633b
Merge pull request #5534 from jepler/add-rainbowio
Add rainbowio
2021-11-02 21:57:08 -04:00
Dan Halbert 4770120c60
Merge pull request #5536 from jepler/better_boot_out_txt
main: redesign boot_out.txt writing
2021-11-02 21:55:00 -04:00
Jeff Epler 63e01cde77 we decided not to add rainbowio on simmel 2021-11-02 19:01:05 -05:00
Jeff Epler efffb62b36 truncate boot_out.txt if it's long
Now this boot.py:
```py
for i in range(1000):
    print(i)
```
creates a 512-byte boot_out.txt that ends
```
88
89
...
```
2021-11-02 18:23:42 -05:00
Dan Halbert ec7fc6fb5e
Merge pull request #5539 from kattni/link-fix
Update link.
2021-11-02 16:10:36 -04:00
Kattni Rembor 94fa322ebe Update link. 2021-11-02 13:52:40 -04:00
microDev 41dcfda593
update wifi_monitor_make_new and arg parsing 2021-11-02 19:17:48 +05:30
microDev 27b137f931
Merge branch 'main' into monitor-mode 2021-11-02 13:56:56 +05:30
microDev 4e207853f0
rearrange hostname 2021-11-02 12:33:11 +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
Jeff Epler 694af3dd23 main: redesign boot_out.txt writing
New design:
 * capture output to a vstr
 * compare the complete vstr to boot_out.txt
 * rewrite if not a complete match

This is resilient against future changes to the automatic
text written to boot_out.txt.

This also fixes rewriting boot_out.txt in the case where
boot.py prints something.

Perhaps it also saves a bit of code space. Some tricks:
 * no need to close a file in read mode
 * no need to switch on/off USB write access, going down to the
   oofatfs layer doesn't check it anyway
2021-11-01 23:05:34 -05:00
Jeff Epler 18eaee9beb reenable RAINBOWIO on these boards 2021-11-01 12:52:13 -05:00
microDev 0f9448d1a4
Merge pull request #5533 from CytronTechnologies/reverse-pr-4981
Reversal of PR #4981
2021-11-01 18:24:16 +05:30
Kong Wai Weng 36459c8a5a Fixed whitespace issues. 2021-11-01 16:50:46 +08:00
Kong Wai Weng e0332c1e49 Using 4x spaces instead of a tab. 2021-11-01 16:47:02 +08:00
Kong Wai Weng b64ec36418 Using GP0 as default LED pin. 2021-11-01 16:43:13 +08:00
Kong Wai Weng 0034472778 Reversal of PR #4981. GPIO25 on Maker Pi RP2040 is not connected to anything. 2021-11-01 16:26:40 +08:00
Jeff Epler df3f54f24a
Merge pull request #5532 from weblate/weblate-circuitpython-main
Translations update from Weblate
2021-10-31 16:36:03 -05:00