-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using with slint #5
Comments
Please provide more information:
Please do not provide external exceptions such as:
At the library level, we cannot support issues caused by other libraries. What are the requirements for Line 164 in 6b3ddc8
|
I think the key difference between Will try to submit minimal reproduceable example soon |
In progress of stripping down everything, the exception went away but it's not displaying correctly Here is what I get: Branch with code: I have tried changing rotation and replacing the example for (i, pixel_color) in buffer.iter().enumerate() {
self.display.set_pixel(i as _, line as _, pixel_color.0);
} It almost feels like it's either rendering the very last bit or one of the axis is flipped Any help with this is appreciated |
@rsov did you/could you display a basic rectangle with embedded_graphics via https://github.com/IniterWorker/esp32-s3-touch-lcd-1-28/blob/d02db8cf16075181fba171390b3d3251ff3f2383/src/main.rs#L34 ?
|
Yes the example code worked well with direct draw calls Sorry, I am out of my depth when it comes to embedded environments and rust. What would be some good keywords to search for to get started? |
You may have been on the right track with the double buffering issue I have forked and added a method to send buffer data directly. It works... but the colors are all wrong and it lost the sharpness. Will see if it's possible to improve it further https://github.com/rsov/gc9a01/blob/7f5a94657cf327b9a23a1a80a28fe015edc09cdd/src/driver.rs#L287 and i send data to it this way self.display
.send_line(&buffer.iter().map(|&x| x.0).collect::<Vec<u16>>())
.unwrap(); |
Please always provide an example. Mainly a color shift from your end with EDIT // Pure speculation
use embedded_graphics_core::pixelcolor::raw::RawU16;
self.display
.send_line(&buffer.iter().map(|&x| RawU16::new(x.0).into()).collect::<Vec<RawU16>>())
.unwrap(); |
I am implementing the esp32-s3-touch-lcd-1-28 with It seems like a better approach for |
@IniterWorker It does look somewhat similar. I think I got it to work on my project but haven't had the time to fork your example code and port it there |
@IniterWorker Got the example repo up https://github.com/rsov/esp_s3_touch_lcd_1_28_example_slint See this commit in driver, gives direct access to the buffer rsov@b1c71fe then it is used here to send data to screen in the example I can open a PR for it but it does not feel like I have implemented it the correct way |
Seems like you are missing some commands rsov@b1c71fe like Maybe, I should provide an unbuffered driver to easly customize the driver implementation/usage. NOTE: You may encouter #8, I will fix this soon. |
So I've tried implementing And it works! 🚀 But UI feels slower compared to just writing it directly like rsov@b1c71fe because you have to flush buffer after each line. And this way doesn't do screen rotation and has endianness issues I will see if I can make something like this method but public Line 265 in 89adb34
Or this that accepts RBG color Line 127 in 89adb34
|
If you're looking for performance and direct access without buffering, I've made changes to the master branch. Could you please give it a try and provide some feedback? let mut display_driver = Gc9a01::new(
interface,
DisplayResolution240x240,
DisplayRotation::Rotate180,
); I added Here is an example with let buffer = DrawBuffer::<{ 12 * 240_usize }>::default();
let display = Display::register(buffer, 240, 240, |refresh| {
display_driver
.fill_contiguous(
&Rectangle::new(
Point::new(refresh.area.x1.into(), refresh.area.y1.into()),
Size::new(
(refresh.area.x2 - refresh.area.x1) as u32 + 1,
(refresh.area.y2 - refresh.area.y1) as u32 + 1,
),
),
refresh
.as_pixels::<Rgb565>()
.into_iter()
.map(|color| color.1),
)
.unwrap();
})
.unwrap(); |
@IniterWorker Works like a charm! |
Hello, great library!
I am trying to use it with slint on esp32-s3 and I am getting
Exception occured 'LoadProhibited'
errorThe funny thing is, my equivalent implementation of https://github.com/slint-ui/slint/blob/cadfd9e1041214021a375795df9ef96e45d14999/examples/mcu-board-support/esp32_s3_box.rs#L219 is
Do you have any ideas why this is happening?
If not, would it be worth while implementing
set_pixels
method in this driver like it is implemented in this one? https://github.com/almindor/st7789/blob/e18dc571c1e2adb56bf9c6511887845b852f69c6/src/lib.rs#L236Thank you!
The text was updated successfully, but these errors were encountered: