File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,6 +163,7 @@ unsigned AsciiReader::readData()
163163SamplePack* AsciiReader::parseLine (const QString& line) const
164164{
165165 auto separatedValues = line.split (delimiter, QString::SkipEmptyParts);
166+ QString strippedValue;
166167 unsigned numComingChannels = separatedValues.length ();
167168
168169 // check number of channels (skipped if auto num channels is enabled)
@@ -177,17 +178,18 @@ SamplePack* AsciiReader::parseLine(const QString& line) const
177178 auto samples = new SamplePack (1 , numComingChannels);
178179 for (unsigned ci = 0 ; ci < numComingChannels; ci++)
179180 {
181+ strippedValue = separatedValues[ci].split (' :' , QString::SkipEmptyParts).back ();
180182 bool ok;
181183 if (isHexData)
182184 {
183- samples->data (ci)[0 ] = separatedValues[ci] .toInt (&ok,16 );
185+ samples->data (ci)[0 ] = strippedValue .toInt (&ok,16 );
184186 }
185187 else
186188 {
187- samples->data (ci)[0 ] = separatedValues[ci] .toDouble (&ok);
189+ samples->data (ci)[0 ] = strippedValue .toDouble (&ok);
188190 if (!ok)
189191 {
190- samples->data (ci)[0 ] = separatedValues[ci] .toInt (&ok,0 );
192+ samples->data (ci)[0 ] = strippedValue .toInt (&ok,0 );
191193 }
192194 }
193195 if (!ok)
You can’t perform that action at this time.
0 commit comments