Zwift Support Fixups

.. ErgFile member variables needed to be updated after
   using the ZwoParser since they are used at runtime.
This commit is contained in:
Mark Liversedge
2016-01-24 14:08:39 +00:00
parent 5d8ab001a2
commit ba57688b2d

View File

@@ -125,12 +125,22 @@ void ErgFile::parseZwift()
foreach(ErgFilePoint p, handler.points) {
double watts = p.y * CP / 100.0;
Points << ErgFilePoint(p.x, watts, watts);
if (watts > MaxWatts) MaxWatts = watts;
Duration = p.x;
}
// texts
Texts = handler.texts;
if (Points.count()) valid = true;
if (Points.count()) {
valid = true;
Duration = Points.last().x; // last is the end point in msecs
leftPoint = 0;
rightPoint = 1;
// calculate climbing etc
calculateMetrics();
}
}
void ErgFile::parseTacx()