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

Ardiuno Compatible shields

Moderators: lily.li, violet

Post Reply
jhb82
Pre-kindergarten
Pre-kindergarten
Posts: 7
Joined: Tue Oct 29, 2013 1:39 am

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

Post by jhb82 » Sat Nov 02, 2013 4:34 am

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:

Code: Select all

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

Code: Select all

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!

User avatar
Jacket Chen
Staff
Staff
Posts: 659
Joined: Thu Jun 21, 2012 4:25 pm
Are you a staff member of seeedstudio?: yes
Which products/projects are your favorite?: Seeeduino Shields
Location: China

Re: Bug in EPAPER.h causes drawing issues with the 2.7" scre

Post by Jacket Chen » Tue Nov 26, 2013 4:00 pm

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
Love little, love long.

yexiaobo
Pre-kindergarten
Pre-kindergarten
Posts: 46
Joined: Tue Dec 11, 2012 10:53 am

Re: Bug in EPAPER.h causes drawing issues with the 2.7" scre

Post by yexiaobo » Tue Nov 26, 2013 4:08 pm

Hi

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

Post Reply