Closed abayomi185 closed 5 months ago
The ex
and ey
coordinates are part of an inclusive range. Try this:
display
.set_pixels(
0,
0,
239,
319,
&mut [slint::platform::software_renderer::Rgb565Pixel(0);
constants::display::W as usize]
.iter()
.map(|x| embedded_graphics::pixelcolor::raw::RawU16::new(x.0).into()),
)
.unwrap();
Sadly no difference with this change
set_pixel
looks to work fine.
display.set_pixel(100, 200, Rgb565::new(0, 0, 0)).unwrap();
If set_pixel
works set_pixels
should also work, because they use very similar code:
https://github.com/almindor/mipidsi/blob/7ff5271e20b5d835e8ecc27537a49b5f55ec3e99/mipidsi/src/lib.rs#L198-L204
https://github.com/almindor/mipidsi/blob/7ff5271e20b5d835e8ecc27537a49b5f55ec3e99/mipidsi/src/lib.rs#L225-L240
Your code does only draw a single black line on top of the display, which might make it hard to see during debugging. Does this work display.set_pixels(0, 0, 239, 319, core::iter::repeat(Rgb565::MAGENTA).take(240 * 320))?;
?
Thanks! This works. It seems I have an issue elsewhere.
Hi, I'm using slint with mipidsi and attempting to use the
set_pixels
method to update the display with no luck.Other methods that use draw seem to work fine. Would you happen to know if I'm doing something wrong?
I am able to see the response from TestImage and clear.
Thanks