Pages: [1] 2 3   Go Down
Author Topic: Announcement: CTE has updated their drivers.  (Read 7680 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

CTE has released an updated driver, that fixed some of the problems we have been having.
Unfortunately the display is still mirrored, although annoying it is a minor inconvenience compared to some of the other problems i was having.

The "UTFT fonts" now display properly using the "UTFT print function" . This has been the main problem I was having. I have only done limited testing, but the results have been good. This means we can format numbers using the " PrintNnumI or the PrintNnumF " statements. It also means we can make our own fonts using the UTFT font converter, or we can do it manually, "kind of a pain". Unfortunately the fonts provided with the displays will still not work with the print statements.

The new drivers are currently available at http://coldtears.lin3.siteonlinetest.com/files/Arduino_DUE_TFT_library.zip.

These drivers should work with the mega and other compatible shields, but at this point since I do not have any other shields to test it on I cannot say for sure. If anyone contest these drivers on compatible shields please let us know if they work properly.

At least it's a step in the right direction. Being able to use the standard commands is a big plus.

promacjoe.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Note: I have now corrected the mirror issue in these drivers. I simply copied a set of parameters that I knew would display in the correct orientation  To the correct location in the " UTFT.cpp " file. In my case, the " SSD1963_800_CTE7 "section at line 2331. These parameters are for the 7" CTE display. So far everything displays and functions correctly.

In my case the parameters were obtained from a set of CTE drivers offered from " ageurtse ", a member of this form, thank you for your assistance.

I hope this will help someone else.

promacjoe
Logged

Alamos, Sonora, Mexico
Offline Offline
Full Member
***
Karma: 5
Posts: 134
learning never stops.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Joe,
thanks for this info. I need to finish a few modifications to my 5" & 7" boards (Font ICs..which Coldtears is sending me with my latest shipment). I have more interest in the 5" version than the 7".. However, I will still be interested in looking at the parameters you are all using in the CPP file for the CTE7. I'm also working with the 3.5 480X320 LCD as well. Daniel Hernandez and I, both here in Guaymas, Sonora, Mexico, are trying to get these LCDs to suit our needs.
Peter
Logged

Quiero una vida simple en Mexico...nada mas.

Alamos, Sonora, Mexico
Offline Offline
Full Member
***
Karma: 5
Posts: 134
learning never stops.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Joe,
Could you share those updated parameters with us?  For the 7" CTE LCD?  I have that one, plus the 5".

I've noted even with the new drivers.... you still have to rotate the display 180deg. (in our case the entire DUE as we are using the CTE shield as well.... which means the power connector and usb connectors are on the wrong side of our enclosure.)
Logged

Quiero una vida simple en Mexico...nada mas.

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I obtained the parameters from this post, " updated library UTFT version 2.1 with a CTE shield " at http://arduino.cc/forum/index.php/topic,158782.0.html.
Download the file given, and go to the " tft_drivers "directory. Then go down to the directory that matches the controller for your LCD, open the file that corresponds to your LCD resolution. Compare these parameters to the parameters in the "CTE UTFT" drivers. Change any parameters that do not match.

Note: I believe the 5" and 7" TFT LCDs use the same controllers and should use the same parameters.

There is also a discussion about these parameters under this post " FIXED: SSD1963 controller with 7" TFT (horizontally mirrored image) ". at  http://arduino.cc/forum/index.php?PHPSESSID=ff622bb36029623ad0f1cf6495b33aca&topic=152053.0

This is the best information I can give you. Since I am still learning "C" myself I can only pass on the information that I get. Fortunately others with better skills has posted really good information. And by the way thanks to those who have contributed their knowledge, it has really helped me.  Other than that you'll just have to do your homework just like I did.

promacjoe
Logged

Alamos, Sonora, Mexico
Offline Offline
Full Member
***
Karma: 5
Posts: 134
learning never stops.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm happy with the results of these new drivers.  NO reversing of any kind of any objects (bitmaps, texts, simple primitives, etc...)
I've have tested in on the 5" 1963 based board (800X480). Performance seems decent too.
Logged

Quiero una vida simple en Mexico...nada mas.

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's a shame they haven't updated them based on the latest set of files (in the latest set each display has it's own definitions file). Will be taking a look at this today....
Logged

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well it worked straight from the download.

Lets see if the SD card and touch bits work......

Then I need to start writing my GUI smiley
Logged

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

With their own 7" TFT display, their own shield and their own software the display demo works perfectly but the touch screen demo isn't quite right....

So if you copy the following files into the latest CTE Due TFT library directory:

Utouch.cpp
Utouch.h
UtouchCD.h
Examples/CTE_TestTP_DUE

... and then you then copy Henning's calibration sketch into the examples directory and change the screen and pinouts to:

Code:
UTFT        myGLCD(CTE70);   // Remember to change the model parameter to suit your display module!
UTouch      myTouch(6,5,32,3,2);


The issue begins with the touch sensor being rotated by 180 degrees, so by subtracting the resolution off each we get a correctISH figure i.e....

Code:
 x = myTouch.getX();
  y = myTouch.getY();
  Serial1.print(x);
  Serial1.print(",");
  Serial1.println(y);
  String test_string = String(509-x)+" , "+String(264-y) + "                ";


Henning's screen in the calibration file is a ITDB02-3.2S so a lower resolution....

These are the figures he got:

Code:
#define CAL_X 0x03DE005DUL
#define CAL_Y 0x03B40106UL
#define CAL_S 0xF31FD108UL


Running Henning's calibration routine on my CTE70 gives these figures:

Code:
#define CAL_X 0x000b2911UL
#define CAL_Y 0x000b1a2cUL
#define CAL_S 0x8031f1dfUL


If I place those figures into the UTouchCD.h file the touch screen fails to work at all....

IF I then use a mixture of them i.e.

Code:
#define CAL_X 0x03DE005DUL
#define CAL_Y 0x03B40106UL
#define CAL_S 0xF31FD108UL

//Attempt at the CTE70
//#define CAL_X 0x000b2911UL
//#define CAL_Y 0x000b1a2cUL
#define CAL_S 0x8031f1dfUL


The resolution is correct although still reversed BUT it does not read past 765 of 800 in the X axis or 479 in the Y axis. (Although using the calibration sketch it read to the edge of the touch screen).
« Last Edit: April 28, 2013, 08:36:39 am by cowasaki » Logged

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok I've modified the touch library to add functions:

setReverseX(boolean)
setReverseY(boolean)

Both of which DEFAULT to reversed......

Utouch.h

Code:
/*
  UTouch.h - Arduino/chipKit library support for Color TFT LCD Touch screens
  Copyright (C)2010-2012 Henning Karlsen. All right reserved
  
  Basic functionality of this library are based on the demo-code provided by
  ITead studio. You can find the latest version of the library at
  http://www.henningkarlsen.com/electronics

  If you make any modifications or improvements to the code, I would appreciate
  that you share the code with me so that I might include it in the next release.
  I can be contacted through http://www.henningkarlsen.com/electronics/contact.php

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#ifndef UTouch_h
#define UTouch_h

#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

#define PORTRAIT 0
#define LANDSCAPE 1

#define PREC_LOW 1
#define PREC_MEDIUM 2
#define PREC_HI 3
#define PREC_EXTREME 4

class UTouch
{
public:
word TP_X ,TP_Y;

UTouch(byte tclk, byte tcs, byte tdin, byte dout, byte irq);

void InitTouch(byte orientation = LANDSCAPE);
void read();
bool dataAvailable();
int getX();
int getY();
void setPrecision(byte precision);
void setReverseX(boolean reversed);
void setReverseY(boolean reversed);
    
    private:
byte T_CLK, T_CS, T_DIN, T_DOUT, T_IRQ;
long _default_orientation;
byte orient;
byte prec;
byte display_model;
long disp_x_size, disp_y_size, default_orientation;
long touch_x_left, touch_x_right, touch_y_top, touch_y_bottom;

void touch_WriteData(byte data);
        word touch_ReadData();
bool _revTouchX;
bool _revTouchY;

};

#endif

Utouch.cpp

Code:
/*
  UTouch.cpp - Arduino/chipKit library support for Color TFT LCD Touch screens
  Copyright (C)2010-2012 Henning Karlsen. All right reserved
  
  Basic functionality of this library are based on the demo-code provided by
  ITead studio. You can find the latest version of the library at
  http://www.henningkarlsen.com/electronics

  If you make any modifications or improvements to the code, I would appreciate
  that you share the code with me so that I might include it in the next release.
  I can be contacted through http://www.henningkarlsen.com/electronics/contact.php

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#include "UTouch.h"
#include "UTouchCD.h"

UTouch::UTouch(byte tclk, byte tcs, byte din, byte dout, byte irq)
{
    T_CLK        = tclk;
    T_CS         = tcs;
    T_DIN        = din;
    T_DOUT       = dout;
    T_IRQ        = irq;
}


void UTouch::InitTouch(byte orientation)
{
orient = orientation;
_default_orientation = CAL_S>>31;

touch_x_left = (CAL_X>>14) & 0x3FFF;
touch_x_right = CAL_X & 0x3FFF;

touch_y_top = (CAL_Y>>14) & 0x3FFF;
touch_y_bottom = CAL_Y & 0x3FFF;

disp_x_size = (CAL_S>>12) & 0x0FFF;
disp_y_size = CAL_S & 0x0FFF;

prec = 10;

_revTouchX = true;
_revTouchY = true;

pinMode(T_CLK,  OUTPUT);
    pinMode(T_CS,   OUTPUT);
    pinMode(T_DIN,  OUTPUT);
    pinMode(T_DOUT, INPUT);
    pinMode(T_IRQ,  OUTPUT);

digitalWrite(T_CS,  HIGH);
digitalWrite(T_CLK, HIGH);
digitalWrite(T_DIN, HIGH);
digitalWrite(T_CLK, HIGH);
}

void UTouch::touch_WriteData(byte data)
{
byte temp;
byte nop;

temp=data;
digitalWrite(T_CLK,LOW);

for(byte count=0; count<8; count++)
{
if(temp & 0x80)
digitalWrite(T_DIN, HIGH);
else
digitalWrite(T_DIN, LOW);
temp = temp << 1;
digitalWrite(T_CLK, LOW);                
nop++;
digitalWrite(T_CLK, HIGH);
nop++;
}
}

word UTouch::touch_ReadData()
{
byte nop;
word data = 0;
for(byte count=0; count<12; count++)
{
data <<= 1;
digitalWrite(T_CLK, HIGH);              
nop++;
digitalWrite(T_CLK, LOW);
nop++;
if (digitalRead(T_DOUT))
data++;
}
return(data);
}

void UTouch::read()
{
unsigned long tx=0, temp_x=0;
unsigned long ty=0, temp_y=0;
int datacount=0;

digitalWrite(T_CS,LOW);                    

for (int i=0; i<prec; i++)
{
touch_WriteData(0x90);        
digitalWrite(T_CLK,HIGH);
digitalWrite(T_CLK,LOW);
temp_x=touch_ReadData();

touch_WriteData(0xD0);      
digitalWrite(T_CLK,HIGH);
digitalWrite(T_CLK,LOW);
temp_y=touch_ReadData();

if (!((temp_x>max(touch_x_left, touch_x_right)) or (temp_x==0) or (temp_y>max(touch_y_top, touch_y_bottom)) or (temp_y==0)))
{
ty+=temp_x;
tx+=temp_y;
datacount++;
}
}

digitalWrite(T_CS,HIGH);
if (datacount>0)
{
if (orient == _default_orientation)
{
TP_X=tx/datacount;
TP_Y=ty/datacount;
}
else
{
TP_X=ty/datacount;
TP_Y=tx/datacount;
}
}
else
{
TP_X=-1;
TP_Y=-1;
}
}

bool UTouch::dataAvailable()
{
bool avail;
pinMode(T_IRQ,  INPUT);
avail = !digitalRead(T_IRQ);
pinMode(T_IRQ,  OUTPUT);
return avail;
}

int UTouch::getX()
{
long c;

if (orient == _default_orientation)
{
c = long(long(TP_X - touch_x_left) * (disp_x_size)) / long(touch_x_right - touch_x_left);
if (c<0)
c = 0;
if (c>disp_x_size)
c = disp_x_size;
}
else
{
if (_default_orientation == PORTRAIT)
c = long(long(TP_X - touch_y_top) * (-disp_y_size)) / long(touch_y_bottom - touch_y_top) + long(disp_y_size);
else
c = long(long(TP_X - touch_y_top) * (disp_y_size)) / long(touch_y_bottom - touch_y_top);
if (c<0)
c = 0;
if (c>disp_y_size)
c = disp_y_size;
}
    if (_revTouchX) c=disp_x_size-c;
    return c;
}

int UTouch::getY()
{
int c;

if (orient == _default_orientation)
{
c = long(long(TP_Y - touch_y_top) * (disp_y_size)) / long(touch_y_bottom - touch_y_top);
if (c<0)
c = 0;
if (c>disp_y_size)
c = disp_y_size;
}
else
{
if (_default_orientation == PORTRAIT)
c = long(long(TP_Y - touch_x_left) * (disp_x_size)) / long(touch_x_right - touch_x_left);
else
c = long(long(TP_Y - touch_x_left) * (-disp_x_size)) / long(touch_x_right - touch_x_left) + long(disp_x_size);
if (c<0)
c = 0;
if (c>disp_x_size)
c = disp_x_size;
}
if (_revTouchY) c=disp_y_size-c;
    return c;
}

void UTouch::setPrecision(byte precision)
{
switch (precision)
{
case PREC_LOW:
prec=1;
break;
case PREC_MEDIUM:
prec=10;
break;
case PREC_HI:
prec=25;
break;
case PREC_EXTREME:
prec=100;
break;
default:
prec=10;
break;
}
}

void UTouch::setReverseX(boolean reversed)
{
if (reversed)
{
   _revTouchX=true;
    }
    else
    {
   _revTouchX=false;
    }
}

void UTouch::setReverseY(boolean reversed)
{
if (reversed)
{
   _revTouchY=true;
    }
    else
    {
   _revTouchY=false;
    }
}

Logged

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Henning's button demo works straight out of the box with the modified library using the CTE70 screen, CTE shield and Due.

Code:
// UTouch_ButtonTest (C)2010-2012 Henning Karlsen
// web: http://www.henningkarlsen.com/electronics
//
// This program is a quick demo of how create and use buttons.
//
// This program requires the UTFT library.
//
// It is assumed that the display module is connected to an
// appropriate shield or that you know how to change the pin
// numbers in the setup.
//

#include <UTFT.h>
#include <UTouch.h>

// Declare which fonts we will be using
extern uint8_t BigFont[];

// Uncomment the next two lines for the Arduino 2009/UNO
//UTFT        myGLCD(ITDB24D,19,18,17,16);   // Remember to change the model parameter to suit your display module!
//UTouch      myTouch(15,10,14,9,8);

UTFT        myGLCD(CTE70);   // Remember to change the model parameter to suit your display module!
UTouch      myTouch(6,5,32,3,2);

int x, y;
char stCurrent[20]="";
int stCurrentLen=0;
char stLast[20]="";

/*************************
**   Custom functions   **
*************************/

void drawButtons()
{
// Draw the upper row of buttons
  for (x=0; x<5; x++)
  {
    myGLCD.setColor(0, 0, 255);
    myGLCD.fillRoundRect (10+(x*60), 10, 60+(x*60), 60);
    myGLCD.setColor(255, 255, 255);
    myGLCD.drawRoundRect (10+(x*60), 10, 60+(x*60), 60);
    myGLCD.printNumI(x+1, 27+(x*60), 27);
  }
// Draw the center row of buttons
  for (x=0; x<5; x++)
  {
    myGLCD.setColor(0, 0, 255);
    myGLCD.fillRoundRect (10+(x*60), 70, 60+(x*60), 120);
    myGLCD.setColor(255, 255, 255);
    myGLCD.drawRoundRect (10+(x*60), 70, 60+(x*60), 120);
    if (x<4)
      myGLCD.printNumI(x+6, 27+(x*60), 87);
  }
  myGLCD.print("0", 267, 87);
// Draw the lower row of buttons
  myGLCD.setColor(0, 0, 255);
  myGLCD.fillRoundRect (10, 130, 150, 180);
  myGLCD.setColor(255, 255, 255);
  myGLCD.drawRoundRect (10, 130, 150, 180);
  myGLCD.print("Clear", 40, 147);
  myGLCD.setColor(0, 0, 255);
  myGLCD.fillRoundRect (160, 130, 300, 180);
  myGLCD.setColor(255, 255, 255);
  myGLCD.drawRoundRect (160, 130, 300, 180);
  myGLCD.print("Enter", 190, 147);
  myGLCD.setBackColor (0, 0, 0);
}

void updateStr(int val)
{
  if (stCurrentLen<20)
  {
    stCurrent[stCurrentLen]=val;
    stCurrent[stCurrentLen+1]='\0';
    stCurrentLen++;
    myGLCD.setColor(0, 255, 0);
    myGLCD.print(stCurrent, LEFT, 224);
  }
  else
  {
    myGLCD.setColor(255, 0, 0);
    myGLCD.print("BUFFER FULL!", CENTER, 192);
    delay(500);
    myGLCD.print("            ", CENTER, 192);
    delay(500);
    myGLCD.print("BUFFER FULL!", CENTER, 192);
    delay(500);
    myGLCD.print("            ", CENTER, 192);
    myGLCD.setColor(0, 255, 0);
  }
}

// Draw a red frame while a button is touched
void waitForIt(int x1, int y1, int x2, int y2)
{
  myGLCD.setColor(255, 0, 0);
  myGLCD.drawRoundRect (x1, y1, x2, y2);
  while (myTouch.dataAvailable())
    myTouch.read();
  myGLCD.setColor(255, 255, 255);
  myGLCD.drawRoundRect (x1, y1, x2, y2);
}

/*************************
**  Required functions  **
*************************/

void setup()
{
// Initial setup
  myGLCD.InitLCD();
  myGLCD.clrScr();

//    myGLCD.Swtich_LCD_TB_Bit(1);
myTouch.InitTouch();
  myTouch.setPrecision(PREC_MEDIUM);

  myGLCD.setFont(BigFont);
  myGLCD.setBackColor(0, 0, 255);
  drawButtons(); 
}

void loop()
{
  while (true)
  {
    if (myTouch.dataAvailable())
    {
      myTouch.read();
      x=myTouch.getX();
      y=myTouch.getY();
     
      if ((y>=10) && (y<=60))  // Upper row
      {
        if ((x>=10) && (x<=60))  // Button: 1
        {
          waitForIt(10, 10, 60, 60);
          updateStr('1');
        }
        if ((x>=70) && (x<=120))  // Button: 2
        {
          waitForIt(70, 10, 120, 60);
          updateStr('2');
        }
        if ((x>=130) && (x<=180))  // Button: 3
        {
          waitForIt(130, 10, 180, 60);
          updateStr('3');
        }
        if ((x>=190) && (x<=240))  // Button: 4
        {
          waitForIt(190, 10, 240, 60);
          updateStr('4');
        }
        if ((x>=250) && (x<=300))  // Button: 5
        {
          waitForIt(250, 10, 300, 60);
          updateStr('5');
        }
      }

      if ((y>=70) && (y<=120))  // Center row
      {
        if ((x>=10) && (x<=60))  // Button: 6
        {
          waitForIt(10, 70, 60, 120);
          updateStr('6');
        }
        if ((x>=70) && (x<=120))  // Button: 7
        {
          waitForIt(70, 70, 120, 120);
          updateStr('7');
        }
        if ((x>=130) && (x<=180))  // Button: 8
        {
          waitForIt(130, 70, 180, 120);
          updateStr('8');
        }
        if ((x>=190) && (x<=240))  // Button: 9
        {
          waitForIt(190, 70, 240, 120);
          updateStr('9');
        }
        if ((x>=250) && (x<=300))  // Button: 0
        {
          waitForIt(250, 70, 300, 120);
          updateStr('0');
        }
      }

      if ((y>=130) && (y<=180))  // Upper row
      {
        if ((x>=10) && (x<=150))  // Button: Clear
        {
          waitForIt(10, 130, 150, 180);
          stCurrent[0]='\0';
          stCurrentLen=0;
          myGLCD.setColor(0, 0, 0);
          myGLCD.fillRect(0, 224, 319, 239);
        }
        if ((x>=160) && (x<=300))  // Button: Enter
        {
          waitForIt(160, 130, 300, 180);
          if (stCurrentLen>0)
          {
            for (x=0; x<stCurrentLen+1; x++)
            {
              stLast[x]=stCurrent[x];
            }
            stCurrent[0]='\0';
            stCurrentLen=0;
            myGLCD.setColor(0, 0, 0);
            myGLCD.fillRect(0, 208, 319, 239);
            myGLCD.setColor(0, 255, 0);
            myGLCD.print(stLast, LEFT, 208);
          }
          else
          {
            myGLCD.setColor(255, 0, 0);
            myGLCD.print("BUFFER EMPTY", CENTER, 192);
            delay(500);
            myGLCD.print("            ", CENTER, 192);
            delay(500);
            myGLCD.print("BUFFER EMPTY", CENTER, 192);
            delay(500);
            myGLCD.print("            ", CENTER, 192);
            myGLCD.setColor(0, 255, 0);
          }
        }
      }
    }
  }
}
Logged

Alamos, Sonora, Mexico
Offline Offline
Full Member
***
Karma: 5
Posts: 134
learning never stops.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Actually,
with my display, I noted something completely different...

when I used the get(x) function it was returning the y..

So I just flipped the asssignments..
Then I scale the 509X264 to match 800X480... sure makes figuring out which object was touched much easier.
NO problem with the SD either, as I was able to upload a custom 800X480 image.

I'm much happier with this.... with the other libraries... the smaller y axis had 509 points of resolution... where as the larger x axis only had 264... It's much better now...and by applying a scaling factor, you are always working in the same units.
Logged

Quiero una vida simple en Mexico...nada mas.

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Actually,
with my display, I noted something completely different...

when I used the get(x) function it was returning the y..

So I just flipped the asssignments..
Then I scale the 509X264 to match 800X480... sure makes figuring out which object was touched much easier.
NO problem with the SD either, as I was able to upload a custom 800X480 image.

I'm much happier with this.... with the other libraries... the smaller y axis had 509 points of resolution... where as the larger x axis only had 264... It's much better now...and by applying a scaling factor, you are always working in the same units.

The 509x264 is fixed by the last line of the CD file.
Logged

Alamos, Sonora, Mexico
Offline Offline
Full Member
***
Karma: 5
Posts: 134
learning never stops.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You know..the last thing I want to do is modify libraries when I buy something. 

I simply want to work on my own projects and prototypes..and just have the stuff I BUY....well... WORK as advertised.

You are correct though...everything from ColdTears comes rotated 180 degF.  That still persists.

So, with your modifications everything works...and is rotated correctly? Touch and Display? If so, have you thought about feeding those changes back to ColdTearsElectronics?
Logged

Quiero una vida simple en Mexico...nada mas.

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You know..the last thing I want to do is modify libraries when I buy something. 

I simply want to work on my own projects and prototypes..and just have the stuff I BUY....well... WORK as advertised.

You are correct though...everything from ColdTears comes rotated 180 degF.  That still persists.

So, with your modifications everything works...and is rotated correctly? Touch and Display? If so, have you thought about feeding those changes back to ColdTearsElectronics?

Yes I had thought about it.  I'm just working on something at the moment and will then pass it back.  What would be better for me is to get all the pin outs and pass everything back to Henning so it can be added to the genuine library and work from there.

I'm working on a GUI library which will work with the other 3 libraries (UTFT, UTouch and SD card).  I'm working on normal buttons, radio buttons/groups, check boxs, pop up numeric/hex & alpha keyboards, pop-up message boxes etc.  Biggest problem I have though is working out how to implement it into the IDE properly.  PaulS has been giving me some help as I didn't know how to use one library from another.  I think we are nearly there with that so it will be a case of implementing all the goodies then.
Logged

Pages: [1] 2 3   Go Up
Jump to: