Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 22 Sep 2004 10:46 AM by  Kenneth Lerman
Qt 3.3.2 touchscreen
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages
mike tesch
New Member
New Member
Posts:


--
16 Aug 2004 09:08 AM
    A general FYI for using Qt3 on the 79520 Linux package:

    We have a user who has ported Qt 3.3.2 to the 79520 kit. He found that in order to get the touch screen working correctly he had to modify the file qt-3.3.2/src/embedded/qmouselinuxtp_qws.cpp in the same way that the Qt 2.3.2 file qt-2.3.2/src/kernel/qwsmouse_qws.cpp was modified by the Lineo patches.

    mt
    Kenneth Lerman
    New Member
    New Member
    Posts:


    --
    22 Sep 2004 10:46 AM
    Updated 23 September 2004
    ==========================================
    OK -- I've build a qt3.3.0-b1 version of qmouselinuxtp_qws.cpp

    As far as I can tell, my changes consist of putting in a define to get the right set of values, setting the jitter limit to 20 (I will probably reduce this back down again after I've tuned the touch driver), and swapping x and y in the TS_EVENT structure.

    It is unfortunate that we have to swap x and y all over the place (it starts in the driver), but it seems to be necessary to avoid changing qpe -- and I didn't want to own some more code.


    #define QT_QWS_EBX

    #define QT_QWS_TP_JITTER_LIMIT 20

    #ifndef QT_QWS_SHARP
    typedef struct {
    unsigned short pressure;
    //!!!KL reversed these
    // unsigned short x;
    // unsigned short y;
    unsigned short y;
    unsigned short x;
    unsigned short pad;
    } TS_EVENT;
    #else



    There may be other changes I've forgotten about -- I don't seem to have the original handy.

    Some notes: (1)my driver does not pitch the first point -- it gets them all correct (and if it didn't get them correct, it would pitch the first point, itself). (2)It returns a pressure of either 10,000 or 0, depending on whether or not the pen is down.

    I'd post my changes to the touch driver, but they still require some tuning. And besides, I haven't seen any interest.

    Ken

    ==========================================
    I've taken a look at the patches, and here is what I've found:

    (1) The PRESSURE_THRESHOLD gets set to 1, the MOVE_LIMIT gets set to 25, the SAMPLE_SIZE gets set to 5. All of this is reasonable (except, the driver might be changed to return a high pressure on a touch and zero pressure on no touch).

    (2) Code has been added to discard the first point from the touch panel. So, rather than fix the driver so that it only returns valid points, we patch the application. Not just this application; every application.

    Hey folks, this is NOT rocket science (well, maybe it's harder). But even I could put this fix into the driver so that it pitches the first point. Of course that would make it so that programs using qt2.3.2 will have an additional point pitched. (I'm embarassed for the perpertrator.)

    Of course, the proper solution is to make the driver work. Or the hardware work. Or better yet, make them both work together to provide an interface to the touchscreen that is precise.

    I still don't understand why paint from LOLO paints the first point correctly -- every time and messes up subsequent point. I'll bet it has something to do with the fact that LOLO only uses a single sample for each calibration point. So, in a sense, the first point is correct (and noise free), while the other points are JUST PLAIN WRONG. But why?

    Sorry for the rant.

    Ken
    You are not authorized to post a reply.