Mark MATCHES that are To Exhaustion

.. name and also red color.
This commit is contained in:
Mark Liversedge
2015-05-31 13:34:22 +01:00
parent dfc058cd04
commit ea980149ca
3 changed files with 6 additions and 4 deletions

View File

@@ -1211,7 +1211,7 @@ RideItem::updateIntervals()
match.start, match.stop,
f->timeToDistance(match.start), f->timeToDistance(match.stop),
count++,
QColor(255,165,0),
match.exhaust ? QColor(255,69,0) : QColor(255,165,0),
RideFileInterval::EFFORT);
intervalItem->rideInterval = NULL;
intervalItem->refresh(); // XXX will get called in constructore when refactor
@@ -1224,11 +1224,12 @@ RideItem::updateIntervals()
double duration = intervalItem->getForSymbol("workout_time");
int zone = 1 + context->athlete->zones()->whichZone(zoneRange, ap);
intervalItem->name = QString(tr("L%1 MATCH %2 (%3w %4 kJ)"))
intervalItem->name = QString(tr("L%1 %5 %2 (%3w %4 kJ)"))
.arg(zone)
.arg(time_to_string(duration))
.arg((int)ap)
.arg(match.cost/1000);
.arg(match.cost/1000)
.arg(match.exhaust ? "TE MATCH" : "MATCH");
intervals_ << intervalItem;
}

View File

@@ -313,7 +313,7 @@ WPrime::setRide(RideFile *input)
match.stop = end;
match.secs = (match.stop-match.start) +1; // don't fencepost!
match.cost = values[match.start] - values[match.stop];
match.exhaust = values[match.stop] <= 500 ? true : false; // its to exhaustion!
if (match.cost >= WprimeMatchMinJoules) {
matches << match;
}

View File

@@ -33,6 +33,7 @@
struct Match {
int start, stop, secs; // all in whole seconds
int cost; // W' depletion
bool exhaust;
};
class WPrime {