Jeff Epler
b7f5c277ad
_pixelbuf: Increase performance of brightness-scaling
...
On the Pico, this increases the "fill rate" of
pixels[:] = newvalues
considerably. On a strip of 240 RGB LEDs, auto_write=False, the timings
are:
|| Brightness || Before || After || Improvement ||
|| 1.0 || 117 kpix/s || 307 kpix/s || 2.62x ||
|| 0.07 || 117 kpix/s || 273 kpix/s || 2.33x ||
It's worth noting that even the "before" rate is fast compared to the
time to transmit a single neopixel, but any time we can gain back
in the whole pipeline will let marginal animations work a little better.
To set all the pixels in this way and then show() gives a pleasant bump
to the framerate, from about 108Hz to 124Hz (1.15x)
The main source of speed-up is using integer math instead of floating
point math for the calculation of the post-scaled pixel values. A slight
secondary gain is achieved by avoiding the scaling altogether when
the scale factor is 1.0.
Because the math is not exactly the same, some scaled pixel values may
change by +- 1 RGBW "step". In practice, this is unlikely to matter.
The gains are bigger on the Pico and other M0 microcontrollers than M4
microcontrollers with floating point math in the hardware.
Happily, flash size is also improved a bit on the Pico build I did,
going from
> 542552 bytes used, 506024 bytes free in flash firmware space out of 1048576 bytes (1024.0kB).
to
> 542376 bytes used, 506200 bytes free in flash firmware space out of 1048576 bytes (1024.0kB).
2021-02-24 09:51:27 -06:00
Kevin Matocha
cd4d55a573
yet another sphinx try
2021-02-24 08:05:40 -06:00
Kevin Matocha
e858db07f0
Another sphinx try
2021-02-24 07:59:32 -06:00
Kevin Matocha
2815c6dafa
More sphinx attempts
2021-02-24 07:49:34 -06:00
Kevin Matocha
af5ad50125
More sphinx fixes
2021-02-24 01:18:30 -06:00
Kevin Matocha
18658b77f3
Sphinx docstring updates
2021-02-24 01:00:13 -06:00
Kevin Matocha
b720028642
Add bitmaptools module
2021-02-23 23:23:14 -06:00
Mark
b935dcafdc
Merge branch 'main' into rp2040_countio
2021-02-23 19:46:41 -06:00
gamblor21
379f454ce6
Adding countio to rp2040
2021-02-23 19:38:05 -06:00
Scott Shawcroft
889f02abe4
Translations
2021-02-23 16:32:16 -08:00
Scott Shawcroft
abbbb91fa8
Add state machine divisor check
...
This causes an exception when setting a state machine too slow or
too fast.
Fixes #4222
2021-02-23 16:30:46 -08:00
Scott Shawcroft
360475e266
Implement audiobusio and enhance PIO for it
...
This adds I2SOut and PDMIn support via PIO.
StateMachines can now:
* read and read while writing
* transfer in 1, 2 or 4 byte increments
* init pins based on expected defaults automatically
* be stopped and restarted
* rxfifo can be cleared and rxstalls detected (good for tracking when
the reading code isn't keeping up)
Fixes #4162
2021-02-23 15:50:00 -08:00
Scott Shawcroft
e41137c745
Merge pull request #4244 from UnexpectedCircuitPython/main
...
Added Unexpected Maker TinyS2 board definition
2021-02-23 10:40:06 -08:00
Scott Shawcroft
001d7299b2
Merge pull request #4228 from ZodiusInfuser/rp2040-boards
...
Added definitions for Pimoroni RP2040-based boards
2021-02-23 10:00:19 -08:00
Scott Shawcroft
8b626a4800
Merge pull request #4248 from dhalbert/uniform-build-shrinks
...
set SUPEROPT_VM = 0 on most non-Express SAMD21 boards
2021-02-23 08:58:01 -08:00
Scott Shawcroft
137a995ef5
Merge pull request #4249 from dhalbert/sys-control-typo
...
Fix typos for CIRCUITPY_USB_HID_SYS_CONTROL
2021-02-23 08:48:48 -08:00
Dan Halbert
7a4198885e
Fix typos for CIRCUITPY_USB_HID_SYS_CONTROL
2021-02-23 09:22:20 -05:00
ZodiusInfuser
1a0bf4c33f
Added flash size for PicoSystem
2021-02-23 11:04:20 +00:00
ZodiusInfuser
a9951c9b6c
Added flash size for Keybow2040
2021-02-23 11:01:40 +00:00
ZodiusInfuser
ca9b7debe0
Added flash size for Tiny2040
2021-02-23 10:43:35 +00:00
Seon Rozenblum
78b2daa2a7
Added Unexpected Maker TinyS2 board definition
2021-02-23 17:55:17 +11:00
Dan Halbert
a30d4ad25d
set SUPEROPT_VM = 0 on most non-Express SAMD21 boards
2021-02-22 23:03:11 -05:00
Dan Halbert
cca6cfe026
Merge pull request #4247 from tannewt/rp2040_flash_size
...
Board specific flash sizes for RP2040
2021-02-22 22:33:07 -05:00
Scott Shawcroft
3fdf29e773
More parens
2021-02-22 18:35:09 -08:00
Scott Shawcroft
863981a5b8
Parens
2021-02-22 18:31:45 -08:00
Scott Shawcroft
0aafeac209
Board specific flash sizes for RP2040
...
Stop-gap solution for #4041 . Comment is there to provide info
needed in the future. (We currently run the generic "safe" settings.)
2021-02-22 17:19:18 -08:00
Scott Shawcroft
b19e7c9148
Merge pull request #4243 from jepler/usb-serial-number-savings
...
USB descriptors: Save flash storage for serial number
2021-02-22 16:48:12 -08:00
Scott Shawcroft
2262af0b52
Merge pull request #4239 from dhalbert/samd21-msc-one-endpoint-pair
...
SAMD21: one endpoint pair for MSC now instead of two
2021-02-22 15:58:14 -08:00
Scott Shawcroft
244b7e2300
Merge pull request #4234 from weblate/weblate-circuitpython-main
...
Translations update from Weblate
2021-02-22 15:00:21 -08:00
Jeff Epler
aa1de69645
fix length of generated serial number descriptor
2021-02-22 07:33:04 -06:00
Jeff Epler
144acfcb98
USB descriptors: Save flash storage for serial number
...
This saves about 60 bytes (Feather M4 went from 45040 -> 45100 bytes free)
66 bytes of data eliminated, but 6 bytes paid back to initialize the length
field.
2021-02-21 21:24:49 -06:00
Hosted Weblate
d3742a2a1f
Merge remote-tracking branch 'origin/main' into main
2021-02-21 23:27:23 +01:00
Jonny Bergdahl
07576b1c22
Translated using Weblate (Swedish)
...
Currently translated at 100.0% (964 of 964 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2021-02-21 23:27:23 +01:00
Wellington Terumi Uemura
8b7674f0c5
Translated using Weblate (Portuguese (Brazil))
...
Currently translated at 100.0% (964 of 964 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2021-02-21 23:27:22 +01:00
Hugo Dahl
51e712a9de
Translated using Weblate (French)
...
Currently translated at 100.0% (964 of 964 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/
2021-02-21 23:27:22 +01:00
Jose David M
96c3b20d0e
Translated using Weblate (Spanish)
...
Currently translated at 100.0% (964 of 964 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/
2021-02-21 23:27:22 +01:00
Dan Halbert
79b1226759
Merge pull request #4238 from dhalbert/cdc-avoid-extra-float-libs
...
usb_cdc: avoid pulling in extra float-uint64 routines
2021-02-21 17:27:16 -05:00
Dan Halbert
8470f0fdb7
SAMD21: one endpoint pair for MSC now instead of two
2021-02-21 12:37:59 -05:00
Dan Halbert
93bf269c0d
Avoid pulling in extra float-uint64 routines
2021-02-21 12:05:03 -05:00
David Glaude
8caa72cfc2
Translated using Weblate (French)
...
Currently translated at 100.0% (964 of 964 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/
2021-02-21 17:22:01 +01:00
Hugo Dahl
8b5e0f2c62
Translated using Weblate (French)
...
Currently translated at 100.0% (964 of 964 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/
2021-02-21 17:22:01 +01:00
Hugo Dahl
a7baca2149
Translated using Weblate (French)
...
Currently translated at 99.0% (955 of 964 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/
2021-02-21 17:19:33 +01:00
David Glaude
7113bd13f1
Translated using Weblate (French)
...
Currently translated at 99.0% (955 of 964 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/
2021-02-21 17:19:33 +01:00
David Glaude
410e728c85
Translated using Weblate (French)
...
Currently translated at 96.0% (926 of 964 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/
2021-02-21 17:00:17 +01:00
Hosted Weblate
9905e841f3
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-02-21 15:16:02 +01:00
Hosted Weblate
38b5a14421
Merge remote-tracking branch 'origin/main' into main
2021-02-21 15:16:00 +01:00
Dan Halbert
2830984aef
Merge pull request #4231 from jepler/memoryview-cast
...
py: memoryview: implement memoryview.cast if CPYTHON_COMPAT
2021-02-21 09:15:53 -05:00
Jonny Bergdahl
9df8d8269c
Translated using Weblate (Swedish)
...
Currently translated at 100.0% (963 of 963 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2021-02-21 02:50:33 +01:00
Wellington Terumi Uemura
eb8f6e30f1
Translated using Weblate (Portuguese (Brazil))
...
Currently translated at 100.0% (963 of 963 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2021-02-21 02:50:32 +01:00
Rodrigo Argumedo
156cc4b577
Translated using Weblate (Spanish)
...
Currently translated at 100.0% (963 of 963 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/
2021-02-21 02:50:31 +01:00