Commit Graph

29599 Commits

Author SHA1 Message Date
Jeff Epler ef93eda0a0
Merge pull request #7192 from bill88t/picow-debug
Fix pi cow debug compilation
2022-11-15 14:08:44 -06:00
Jeff Epler 412df210ad
Merge remote-tracking branch 'origin/main' into build-python3x 2022-11-15 14:02:09 -06:00
Scott Shawcroft b8a2d3ffdc
Merge pull request #7212 from dhalbert/stm-pwm-fix
STM: off-by-one TIMx reference; other code cleanup and minor fixes
2022-11-15 11:50:53 -08:00
MicroDev e428c7eded
Merge pull request #7210 from weblate/weblate-circuitpython-main
Translations update from Hosted Weblate
2022-11-15 16:49:42 +05:30
Hosted Weblate a136638b68
Merge remote-tracking branch 'origin/main' 2022-11-15 05:35:35 +01:00
River Wang a4dd1b2341
Translated using Weblate (Chinese (Pinyin))
Currently translated at 99.4% (990 of 995 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/
2022-11-15 05:35:35 +01:00
Dan Halbert 11dcd69f2c
Merge pull request #7207 from jepler/nicer-pin-checking
shared-bindings: Get rid of CYW43 special cases in shared-bindings
2022-11-14 23:35:26 -05:00
Jeff Epler 14ba5a75a3
skip converting from long int if long ints aren't enabled
.. saves 20 bytes on proxlight trinkey
2022-11-14 21:26:58 -06:00
Jeff Epler 2d08473ee0
this version actually saves more code space on cortex-m0 with -Os (samd21s) 2022-11-14 21:18:40 -06:00
Hosted Weblate 2db0a72c55
Merge remote-tracking branch 'origin/main' 2022-11-14 23:15:34 +01:00
River Wang ce22a3293d
Translated using Weblate (Chinese (Pinyin))
Currently translated at 99.6% (992 of 995 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/
2022-11-14 23:15:34 +01:00
hexthat 63ad2b763e
Translated using Weblate (Chinese (Pinyin))
Currently translated at 99.6% (992 of 995 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/
2022-11-14 23:15:34 +01:00
Dan Halbert 61345325d9
Merge pull request #7211 from jepler/fix-gitignore-sdkconfig
only ignore sdkconfig* files in the espressif port's top directory
2022-11-14 17:15:27 -05:00
Bill Sideris 6954e569b7
since it ain't leaving.. 2022-11-15 00:05:01 +02:00
Bill Sideris fde1c05e6d
Revert "remove lwip_src"
This reverts commit 398e9122a0.
It fails on LINK without them.
2022-11-14 20:03:41 +02:00
Dan Halbert fdeaf805d3 STM: off-by-one TIMx reference; other code cleanup and minor fixes 2022-11-14 13:00:32 -05:00
Bill Sideris 398e9122a0
remove lwip_src 2022-11-14 19:33:06 +02:00
Bill Sideris 6ad61a3fd1
Radio.c work 2022-11-14 19:31:18 +02:00
Jeff Epler 14b20087b5
only ignore sdkconfig* files in the espressif port's top directory
danh and microdev1 noticed that this ignore pattern was over-broad
and caused added sdkconfig files in boards/ (which should be committed)
to be ignored and not proposed for addition by common tools like
git status, git gui, etc.

This pattern anchors the search so that it only matches in the
ports/espressif directory, so ports/espressif/sdkconfig is ignored
but ports/espressif/boards/example/sdkconfig is not ignored anymore
2022-11-14 11:29:18 -06:00
Bill Sideris 2e6dd1bf1f
Radio.c no longer needs ping.h 2022-11-14 18:36:42 +02:00
River Wang e53bbb1bd2
Translated using Weblate (Chinese (Pinyin))
Currently translated at 97.3% (969 of 995 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/
2022-11-14 16:47:28 +01:00
Jeff Epler adca341d3b
Save code space by packing rgbw values into C union
It's more efficient passing one register-sized structure than 4
arguments or 4 pointers; working on intermediate values of 'int' size
is also more efficient in code size!

On raspberry pi pico w, this increased free flash space by +104 bytes.
It also increased the speed of my testing animation very slightly, from
187fps to 189fps when run 'unthrottled'
2022-11-14 09:29:45 -06:00
Jeff Epler cdab078d9d
shared-bindings: Get rid of CYW43 special cases in shared-bindings
.. by moving it into a new weak function that can be replaced
just by the picow build.
2022-11-14 08:44:08 -06:00
Dominic Davis-Foster e1046b1050
Add support for the 16MB WeAct Studio Pico 2022-11-14 14:04:07 +00:00
Dan Halbert 8f414eb4ee
Merge pull request #7179 from jepler/picow-voltage-monitor
Add ability to read VOLTAGE_MONITOR on Pico W
2022-11-13 22:40:54 -05:00
Jeff Epler dd443bacb8
Chain exceptions while unwinding 2022-11-13 19:53:23 -06:00
Jeff Epler b6f86e1e73
Recursively print chained exceptions 2022-11-13 19:53:21 -06:00
Jeff Epler f3169246ba
Implement chained exceptions
This adds the __cause__, __context__ and __suppress_context__
members to exception objects and makes e.g., `raise exc from cause`
set them in the same way as standard Python.
2022-11-13 19:52:50 -06:00
Jeff Epler b499275bb5
Don't crash when assigning attributes of the GeneratorExit const singleton 2022-11-13 19:52:49 -06:00
Jeff Epler dec802a73b
build docs when .github/workflows changes
Closes: #7205
2022-11-13 13:26:46 -06:00
Jeff Epler b8f5def985
return to using python 3.x for builds 2022-11-13 09:26:49 -06:00
Dan Halbert 6e9909c65e
Merge pull request #7198 from CRCibernetica/crcibernetica-ideaboard
Add new board crcibernetica-ideaboard
2022-11-13 09:12:43 -05:00
root 43566dec5b allow inclusion of board while blocking build files 2022-11-13 12:13:32 +00:00
Dan Halbert 7659377ac8
Merge pull request #7202 from jepler/update-ulab-6 2022-11-12 20:20:13 -05:00
Dan Halbert c96208902f
Merge pull request #7199 from MicroDev1/espressif
Enable `microcontroller.cpu.temperature` on esp32s3
2022-11-12 11:16:45 -05:00
Jeff Epler e4d620f055
make whitespace match 2022-11-12 09:17:52 -06:00
Jeff Epler 78fc43baab
raspberrypi: Make port_idle_until_interrupt work
This needs thorough testing before it's merged, as we tried
and reverted this once before (#5341 and #5356).

I think that besides checking for tinyusb having "something to do",
the fact that `port_interrupt_after_ticks` and `port_disable_tick`
weren't implemented that was causing a secondary problem.

I've tested this on a pico w over reboot-cycles and ctrl-c-cycles,
with and without drive automounting, with and without serial repl open,
and on a power-only connection.

I didn't notice the problem reported in #5356 after merely implementing
port_idle_until_interrupt; but I did notice that sleeps in general would
take over-long until "something" (like writing to the USB drive) happened;
I think "something" was probably calling port_enable_tick(). When this
problem was happening, sleeps would take a lot longer; for instance,
`sleep(.001)` would take about 1/20s and `sleep(.1)` would take about 1/7s.
2022-11-12 09:16:41 -06:00
Dan Halbert 9e94d7e758
Merge pull request #7196 from dhalbert/rp2-pin-alarm-race
RP2040: ignore pin changes before deep sleep
2022-11-12 09:36:15 -05:00
MicroDev 512cda8b73
enable `microcontroller.cpu.temperature` on esp32s3 2022-11-12 10:03:00 +05:30
root 6c3b9b64da add crcibernetica-ideaboard 2022-11-12 03:22:15 +00:00
foamyguy 56be547754 fix type name 2022-11-11 20:18:42 -06:00
foamyguy 3c4d8c6926 implement self hidden property for vectorio shapes 2022-11-11 17:50:07 -06:00
Jeff Epler b544a3920a
update ulab to 6.0.1 2022-11-11 14:44:13 -06:00
Dan Halbert f76351d178
Merge pull request #7195 from weblate/weblate-circuitpython-main
Translations update from Hosted Weblate
2022-11-11 15:38:26 -05:00
Dan Halbert 983502d6e3 ignore pin changes before sleep 2022-11-11 15:31:49 -05:00
Jonny Bergdahl b9ce2867a0
Translated using Weblate (Swedish)
Currently translated at 100.0% (995 of 995 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2022-11-11 19:49:47 +01:00
Wellington Terumi Uemura d5ea4d8f2f
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (995 of 995 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2022-11-11 19:49:47 +01:00
Jeff Epler 5e77269845
Merge pull request #7135 from dronecz/main
Add Maker badge board
2022-11-11 10:38:48 -06:00
Jeff Epler 5d3484f61a
Update frozen modules 2022-11-11 08:57:06 -06:00
Jeff Epler f5c637dc10
Add adafruit_pixelmap.PixelMap
.. a fast helper for animations. It is similar to and inspired by the
PixelMap helper in Adafruit LED Animation library, but with an extremely
fast 'paste' method for setting a series of pixels. This is a common
operation for many animations, and can give a substantial speed improvement.

It's named `adafruit_pixelmap` so that we can package a compatible version
in pure Python for systems that can't fit it in C in flash, or for
Blinka.

This is a proof of concept and can make a very fast comet animation:
```python
import time
import adafruit_pixelbuf
import adafruti_pixelmap
import board
import neopixel
from supervisor import ticks_ms
from adafruit_led_animation.animation.solid import Solid
from adafruit_led_animation import color

pixel_pin = board.GP0
pixel_num = 96

pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=1, auto_write=False, pixel_order="RGB")

evens = adafruit_pixelmap.PixelMap(pixels, tuple(range(0, pixel_num, 2)))
odd_indices = tuple((i, i+2) for i in range(1, pixel_num, 4))
print(odd_indices)
odds = adafruit_pixelbuf.PixelMap(pixels, odd_indices)
assert len(odds) == len(odd_indices)


comet_length = 16

comet1 = [color.calculate_intensity(color.GREEN, ((1+i) / comet_length) ** 2.4)
        for i in range(comet_length)]
comet2 = [color.calculate_intensity(color.PURPLE, ((1+i) / comet_length) ** 2.4)
        for i in range(comet_length)]

pos1 = 0
pos2 = 96//4

while True:
    evens.paste(comet1, pos1, wrap=True, reverse=False, others=0)
    pos1 = (pos1 + 1) % len(evens)

    odds.paste(comet2, pos2, wrap=True, reverse=True, others=0)
    pos2 = (pos2 - 1) % len(odds)
    pixels.show()

    m = ticks_ms()
    if m % 2000 > 1000:
        time.sleep(.02)
```
2022-11-11 07:54:33 -06:00