Results 1 to 4 of 4

Thread: how to check data package received in serial port is 5 byte and check each byte ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to check data package received in serial port is 5 byte and check each byte

    First of all : in line 47 (serial->readLine()...) You can get any number of bytes in the range of <1..1000>.
    Before atof() you need to check whether the buffer contains a complete package.

  2. The following user says thank you to Lesiok for this useful post:

    suhairkp (20th February 2017)

Similar Threads

  1. Replies: 2
    Last Post: 15th March 2014, 11:54
  2. Replies: 12
    Last Post: 24th July 2012, 08:19
  3. How to write the BYTE* data to a QFile?
    By Gokulnathvc in forum Newbie
    Replies: 10
    Last Post: 23rd November 2011, 04:33
  4. PlEASE HELP: Hot To Use Byte Array, data stream
    By aash_89 in forum Qt Programming
    Replies: 7
    Last Post: 16th July 2010, 08:33
  5. Replies: 3
    Last Post: 19th April 2010, 14:16

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.