Commit graph

120 commits

Author SHA1 Message Date
ogoffart
eb273a63ee Bump version number to 1.9.0 2024-09-25 11:49:15 +00:00
Simon Hausmann
4d43d02b03 esp-idf: Add support for using pre-built binaries
Run the nightly esp-idf test against the esp-idf slint nightly
binaries, after creating them. The snapshot is run earlier as well
then, so that the tests don't "leak" into the morning working hours.
2024-09-11 19:27:41 +02:00
Simon Hausmann
b81e4e1bd2 Remove unnecesary esp-idf component dependency
Depending on just the bsp in the yaml file is sufficient for linkage.
(we use the same in the other esp-idf projects)
2024-08-23 11:34:26 +02:00
ogoffart
4dd7d96a28 Bump version number to 1.8.0 2024-08-15 12:44:46 +00:00
ogoffart
bbf7edc5a3 Bump version number to 1.7.2 2024-08-09 09:52:17 +00:00
Nathan Collins
5e49d7f687 Zephyr: move the demo to examples/printerdemo
Given that the Zephyr demo now uses this UI instead of the "_mcu"
version it makes sense to relocate the code too.
2024-08-07 15:26:32 +02:00
Nathan Collins
8feaf7ffe2 Zephyr: make zephyr_process_input_event comments clearer
Prefer "logical coordinate" over "rendered position" which could also
have been interpretted as the screen position.
2024-08-07 15:26:32 +02:00
Nathan Collins
4eb78f7f0b Zephyr: use the non-mcu printerdemo UI
Set the native simulator display size to 1280x720 to match the
hardware.

On the hardware we rotate the screen using the display driver pixel
processing pipeline API. We can tell slint the rotated size via the
window adapter and everything is rendered as expected.

Input still needs rotating, so the software renderer RotationInfo struct and
`transformed` functions are "copied" here. However, we must specify the
opposite orientation in order to get the expected input coordinates.
2024-08-07 15:26:32 +02:00
Nathan Collins
5dc74d55a5 Zephyr: enable the PXP for the display driver
The display driver (display_mcux_elcdif) for the test hardware can use
a Pixel Processing Pipeline (PXP) which utilises DMA instead of copying
the framebuffer using `memcpy`. Enabling PXP is the first step to using
it to rotate the display output.
2024-08-07 15:26:32 +02:00
Nathan Collins
045cd0c154 Zephyr: active animations only cause a sleep on the native simulator
The Zephyr POSIX architecture used by the native simulator is unable
to interrupt a busy thread [1]. Therefore we must sleep even when
there are active animations to allow other threads to progress,
otherwise we end up in an infinite loop. This limitation does not
apply to real hardware, where we can simply continue the event loop.

[1] https://docs.zephyrproject.org/3.7.0/boards/native/doc/arch_soc.html#important-limitations
2024-07-31 16:38:55 +02:00
ogoffart
aa25e3cd44 Bump version number to 1.7.1 2024-07-23 12:05:34 +00:00
Olivier Goffart
42d7661ec6 C++: make the PhysicalRegion::rectangles non-overlapping 2024-07-10 10:58:27 +02:00
Simon Hausmann
6750a454c1 Rename touch and panel to touch_handle and panel_handle and document their nullptr values 2024-07-08 21:36:47 +02:00
Nathan Collins
3d5a876f1e Zephyr: update Zephyr SDK version in README.md
Direct the reader to the same version that the CI uses.
2024-07-08 16:46:33 +02:00
Nathan Collins
b23e846e84 Zephyr: update the README.md with known issues
Include the current know issues in the documentation, so that they
aren't hidden in a pull request.
2024-07-08 16:46:33 +02:00
Nathan Collins
538387b3d6 Zephyr: apply license headers
The Zephyr VERSION file is excluded as this simply specifies the version
of the Zephyr applicaiton, and the documentation doesn't say how
comments should be specified or if they are supported.
2024-07-08 16:46:33 +02:00
Nathan Collins
2ce3e70094 Zephyr: allow the event loop to wait forever
If there are no active animations or timer updates, allow the event
loop to run forever, rather than hardcoding five seconds.
2024-07-08 16:46:33 +02:00
Nathan Collins
9fc7477014 Zephyr: individually render the dirty sub-regions
The software renderer now provides a list of regions which have
changed.  Convert the regions to big-endian and render them
individually to prevent the non-dirty regions from being converted
away from big-endian.  Unfortunately, this still means we convert any
intersection between region more than once but this will be tackled as
a follow-up commit, as in principle this affects more than just the
Zephyr demo.
2024-07-08 16:46:33 +02:00
Nathan Collins
93bca206aa Zephyr: prefer a release build for hardware
The performance is much better, so for someone testing the demo based
on the readme, this gives a better first experience.
2024-07-08 16:46:33 +02:00
Nathan Collins
4841e9acfc Zephyr: fix use of deprecated board specification
The hardware model in Zephyr has changed. Use the way to specify a
board.
2024-07-08 16:46:33 +02:00
Nathan Collins
57e327f3e6 Use working Zephyr revision
The native simulator uses the SDL display driver. In Zephyr v3.6.0 this
driver incorrectly mixes pitch and width in asserts, causing the
application to assert when run. This revision fixes the assert. Ideally
we would use a tagged release, but there is not one available yet.
2024-07-08 16:46:33 +02:00
Nathan Collins
d448170219 Add a West manifest
Track the Zephyr v3.6.0 release. Update the documentation to make use
of the West manifest.
2024-07-08 16:46:33 +02:00
Nathan Collins
68a02013e4 Zephyr: document why PIXEL_FORMAT_BGR_565 works
Zephyr expects pixel data to be big endian [1].

