Results 1 to 20 of 32

Thread: Parallel Interface

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2007
    Posts
    27
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    5

    Default Re: Parallel Interface

    Quote Originally Posted by high_flyer View Post
    (I know that the pin manipulation wont work)


    Yes it crashes too!

    just the open (device ......... and the close( device .....

    its only the close instruction i guess.

    I will try to make a fresh new app for qt4 and see whats happens there.

  2. #2
    Join Date
    Nov 2007
    Posts
    27
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    5

    Default Re: Parallel Interface

    high_flyer

    i posted a request to the parapin mailinglist during the last discussion:

    quote: wallyqt:

    Would be nice if somebody more experienced than me
    may help to clear some missunderstandings on parapin.
    discussion on QT-Centre:
    http://www.qtcentre.org/forum/f-qt-p...rface-594.html

    quote:parapin-users@lists.sourceforge.net :Al Houston:

    **Wally,
    ********I just read through your thread on Qt-Centre, it looks like you guys
    have it figured out correctly by the end of the thread. *The fact this
    is working as a console app, but not a Qt app, is important.

    ********I'm not a Qt programmer, but I have one question: Does Qt mess around
    with loading/unloading kernel modules under the hood at all? *If for
    some reason it forced an unload of kparapin or parport, you might get
    the crash you're seeing on close(). *Seems very unlikely to me, but I
    thought I'd mention it.

    ********I've just gone through the code again -- I can't see any reason why a
    gui layer like Qt would have any idea what's going on in a driver, or
    have any effect on it.

    ********This is a strange one... *I probably won't have time to look at this
    anymore for the next several days, at least. *Hopefully you guys will
    get it figured out by then.


    -Al

  3. #3
    Join Date
    Nov 2007
    Posts
    27
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    5

    Default Re: Parallel Interface

    high_flyer

    i did the same stuff with qt4 and at least achieved an readable error:

    qtparapinwidgets.cpp:68: error: no matching function for call to ‘QtParapinWidgets::close(int&)’
    /usr/include/QtGui/qwidget.h:444: note: candidates are: bool QWidget::close()


    cheers wally

  4. #4
    Join Date
    Nov 2007
    Posts
    27
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    5

    Default Re: Parallel Interface

    when i use the ::close for the general namespace i get the
    same crash as with Qt3 :(

    any ideas ?

    #include <fcntl.h> /* open, fcntl */
    #include <sys/ioctl.h> /* ioctl */
    #include <stdio.h> /* printf, getchar */
    #include <stdlib.h> /* exit */
    #include <parapindriver.h> /* parapindriver */
    #include <unistd.h> /* close, read, usleep */
    #include <iostream>

    void QtParapinWidgets::on_pushButtonClose_clicked()
    {
    qWarning("TODO: %s %d",__FILE__,__LINE__);

    if ( m_parapinloaded == true)
    {
    ::close(parapindevice);
    m_parapinloaded = false;
    // label->setText( "Device Closed" );
    }
    }


    wally
    }
    Last edited by wallyqt; 19th November 2007 at 13:53. Reason: disabled smilies

  5. #5
    Join Date
    Nov 2007
    Posts
    27
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    5

    Thumbs up Re: Parallel Interface

    Now it works fine! :)

    when i also use ::open to open the device
    i can ::close and all works as wanted.

    parapindevice = ::open("/dev/ppdrv_device", 0);

    cheers wally
    Last edited by wallyqt; 19th November 2007 at 13:51. Reason: disabled smilies

Similar Threads

  1. C++ Interface ..???
    By joseph in forum General Programming
    Replies: 3
    Last Post: 28th May 2008, 10:27
  2. Interface composition and QObject
    By brcain in forum Qt Programming
    Replies: 9
    Last Post: 20th November 2006, 18:56
  3. User Interface with QTableView
    By Brandybuck in forum Qt Programming
    Replies: 1
    Last Post: 23rd March 2006, 00:24
  4. Qt interface running extremely slowly...
    By jazztpt in forum Qt Programming
    Replies: 1
    Last Post: 4th February 2006, 12:12

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
  •  
Qt is a trademark of The Qt Company.