Wykres commitów

2606 Commity (patch-af-unicode)

Autor SHA1 Wiadomość Data
Phil Howard fd21d61bea PicoVector: Fix find_glyph char to uint16_t.
Allow find_glyph to find 16-bit unicode codepoints (icons, yay!).
2025-05-22 16:00:59 +01:00
Philip Howard 21ec6a23ba
Merge pull request #1019 from pimoroni/feature/picovector2-and-layers
PicoVector Enhancements & PicoGraphics Layers
2025-05-12 13:54:50 +01:00
Phil Howard 841253437a PicoGraphics: Make Inky block by default as intended. 2025-05-09 17:11:33 +01:00
Phil Howard fba0f1c962 PicoVector: Add tracked memory alloc, track the node buffer.
With a low GC threshold the node buffer was being collected (despite guards against this)
and causing further drawing operations to be corrupted.

Add a new tracked malloc method and use it for node buffers and font data.

Tweak pp_poly_add_path to accept a point count, avoiding many successive rellocs when
dealing with a known quantity of points (copying from an af_glyph_t.)
2025-05-09 17:11:27 +01:00
Phil Howard 8117066bb5 PicoVector: Fix bug in RGB888 blend.
Move the source pen out for a tiny performance boost.
2025-04-25 17:55:30 +01:00
ihaanaho 7a894dc512 PicoVector: Add support for utf-8 characters. 2025-04-25 17:43:13 +01:00
Phil Howard a2e8127f57 PimoroniBus: SPIBus fix unused pin arguments.
Fixes #1074.
2025-04-25 17:39:18 +01:00
Phil Howard 75f15c6a66 BME690: Add MP_ERROR_TEXT() around errors. 2025-04-25 17:39:18 +01:00
Phil Howard a5d96397fc MicroPython: Replace MICROPY_HW_PIN_RESERVED with hal function. 2025-04-25 17:39:18 +01:00
Phil Howard d6b42b5abd CI: Bump MicroPython to v1.25.0. 2025-04-25 17:39:07 +01:00
Phil Howard b8d0f36caf BME69X: Add C driver and MicroPython bindings.
This is just a straight copy and paste of BME68X, dropping in the BME69X
Sensor API and wishing upon a star that it works.
2025-04-25 17:33:53 +01:00
Mike Bell eafb2db34b PicoVector: Set optimization flags. 2025-04-25 17:33:53 +01:00
Phil Howard c7776ee4ae Plasma: Make PIO and pin args optional. 2025-04-25 17:33:53 +01:00
Phil Howard cd2486b3d4 Plasma: Add is_busy method. 2025-04-25 17:33:53 +01:00
Phil Howard 0a4801da70 Plasma: Expose non-blocking update to MicroPython. 2025-04-25 17:33:53 +01:00
Phil Howard a03ed44db1 PimoroniBus: Support machine.Pin. 2025-04-25 17:33:53 +01:00
Phil Howard 6845972ffe PimoroniBus: Switch to mp_obj_malloc. 2025-04-25 17:33:53 +01:00
Phil Howard 9c2775228d PimoroniBus: Clean up print function.
Use mp_printf to avoid fragmented output and converion into mp types.
2025-04-25 17:33:53 +01:00
Phil Howard 5ba5b29d39 MicroPython: Switch everything else to mp_obj_malloc. 2025-04-25 17:33:53 +01:00
Phil Howard b12d0aa8ab plasma: Support pins given as machine.Pin obj. 2025-04-25 17:33:53 +01:00
Phil Howard b6f9027090 plasma: Drop pin definitions from C module.
Remove pin definitions in anticipation of them moving to pins.csv.

Eg:

from plasma2040 import BUTTON_A
machine.Pin(BUTTON_A)

Should become:

machine.Pin("BUTTON_A")
2025-04-25 17:33:53 +01:00
Phil Howard 613e3cdd38 Pimoroni I2C: Switch to mp_obj_malloc. 2025-04-25 17:33:53 +01:00
Phil Howard 26a8ce40f5 Pimoroni I2C: Support machine.Pin args. 2025-04-25 17:33:53 +01:00
Mike Bell d84a1e3470 PicoVector: Faster polygon rendering. 2025-04-25 17:33:53 +01:00
Phil Howard 12228c4036 ulab: Bump from 6.5.2 to 6.7.3. 2025-04-25 17:33:53 +01:00
Phil Howard cd2e412ef4 MicroPython: Add MP_ERROR_TEXT() for mp_raise_msg() calls. 2025-04-25 17:33:53 +01:00
Phil Howard 5ed7913a2c MicroPython: Fix errors reporting an errno. 2025-04-25 17:33:53 +01:00
Phil Howard 5aaf5d3608 MicroPython: Add MP_ERROR_TEXT() around errors.
This is required for MicroPython error text compression which is
going to be enabled by default for RP2 builds.