The display driver expects RGB 565 pixel data [2], and appears to expect
it to be little endian.

By passing Slint's little endian, RGB 565 pixel data without converting
to big endian as Zephyr expects, we get colors that work.

[1] https://docs.zephyrproject.org/latest/hardware/peripherals/display/index.html#c.display_pixel_format
[2] c211cb347e/drivers/display/display_mcux_elcdif.c (L256)
2024-07-08 16:46:33 +02:00
Nathan Collins
caf75ce84c Zephyr: prefer a release build on device
Render times are greatly improved in release builds.
2024-07-08 16:46:33 +02:00
Nathan Collins
4732a0b759 Zephyr: log render times
Slint is taking quite some time to update the render buffer:

```
// Initial render
[00:00:01.727,000] <dbg> zephyrSlint: maybe_redraw: Rendered x: 0 y: 0 w: 720 h: 1280
[00:00:01.727,000] <dbg> zephyrSlint: maybe_redraw:  - total: 1363 ms, slint: 1347 ms, write: 16 ms
[00:00:01.727,000] <dbg> zephyrSlint: run_event_loop: Sleeping for 0ms
[00:00:01.727,000] <dbg> zephyrSlint: run_event_loop: Loop

// Partial update
[00:00:02.255,000] <dbg> zephyrSlint: maybe_redraw: Rendered x: 146 y: 18 w: 156 h: 204
[00:00:02.255,000] <dbg> zephyrSlint: maybe_redraw:  - total: 525 ms, slint: 504 ms, write: 21 ms
[00:00:02.255,000] <dbg> zephyrSlint: run_event_loop: Sleeping for 474ms
```
2024-07-08 16:46:33 +02:00
Nathan Collins
038d7f8381 Zephyr: Rendering on device works if we don't change to big endian
Zephyr reports that the RK055HDMIPI4MA0 MIPI display is using
PIXEL_FORMAT_BGR_565.

The buffer we provide to Slint uses `slint::platform::Rgb565Pixel`.

Somewhere, the pixel data ends up in the correct format to display on
the test hardware.
2024-07-08 16:46:33 +02:00
Nathan Collins
3c4a019d75 Zephyr: fix format specifier warning
Use the correct format for the duration representation.
2024-07-08 16:46:33 +02:00
Nathan Collins
cb5b78b45a Build and run on NXP MIMXRT1170-EVKB
Setup the printerdemo_mcu example to build and run on the NXP
MIMXRT1170-EVKB.

There is an issue with the supported pixel formats, which will be
resolved in a future commit
2024-07-08 16:46:33 +02:00
Nathan Collins
71987d8fb3 Zephyr: don't use std::mutex
Zephyr does not support std::mutex [1].

