Thread: Development lcd2eink
View Single Post
Old 08-15-2011, 10:22 PM   #111
javese
Zealot
javese will become famous soon enoughjavese will become famous soon enoughjavese will become famous soon enoughjavese will become famous soon enoughjavese will become famous soon enoughjavese will become famous soon enough
 
Posts: 134
Karma: 589
Join Date: Jun 2011
Device: Entourage Pocket Edge(Black)
Quote:
Originally Posted by fgruber View Post
how do you map the eink to the LCD? I'm just curious.
Here is the code for mapping:
if(data.type == 3 && data.code == 0) /*abs,x should be mapped to abs,y*/
{
code = 1;
value = (data.value-wacomStartX)*(tabletEndY-tabletStartY)/(wacomEndX-wacomStartX)+tabletStartY;
}
else if(data.type == 3 && data.code == 1) /*abs,y should be mapped to abs,x*/
{
code = 0;
value = tabletEndX-(value-wacomStartY)*(tabletEndX-tabletStartX)/(wacomEndY-wacomStartY);
}
javese is offline   Reply With Quote