No reason to skip a datapoint if DFPM is null

This commit is contained in:
Oleksiy Mishchenko
2019-05-22 21:49:46 +02:00
committed by Damien Grauser
parent fbb6f68f81
commit 08a704ec1b

View File

@@ -780,18 +780,16 @@ RideFile *CsvFileReader::openRideFile(QFile &file, QStringList &errors, QList<Ri
if( iBikeVersion >= 11 && ( dfpm > 0.0 || dfpmExists ) ) {
dfpmExists = true;
watts = dfpm;
XDataPoint *p = new XDataPoint();
p->secs = minutes*60.0;
p->km = km;
p->number[0] = line.section(',', 2, 2).toDouble(); // CALC-POWER
p->number[1] = line.section(',', 17, 17).toDouble(); // Rho
ibikeSeries->datapoints.append(p);
}
else {
watts = line.section(',', 2, 2).toDouble();
}
XDataPoint *p = new XDataPoint();
p->secs = minutes*60.0;
p->km = km;
p->number[0] = line.section(',', 2, 2).toDouble(); // CALC-POWER
p->number[1] = line.section(',', 17, 17).toDouble(); // Rho
ibikeSeries->datapoints.append(p);
cad = line.section(',', 4, 4).toDouble();
hr = line.section(',', 5, 5).toDouble();