Page 1 of 1
ssd1306 oled: scroll repeats edge pixels
Posted: Sun Jul 22, 2018 7:23 pm
by jarekd
Hey. When I scroll screen using scroll(x,y), if there were any pixels touching the edge of the screen it repeats them over and over. Is there any way to avoid this?
Re: ssd1306 oled: scroll repeats edge pixels
Posted: Mon Sep 03, 2018 11:35 pm
by mfitzp
Did you find a solution to this? I saw something similar when playing around with a scrolling heart-beat display, but can't remember how I solved it. I think in the end I may have been drawing over the end of the screen buffer when attempting to draw the pixels to 'scroll in', or maybe I just started drawing at 1px in from the edge.
If you draw on the left and scroll left does it appear on the right?
Re: ssd1306 oled: scroll repeats edge pixels
Posted: Tue Sep 04, 2018 12:04 pm
by pythoncoder
I don't know if this is relevant but the framebuf scroll method does not erase pixels revealed by scrolling. So, for example, if you scroll down by 3 rows the top 3 rows will still contain the original pixels. This is by design.
Re: ssd1306 oled: scroll repeats edge pixels
Posted: Tue Sep 04, 2018 9:43 pm
by mcauser
The frame buffer scroll is like a copy-n-paste, resulting in artefacts like you described. Try scrolling 5px or 10px and it should make the effect more obvious.
The hardware scroll methods shifts the pointer to the display memory, resulting in pixel wrap around. You don’t have to scroll the entire display either. You can select a window. Have a look at the SSD1306 datasheet. There’s a bunch of commands you can call, unsupported by the native driver, which let you push pixels around.
Re: ssd1306 oled: scroll repeats edge pixels
Posted: Thu Sep 20, 2018 3:59 pm
by jarekd
The only solution to fix this, is just scrolling and then drawing empty rectangle in place, where garbage shows up.
Re: ssd1306 oled: scroll repeats edge pixels
Posted: Sat Sep 22, 2018 5:15 am
by pythoncoder
Yes.
Take a look at
the code. The way the framebuf scroll method works was a deliberate design decision. Personally I think an option to clear the revealed area would be a good idea. But
the docs are quite clear about this effect.
Re: ssd1306 oled: scroll repeats edge pixels
Posted: Tue Jun 16, 2020 8:50 pm
by BigStupidBeast
the problem is still not resolved