[1] https://docs.zephyrproject.org/latest/develop/languages/cpp/index.html#language-features
2024-07-08 16:46:33 +02:00
Nathan Collins
fe711aad10 Zephyr: don't block main thread with animations
Make sure we sleep, even if there are animations. Previously we would
spin the event loop forever once an animation started.

Ideally we need some slint API to get the duration until the next
animation tick.
2024-07-08 16:46:33 +02:00
Nathan Collins
43ea064207 Zephyr: handle touch events
Define a simple callback to handle touch events from Zephyr. We expect
an input_sdl_touch device to exist in the device tree. This is a fairly
simple implementation as a proof of concept.

The default behaviour of Zephyr (as configured) is to handle inputs in a
separate thread. Each `input_event` describes a specific change, with the
`sync` member specifying when the event has reached a stable state. We
use slint::invoke_from_event_loop to dispatch the slint event in the
main thread.
2024-07-08 16:46:33 +02:00
Nathan Collins
c32b941f62 Zephyr: Turn off display blanking once
This stops the display from flickering in the native_sim.
2024-07-08 16:46:33 +02:00
Nathan Collins
3a12cfbdfc Enable asserts in Zephyr
Turn on Zephyr asserts to help root out issues with the Zephyr
platform code.
2024-07-08 16:46:33 +02:00
Nathan Collins
4a2c4ab89c Fix ZephyrWindowAdapter rendering
Use the correct offset into the buffer. In combination with
zephyrproject-rtos/zephyr#72007 partial rendering now works as
expected.
2024-07-08 16:46:33 +02:00
Nathan Collins
8a4a3c22c2 Update examples/printerdemo_mcu/zephyr/README.md
Don't forget to source the Zephyr virtual env.
2024-07-08 16:46:33 +02:00
Nathan Collins
cc39d0a016 Render printerdemo in Zephyr RTOS
Add a variant of the printerdemo_mcu that works with Zephyr. For now
we only target the native_sim, and only have rendering set up. Future
commits will add touch support, and investigate synchronization
issues.
2024-07-08 16:46:33 +02:00
Olivier Goffart
acb7da11d2 fix missing warning of missing export
... for last component when globals are exported
2024-06-21 11:57:49 +02:00
Simon Hausmann
1378d6e3bc
Make it possible to use slint-esp with displays that expect little endian ordered RGB565 pixels (#5344)
We can't automatically determine what the display supports, so we need to make this an opt-in - just like it is with LVGL.
2024-06-11 11:30:42 +02:00
ogoffart
3a6e34ba45 Bump version number to 1.7.0 2024-06-04 20:34:29 +00:00
Simon Hausmann
538050f65a Switch the esp-idf based s3 box examples to use the s3 box 3
The original box isn't produced anymore.
2024-06-03 01:39:13 -07:00
Olivier Goffart
25edeb053a Rendering benchkark of the printerdemo_mcu 2024-04-24 16:36:25 +02:00
ogoffart
6bf40989d9 Bump version number to 1.6.0 2024-03-27 07:49:22 +00:00
ogoffart
20c570ab1d Bump version number to 1.5.1 2024-03-18 08:55:01 +00:00
ogoffart
a0eed4e58e Bump version number to 1.5.0 2024-02-20 17:33:11 +00:00
Simon Hausmann
5d45479576 Work around build issues with espressif_lvgl_port >= 1.5.0
esp-box fails to build with 1.5.0/lvgl9. Even thought 1.5 was marked as
yanked, it still shows up. So temporarily pin the examples to 1.4.0.
2024-02-01 14:15:03 +01:00
ogoffart
fec2b961db Bump version number to 1.4.1 2024-02-01 09:12:42 +00:00
Simon Hausmann
5e23dbe765 Fix reuse compliance check
Current versions of the reuse tool don't allow inline copyright and licsense information in SVG and CSV files anymore. Move those into the dep5 file.
2024-01-18 15:11:43 +01:00
ogoffart
b081c489d6 Bump version number to 1.4.0 2023-12-11 11:21:37 +00:00
ogoffart
b9255ab8e2 Bump version number to 1.3.2 2023-12-01 08:05:15 +00:00
ogoffart
0a5bf6c37b Bump version number to 1.3.1 2023-11-23 07:47:07 +00:00