Scrolling / m5.lcd.readRect()



  • Dear M5 engineers and others,

    I would like to implement screen scrolling. For that I need the m5.lcd.readRect() function of the display code to work. It doesn't seem to work right now: it seems to return white pixels, no matter what's on the screen. I am trying:

    void scroll(uint8_t pixels) {
    	uint16_t buffer[TFT_W];
    	for (uint8_t n = 0; n < TFT_H - pixels; n++) {
    		m5.lcd.readRect(0, n + pixels, TFT_W, 1, buffer);
    		m5.lcd.pushRect(0, n, TFT_W, 1, buffer);
    	}
    }
    

    Am I doing something wrong? Is there any reason with the way the display is hooked up why reading wouldn't work, or anything one can do to make it work...? (I know I can speed up the scroll by moving more than 1 line at a time, I'll get to that when it works...)



  • Hi
    I'm having the same problem with the M5Stack/Advanced/Display/TFT_Screen_Capture example just get white screen captures (0xFFFF for any pixel )
    Keith