Bug in EPAPER.h causes drawing issues with the 2.7" screen

This is meant to help anyone else out who has the small e-paper shield and the 2.7 e-paper screen. EPAPER.h that came in the library used for writing to the Seeed e-paper screens will work fine for the smaller screen sizes sold. However, there is an issue with 2.7" screens. The 2.7" screen has 264 pixels. However, in EPAPER.h, the drawPixel method (which is used EVERYWHERE) assigns the X and Y parameters to “unsigned char datatypes.” This only allows addressable pixels from 0 to 255. To allow drawing to all pixels, change:

inline void drawPixel([b]unsigned char[/b] x, [b]unsigned char[/b] y, unsigned char color)
{
	eSD.putPixel(x, y, color);
}

…to:

inline void drawPixel([b]int[/b] x, [b]int[/b] y, unsigned char color)
{
	eSD.putPixel(x, y, color);
       
}

I hope that helps someone else!

Sounds right. We will check it, thanks for your attention. By the way, we sincere appreciate anyone who can point out our bug within our libraries or schematic. Later, we will do more measures to inspire those people. Thanks for your spirit of sharing.

Best Regards
Jacket

Hi

Welcome to pull request :slight_smile:. github.com/Seeed-Studio/ePaper