Results 1 to 8 of 8

Thread: /etc/pointercal problem

  1. #1
    Join Date
    Sep 2006
    Posts
    14
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default /etc/pointercal problem

    Hi All,
    I cross compiled qt/Embedded for my ARM11 board using ltib.
    It has compiled fine.
    Even i cross compiled a small helloworld application for ARM11.
    When i run my application it is giving following error message.

    1.My programm.

    Qt Code:
    1. #include <qapplication.h>
    2. #include <qlabel.h>
    3.  
    4. int main( int argc, char* argv[] )
    5. {
    6. QApplication myapp( argc, argv );
    7.  
    8. QLabel* mylabel = new QLabel( "Hello world", 0 );
    9.  
    10. myapp.setMainWidget( mylabel );
    11. mylabel->show();
    12. return myapp.exec();
    13. }
    To copy to clipboard, switch view to plain text mode 

    I crosscompiled using

    arm-linux-g++ -Wall -I/home/harsha/Desktop/IMX_INSTALL2/ltib-imx31ads-20060709/rootfs/usr/include -L/home/harsha/Desktop/IMX_INSTALL2/ltib-imx31ads-20060709/rootfs/usr/lib -lqte -ljpeg -o hello main.cpp

    When i run
    ./hello -qws on target system it is giving following error

    could not read calibration : /etc/pointercal
    segmentation fault.

    Infact i made QTDIR and LD_LIBRARY_PATH to point qtdirectory and qtlibs respectively.
    Any thing i need to do before running my application.


    Thanks in advance,

    Regards,
    Harsha
    Last edited by wysota; 26th September 2006 at 13:26. Reason: missing [code] tags

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: /etc/pointercal problem

    Quote Originally Posted by hvreddy1110 View Post
    could not read calibration : /etc/pointercal
    Does this file exist?

  3. #3
    Join Date
    Sep 2006
    Posts
    14
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: /etc/pointercal problem

    Hi Thanks for ur reply.
    No.there is no etc/pointercal file .
    How can i generate it?

    Thanks and regards,
    Harsha

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: /etc/pointercal problem

    Quote Originally Posted by hvreddy1110 View Post
    How can i generate it?
    Google says something about ts_calibrate and tslib, but if you know the magic numbers your can write it yourself.

  5. #5
    Join Date
    Sep 2006
    Posts
    14
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: /etc/pointercal problem

    Hi,
    As per i know tslib and ts_calibrate are used when we are using touch screen
    But i am not using touch screen feature.

    Thanks in advance,
    Regards,
    Harsha

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: /etc/pointercal problem

    Quote Originally Posted by hvreddy1110 View Post
    As per i know tslib and ts_calibrate are used when we are using touch screen
    But i am not using touch screen feature.
    It looks like Qt/Embedded thinks you have a touch screen. Maybe you should reconfigure it then?

  7. #7
    Join Date
    Dec 2006
    Posts
    123
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: /etc/pointercal problem

    hi ,

    i had cross compiled qt/embedded for Blackfin board(bf537) with mouse support.its working fine. but now i had connected Micro touch screen to the board. can anyone say me how to use the touch screen with the qt applicaitons ? from the above posts it seems first i should compile tslib package and then i should link that to qt/embedded while configuring..? are these steps correct ? or is there any other way ?if so please let me know?

    thanks in advance,
    saravanan

  8. #8
    Join Date
    Nov 2010
    Posts
    16
    Thanked 1 Time in 1 Post

    Default Re: /etc/pointercal problem

    The format of pointer cal is as follows,
    xscale xymix xoffset yxmix yscale yoffset scaler

    After these seven numbers, I have a null and two other values which I don't know what they do. The pointercal is only used for module linear (/etc/ts.conf). You can see the source here,

    https://github.com/kergoth/tslib/blo...ugins/linear.c

    Here is another formula without array values,

    Xs -> x screen value, Xt -> x touch value, Ys, Yt similar.

    Xs = (Xt*xscale + Yt*xymix + xoffset)/scaler
    Ys = (Xt*yxmix + Yt*yscale + yoffset)/scaler

    This is an affine transform (or subset as the 'Xt*Yt' is not used). If your touch is capacitive it may be quite linear. Resistive touch screens usually need individual calibration, may drift over time/temperature and are likely to need re-calibration at some point.

    The format of pointer cal is as follows,
    xscale xymix xoffset yxmix yscale yoffset scaler

    After these seven numbers, I have a null and two other values which I don't know what they do. The pointercal is only used for module linear (/etc/ts.conf). You can see the source here,

    https://github.com/kergoth/tslib/blo...ugins/linear.c

    Here is another formula without array values,

    Xs -> x screen value, Xt -> x touch value, Ys, Yt similar.

    Xs = (Xt*xscale + Yt*xymix + xoffset)/scaler
    Ys = (Xt*yxmix + Yt*yscale + yoffset)/scaler

    This is an affine transform (or subset as the 'Xt*Yt' is not used). If your touch is capacitive it may be quite linear. Resistive touch screens usually need individual calibration, may drift over time/temperature and are likely to need re-calibration at some point.


    Added after 5 minutes:


    Quote Originally Posted by sar_van81 View Post
    Can anyone say me how to use the touch screen with the qt applicaitons?
    Those are good steps. You may need to set these variable,

    export TSLIB_CONSOLEDEVICE=none
    export TSLIB_FBDEVICE=/dev/fb0
    export TSLIB_TSDEVICE=/dev/input/event1
    export TSLIB_CALIBFILE=/etc/pointercal
    export TSLIB_CONFFILE=/etc/ts.conf
    export QWS_MOUSE_PROTO=tslib

    The first five are needed by 'tslib'. Your mouse device might be different than '/dev/input/event1'. I hope you have a frame buffer... If so set TSLIB_FBDEVICE and you should have the 'tslib' utility 'ts_calibrate'. Run that and touch the five points. If it is not working, ts_print_raw can be used to debug drivers, hardware.
    Last edited by ardvark; 7th December 2010 at 15:25.

Similar Threads

  1. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 12:54
  2. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  3. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  4. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 21:36
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.