[ANNOUNCE] TouchTFT 0.0.3

  • Sorry, bin momentan nicht so oft aktiv, meine neue Wohnung ist DVB-los...


    1) Die Setup-Einstellungen scheinen tatsächlich beim mergen rausgefallen zu sein. Das Speichern etc ist da, nur die Einträge werden nicht angezeigt. Werde das mal ändern.


    2) Wenn ich mich recht erinnere, hat bei mir 720x576 als Bildschirmauflösung geklappt, obwohl ich ein VGA-Display an einem /dev/fb mit Auflösung 800x600 hatte (Matrox G550).


    3) IG88: Könntest Du mal diejenigen Einträge aus dem Log posten, die sich auf das tippen in die 4 Ecken (am besten im Uhrzeigersinn) und die Bilschirmmitte beziehen?


    Lars

  • LarsAC


    bei der 0.0.3 kann ich zwar die werte für logtyp und loglevel eintragen, bekomme aber sichts (loglevel 8 und syslog bzw. file)
    da das calibrate aber werte liefert und es "nur" an vertauschten achsen und deren orientierung liegt ...


    ich habe jetzt nach dem calibrate bei y die min und max werte getauscht und jetzt funktioniert es wie man es erwartet

  • Hi LarsAC,


    ich erhalte folgende Werte mit evtest:
    OL
    Event: time 1172869674.308197, type 1 (Key), code 330 (Touch), value 1
    Event: time 1172869674.308198, type 3 (Absolute), code 0 (X), value 1925
    Event: time 1172869674.308198, type 3 (Absolute), code 1 (Y), value 85
    Event: time 1172869674.308202, -------------- Report Sync ------------
    Event: time 1172869674.348187, type 3 (Absolute), code 0 (X), value 1924
    Event: time 1172869674.348189, -------------- Report Sync ------------
    Event: time 1172869674.352186, type 1 (Key), code 330 (Touch), value 0
    Event: time 1172869674.352190, -------------- Report Sync ------------
    OR
    Event: time 1172869683.654577, type 1 (Key), code 330 (Touch), value 1
    Event: time 1172869683.654578, type 3 (Absolute), code 0 (X), value 120
    Event: time 1172869683.654578, type 3 (Absolute), code 1 (Y), value 65
    Event: time 1172869683.654583, -------------- Report Sync ------------
    Event: time 1172869683.694562, type 3 (Absolute), code 1 (Y), value 64
    Event: time 1172869683.694564, -------------- Report Sync ------------
    Event: time 1172869683.714558, type 3 (Absolute), code 0 (X), value 121
    Event: time 1172869683.714559, -------------- Report Sync ------------
    Event: time 1172869683.734555, type 3 (Absolute), code 1 (Y), value 63
    Event: time 1172869683.734557, -------------- Report Sync ------------
    Event: time 1172869683.738554, type 1 (Key), code 330 (Touch), value 0
    Event: time 1172869683.738557, -------------- Report Sync ------------


    UR
    Event: time 1172869702.091368, type 1 (Key), code 330 (Touch), value 1
    Event: time 1172869702.091370, type 3 (Absolute), code 0 (X), value 133
    Event: time 1172869702.091370, type 3 (Absolute), code 1 (Y), value 1716
    Event: time 1172869702.091373, -------------- Report Sync ------------
    Event: time 1172869702.151359, type 3 (Absolute), code 0 (X), value 132
    Event: time 1172869702.151361, -------------- Report Sync ------------
    Event: time 1172869702.171358, type 3 (Absolute), code 0 (X), value 129
    Event: time 1172869702.171359, type 3 (Absolute), code 1 (Y), value 1715
    Event: time 1172869702.171364, -------------- Report Sync ------------
    Event: time 1172869702.179352, type 3 (Absolute), code 0 (X), value 125
    Event: time 1172869702.179353, type 3 (Absolute), code 1 (Y), value 1714
    Event: time 1172869702.179355, -------------- Report Sync ------------
    Event: time 1172869702.199350, type 3 (Absolute), code 0 (X), value 121
    Event: time 1172869702.199351, type 3 (Absolute), code 1 (Y), value 1713
    Event: time 1172869702.199356, -------------- Report Sync ------------
    Event: time 1172869702.219345, type 3 (Absolute), code 0 (X), value 117
    Event: time 1172869702.219346, type 3 (Absolute), code 1 (Y), value 1714
    Event: time 1172869702.219349, -------------- Report Sync ------------
    Event: time 1172869702.223346, type 1 (Key), code 330 (Touch), value 0
    Event: time 1172869702.223349, -------------- Report Sync ------------


    UL
    Event: time 1172869710.405922, type 1 (Key), code 330 (Touch), value 1
    Event: time 1172869710.405924, type 3 (Absolute), code 0 (X), value 1919
    Event: time 1172869710.405924, type 3 (Absolute), code 1 (Y), value 1742
    Event: time 1172869710.405928, -------------- Report Sync ------------
    Event: time 1172869710.461916, type 3 (Absolute), code 0 (X), value 1917
    Event: time 1172869710.461917, type 3 (Absolute), code 1 (Y), value 1744
    Event: time 1172869710.461919, -------------- Report Sync ------------
    Event: time 1172869710.481912, type 3 (Absolute), code 0 (X), value 1915
    Event: time 1172869710.481913, type 3 (Absolute), code 1 (Y), value 1749
    Event: time 1172869710.481917, -------------- Report Sync ------------
    Event: time 1172869710.501905, type 3 (Absolute), code 0 (X), value 1912
    Event: time 1172869710.501906, type 3 (Absolute), code 1 (Y), value 1754
    Event: time 1172869710.501910, -------------- Report Sync ------------
    Event: time 1172869710.505904, type 1 (Key), code 330 (Touch), value 0
    Event: time 1172869710.505908, -------------- Report Sync ------------


    Mitte (ca)
    Event: time 1172869722.323852, type 1 (Key), code 330 (Touch), value 1
    Event: time 1172869722.323853, type 3 (Absolute), code 0 (X), value 985
    Event: time 1172869722.323853, type 3 (Absolute), code 1 (Y), value 912
    Event: time 1172869722.323858, -------------- Report Sync ------------
    Event: time 1172869722.363838, type 3 (Absolute), code 0 (X), value 984
    Event: time 1172869722.363839, type 3 (Absolute), code 1 (Y), value 911
    Event: time 1172869722.363841, -------------- Report Sync ------------
    Event: time 1172869722.383835, type 3 (Absolute), code 0 (X), value 983
    Event: time 1172869722.383836, type 3 (Absolute), code 1 (Y), value 910
    Event: time 1172869722.383837, -------------- Report Sync ------------
    Event: time 1172869722.403833, type 3 (Absolute), code 0 (X), value 981
    Event: time 1172869722.403833, type 3 (Absolute), code 1 (Y), value 909
    Event: time 1172869722.403835, -------------- Report Sync ------------
    Event: time 1172869722.407830, type 1 (Key), code 330 (Touch), value 0
    Event: time 1172869722.407832, -------------- Report Sync ------------


    Gruß Frank

  • Achso. Sorry.


    Bei Dir ist der Koordinatenursprung oben rechts. Wenn ich mich recht erinnere ist er beim graphTFT unten links und beim touchTFT oben links.


    Das touchTFT macht also eine Umrechnung von oben links nach unten links und zwar in touch.c in der Funktion scaletoscreen ganz unten:


    Code
    void cTouchScreenEnhancer::scaletoscreen(int x, int y, int& rx, int& ry)
    {
      float dx = (x - TouchTFTSetup.xmin);
      float dx_0 = (TouchTFTSetup.xmax-TouchTFTSetup.xmin);
      float dy = (y - TouchTFTSetup.ymin);
      float dy_0 = (TouchTFTSetup.ymax-TouchTFTSetup.ymin);
      rx = (int) (dx/dx_0 * TouchTFTSetup.realx);
      ry = (int) (TouchTFTSetup.realy - dy/dy_0 *TouchTFTSetup.realy);
    }


    Dort müsstest Du die Berechnung für rx analog wie ry ändern vermute ich:


    Code
    rx = (int) (TouchTFTSetup.realx - dx/dx_0 *TouchTFTSetup.realx);


    Kannst Du mal probieren ob das besser wird ? Evtl. müsstest Du die Zeile für ry so gestalten wie rx vorher (also ohne den Term mit minus davor), dann käme es auch mit Deiner Beobachtung hin.


    Lars

  • Hallo,
    falls die Punkte wie im obigen Link vertauscht werden hier meine Auszug aus der setup.conf:


    touchtft.DumpImage = 0
    touchtft.DumpImageX = 720
    touchtft.DumpImageY = 576
    touchtft.DumpRefresh = 5
    touchtft.DvbRefresh = 20
    touchtft.entprell_ms = 20
    touchtft.HideMainMenu = 1
    touchtft.Iso2Utf = 1
    touchtft.Level = 2
    touchtft.Logger = 3
    touchtft.maxtouchcount = 1
    touchtft.OSDMessageTime = 30
    touchtft.OSDOffsetX = 50
    touchtft.OSDOffsetY = 400
    touchtft.realx = 720
    touchtft.realy = 576
    touchtft.RefreshTimeInSeconds = 2
    touchtft.ShowMutePermanent = 1
    touchtft.Theme = 0
    touchtft.TouchDevice = /dev/input/event1
    touchtft.UseStillPicture = 1
    touchtft.VdrHeight = 5
    touchtft.VdrWidht = 25
    touchtft.VdrX = 0
    touchtft.VdrY = 0
    touchtft.xmax = 192
    touchtft.xmin = 1840
    touchtft.ymax = 144
    touchtft.ymin = 1860

    tvtv.AutoUpdate = 0



    Wichtige Punke rot markiert:-)


    Tschau, Karsten.

    Mein VDR: LianLi-Gehäuse, AMD X2 64 5200+ auf Biostar TA690G, 768MB Ram, 250 GB HD, TT S3200, ne Airstar2 DVB-T und nen Touchpanel:-), Ubuntu Karmic , VDR 1.7.12 Extensionpatch mit x-vdr gebaut.

  • Hi LarsAC,
    verwende jetzt:


    void cTouchScreenEnhancer::scaletoscreen(int x, int y, int& rx, int& ry)
    {
    float dx = (x - TouchTFTSetup.xmin);
    float dx_0 = (TouchTFTSetup.xmax-TouchTFTSetup.xmin);
    float dy = (y - TouchTFTSetup.ymin);
    float dy_0 = (TouchTFTSetup.ymax-TouchTFTSetup.ymin);
    //rx = (int) (dx/dx_0 * TouchTFTSetup.realx);
    ry = (int) (TouchTFTSetup.realy - dy/dy_0 *TouchTFTSetup.realy);
    rx = (int) (TouchTFTSetup.realx - dx/dx_0 *TouchTFTSetup.realx);
    }



    OK - meine Angabe war voll daneben :versteck
    ALT:


    mit Deiner Änderung liegt "Menu"
    FALSCH
    ca 2,5 cm unter dem oberen Rand/ ca. 2,5 cm links vom linken Rand des TFTs.
    UND AUCH
    ca. 2,5 cm unter dem oberen Rand und 2,5 cm links vom rechten Rand des TFTs.


    RICHTIG:
    mit dieser Änderung liegt Menu
    ca 2,5 cm unter dem oberen Rand/ ca. 2,5 cm RECHTS vom linken Rand des TFTs.
    UND AUCH
    ca. 2,5 cm unter dem oberen Rand und 2,5 cm links vom rechten Rand des TFTs.


    Gruß Frank

  • unter Verwendung von
    void cTouchScreenEnhancer::scaletoscreen(int x, int y, int& rx, int& ry)
    {
    float dx = (x - TouchTFTSetup.xmin);
    float dx_0 = (TouchTFTSetup.xmax-TouchTFTSetup.xmin);
    float dy = (y - TouchTFTSetup.ymin);
    float dy_0 = (TouchTFTSetup.ymax-TouchTFTSetup.ymin);
    rx = (int) (dx/dx_0 * TouchTFTSetup.realx);
    ry = (int) (TouchTFTSetup.realy - dy/dy_0 *TouchTFTSetup.realy);


    }


    UND


    touchtft.DumpImage = 0
    touchtft.DumpImageX = 720
    touchtft.DumpImageY = 576
    touchtft.DumpRefresh = 5
    touchtft.DvbRefresh = 20
    touchtft.entprell_ms = 20
    touchtft.HideMainMenu = 1
    touchtft.Iso2Utf = 1
    touchtft.Level = 2
    touchtft.Logger = 3
    touchtft.maxtouchcount = 1
    touchtft.OSDMessageTime = 30
    touchtft.OSDOffsetX = 50
    touchtft.OSDOffsetY = 400
    touchtft.realx = 720
    touchtft.realy = 576
    touchtft.RefreshTimeInSeconds = 2
    touchtft.ShowMutePermanent = 1
    touchtft.Theme = 0
    touchtft.TouchDevice = /dev/input/event4
    touchtft.UseStillPicture = 1
    touchtft.VdrHeight = 5
    touchtft.VdrWidht = 25
    touchtft.VdrX = 0
    touchtft.VdrY = 0
    touchtft.xmax = 192
    touchtft.xmin = 1840
    touchtft.ymax = 144
    touchtft.ymin = 1860



    liegt nun auf dem Button oben rechts (Rechteck mit Punktmatrix) Menu. Wenn ich auf diesen Button "touche", dann Öffnet sich Menu. Oben rechts ist nun ein Back Button. Der Back Button funktioniert auch!!!


    Der obere linke Teil des Buttons unten links (sieht aus wie ein Schraubenkopf) fungiert nun wie Ch+


    Gruß Frank

  • Dann könnte es sein, dass Dein graphTFT aus irgendeinem Grunde nicht mit der "normalen" Auflösung arbeitet !? In der Config gibt man dem TouchTFT die Auflösung mit, mit der das graphTFT arbeitet, auf diese werden die Touch-Events umgerechnet.


    touchtft.realx = 720
    touchtft.realy = 576


    Wenn diese Zahlen nicht stimmen ist zwar die enie Ecke richtig (0,0), aber in Richtung der anderen Ecke wird die Abweichung in der Tat immer größer.


    Lars

  • frank-km


    du hast beim kalibrieren aber schon die ecken des graphtft bildes (blau) angewählt (bei mir gibts noch trauerränder) und nicht die kreuze?


    also wenn die bildgrenzen kalibriert sind und du die werte entsprechend getauscht hast sollte nichts "daneben" liegen

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!