Changeset - fa8cb0995e3e
[Not reviewed]
default
0 1 0
Hasan Yavuz Ă–ZDERYA - 9 years ago 2016-06-14 15:41:39
hy@ozderya.net
read (discard) all lines when reading is paused
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/asciireader.cpp
Show inline comments
 
@@ -74,25 +74,25 @@ void AsciiReader::onDataReady()
 
        QByteArray line = _device->readLine();
 

	
 
        // discard only once when we just started reading
 
        if (discardFirstLine)
 
        {
 
            discardFirstLine = false;
 
            continue;
 
        }
 

	
 
        // discard data if paused
 
        if (paused)
 
        {
 
            return;
 
            continue;
 
        }
 

	
 
        // parse data
 
        line = line.trimmed();
 
        auto separatedValues = line.split(',');
 

	
 
        int numReadChannels; // effective number of channels to read
 
        if (separatedValues.length() >= int(_numOfChannels))
 
        {
 
            numReadChannels = _numOfChannels;
 
        }
 
        else // there is missing channel data
0 comments (0 inline, 0 general)