.. _changelog_v4_5_0: v4.5.0 ====== v4.5.0 is a major release. The old ``lcd`` module was replaced by a unified :mod:`display` module with separate SPI / parallel / DSI / TV backends, the Arduino Giga board was added, and a wave of display, touch, and sensor-control features arrived. There are several breaking changes — read them below. .. contents:: On this page :local: :depth: 1 Highlights ---------- - New :mod:`display` module — replaces ``lcd`` with unified ``SPIDisplay`` / ``RGBDisplay`` / ``DSIDisplay`` / ``TVDisplay`` backends. - **Arduino Giga** board support. - **New display/touch hardware** — DSI displays on STM32 H7, TFP410 DVI/HDMI, HDMI/DVI CEC, ST7701 RGB panels, and GT911 / FT5X06 capacitive touch. - **New sensor controls** — black-level calibration, night mode, and :func:`sensor.disable_delays`; much faster transpose (~5x) and morphology (~2.5x). - **Breaking:** ``lcd`` → :mod:`display`, ``lcd_touch`` → :mod:`ft5x06`, renamed LED pins — see the breaking changes. New features ------------ - **Display backends** — ``DisplayData`` (DDC/EDID readout), a ``TFP410`` DVI/HDMI serializer, MIPI-DSI display support on STM32 H7, an HDMI/DVI ``cec`` driver, and a Python :mod:`display` library with an ``ST7701`` RGB panel init helper. - **Touch** — new ``GT911`` 5-point capacitive touch driver (``read_points()`` / ``read_id()`` / ``reset()``). - :mod:`machine` extension — a freezable :mod:`machine` library with a :class:`machine.LED` helper class, and a new ``machine.LED.value([v])`` method. - **Sensor controls** — ``sensor.set_auto_blc(enable, regs=None)`` / :func:`sensor.get_blc_regs` (black-level calibration), ``IOCTL_SET_NIGHT_MODE`` / ``IOCTL_GET_NIGHT_MODE`` (OV7725/OV5640), OV7670 hmirror/vflip, and :func:`sensor.disable_delays` to skip camera settling delays for faster reconfiguration. - **i.MX RT** — ``sensor.set_xclk_frequency()`` now accepts any frequency (snapping to the nearest valid CSI divider) and the SPI ``lcd`` / ``tv`` / :mod:`fir` modules were enabled on the RT1060. Other changes and improvements ------------------------------ - **Much faster image ops** — image transpose is ~5x faster and ``image.morph()`` is ~2.5x faster. - The camera-bus probe now scans and validates multiple device addresses, supporting boards with several devices on the bus. Bug fixes --------- Camera and sensors: - Fixed gain-calculation accuracy across many sensors (HM01B0, HM0360, MT9M114, MT9V0xx, OV2640, OV5640, OV7690, OV7725, OV9650, PAJ6100), MT9V0xx exposure / column-binning, OV5640 exposure, and OV7670 VGA windowing. - STM32 now drops corrupted transpose frames instead of returning bad images. Image processing: - Fixed an integer overflow affecting image / FIR / ToF / LCD / TV operations, invalid ``vcvtm``/``vcvtp`` floating-point instructions on Cortex-M4 (``fast_floorf``/``fast_ceilf``), an in-place scaling bug in ``image.to_*()`` conversion, and DMA2D draw cache corruption. Display and system: - Fixed DSI display timing and portrait mode, ``micro_speech`` ``listen()`` on Nicla Vision / Portenta H7, the STM32 user switch (``pyb.Switch``), and I2C4 bus support. Hardware and board support -------------------------- - **Arduino Giga** — new board, with named Arduino pin mappings and a full example set. - **OpenMV RT1060** — SPI LCD, TV, and FIR thermal modules enabled. - **Arduino Nano 33 BLE Sense** — LED pins. Breaking API changes -------------------- User-visible API breaks between v4.4.3 and v4.5.0. Scope: Python C-modules in ``modules/`` and Python libraries in ``scripts/libraries/``. Each change is tagged with its impact: - *major* — most scripts that used it need edits. - *minor* — narrow API; only affects scripts that used it. - *behavior* — same API, different results; re-check tuned scripts. Changes are grouped by impact in that order. If you just want to port your code, jump to the :ref:`migration checklist ` at the end. Each commit hash links to its diff on GitHub. .. _v4_5_0_display: ``lcd`` module replaced by :mod:`display` *(major)* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The old ``lcd`` module was removed and replaced by a unified :mod:`display` module split into ``SPIDisplay`` (SPI LCD shield), ``RGBDisplay`` / parallel, ``DSIDisplay`` (MIPI-DSI), and ``TVDisplay`` backends with a common API. Scripts must switch from ``import lcd`` to the :mod:`display` module and construct the appropriate backend object. *Commits:* `227824aac `__, `6c6336829 `__ .. _v4_5_0_misc: Touch module, LED pins, and bundled drivers *(minor)* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The generic ``lcd_touch`` module was replaced by a dedicated ``FT5X06`` capacitive-touch driver module. LED pin names were renamed for consistency across all boards (scripts referencing the old LED pin names must update). The bundled :mod:`hts221` / :mod:`lps22h` / :mod:`lsm6dsox` / :mod:`lsm9ds1` IMU/sensor drivers were replaced with the upstream micropython-lib versions, whose APIs differ slightly (the bundled examples were updated to match). *Commits:* `86ad6dcdb `__, `9344c3b74 `__, `2b5b7963b `__ .. _v4_5_0_controls: Unsupported sensor controls now warn *(behavior)* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :func:`sensor.set_auto_gain`, ``set_auto_exposure()``, ``set_auto_whitebal()`` and ``set_auto_blc()`` now print a warning instead of raising a ``RuntimeError`` when the active sensor does not support the control, so the same script can run across sensors with differing capabilities. Code that relied on catching the exception must be updated. *Commit:* `dbf4996f2 `__ .. _v4_5_0_migration: Migration checklist ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For a clean port to v4.5.0 the typical work is: #. Replace ``import lcd`` usage with the new :mod:`display` module and the appropriate backend (:ref:`the display module change `). #. Switch ``lcd_touch`` to ``FT5X06``, update any old LED pin names, and re-check the upstream IMU driver APIs (:ref:`the touch/pin/driver changes `). #. Replace ``try``/``except RuntimeError`` around unsupported sensor controls with capability checks (:ref:`the sensor-control change `).