We have a lot of error messages, so the potential flash gain here
is worth the effort of making this work.
2025-04-25 17:33:53 +01:00
Phil Howard a22c966ddd CI: Remove Unicorn boards.
These have moved to: https://github.com/pimoroni/unicorn
2025-04-25 17:33:53 +01:00
Phil Howard 8f5c04ba48 PicoVector: Basic documentation. 2025-04-25 17:33:53 +01:00
Phil Howard 9588ee1c26 PicoVector: Make Polygon().path chainable. 2025-04-25 17:33:53 +01:00
Phil Howard cce0a7dabe Hershey Fonts: Fix default value setting for HERSHEY_FONTS. 2025-04-25 17:33:53 +01:00
Phil Howard c58142cf0b Unicorns: Disable Hershey fonts to reclaim some bytes. 2025-04-25 17:33:53 +01:00
Phil Howard fbe2851eaf PicoVector: Improve transform handling.
* Store a reference to transform, so `set_transform(Transform())` is not GC'd until it is replaced
* Transformations return the transform, allowing chaining: `transform.rotate().scale().translate()`
* A new `get_transform` method for getting the currently set transform.
2025-04-25 17:33:53 +01:00
Phil Howard a2b91340e2 PicoVector: Don't force iterated points to int(). 2025-04-25 17:33:53 +01:00
Phil Howard c5bd4497cd Hub75: Replace and document gamma correction table. 2025-04-25 17:33:53 +01:00
Phil Howard dd1aad35af Hub75: Add support for alternate pen types. 2025-04-25 17:33:53 +01:00
Phil Howard 638ff3d8f4 Hershey Fonts: ifdef guard hershey features for eventual deprecation.
Hershey fonts have all but been replaced by PicoVector's "Alright Fonts"
implementation and in many case we need this flash back!
2025-04-25 17:33:53 +01:00
Phil Howard 1488a0b796 PNG/JPEGDEC: Remove finalizer.
Remove the finalizer from PNGDEC and JPEGDEC, since it was both redundant
and actively harmful.

The finalizer was just calling "close" which is unecessary since the file
is closed automatically after opening/rendering and not left open.

If a file did not exist and "open_file" bailed with ENOENT then it would
be left in an unknown state, and the finalizer calling "close" would
cause a hardlock.
2025-04-25 17:33:53 +01:00
Phil Howard f533177731 PNG/JPEGDEC: Use MP_ROM_QSTR. 2025-04-25 17:33:53 +01:00
Phil Howard 9bf5562d24 Hub75: Remove 128x128 panel rotation hack. 2025-04-25 17:33:53 +01:00
Phil Howard d0f2a8b1a2 CI: Bump MicroPython to v1.24.1. 2025-04-25 17:33:53 +01:00
Phil Howard 5e114e97c4 PicoVector: AF: Support for 16bit point count.
Somewhere in the conversion from C++ to C we lost support for 16-bit point counts.

Raise the internal point count to 16-bit, and check for a flag in the font.

If the flag is set, treat the point count as 16-bits, otherwise fallback to 8 for back compatibility.
2025-04-25 17:33:53 +01:00
Phil Howard 0d96ec051b PicoVector: Fix fonts not rendering with no transform set. 2025-04-25 17:33:53 +01:00
Phil Howard 2f5ac9b2db PicoVector: Fix bug in polygon iterator.
list(Polygon) should return a list of points, but crashed with non-empty polygons.

We were advancing to the next path and then retriving an invalid point count for building the tuple.

Save the point count before advancing to the next path.
2025-04-25 17:33:53 +01:00
Phil Howard 6efe234139 ST7789: Add RAMCTRL mentioned in #1040. 2025-04-25 17:33:53 +01:00
Mike Bell 807d4ba7ef PicoVector: Fix ppp arc memory corruption. 2025-04-25 17:33:52 +01:00
Mike Bell 9e7c2640d4 Hub75: Fix LED ghosting. 2025-04-25 17:33:52 +01:00
Mike Bell 82c3b73655 PicoVector: Fully initialise text metrics. 2025-04-25 17:33:52 +01:00
Phil Howard 27bd5eecde PicoVector: Initialise pp_transform().
For some reason this was unset causing drawing to fail.

Reset it to a known good state in the constructor.
2025-04-25 17:33:52 +01:00