From 5c1e2b380946cb1372a3a255ebca3c8d714906b3 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Sat, 23 Nov 2013 21:08:50 +0000 Subject: [PATCH] Plot CP model for derived power series .. not sure of the validity of applying the model to derived data series like xPower and aPower but it may provide some insight. --- src/CpintPlot.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/CpintPlot.cpp b/src/CpintPlot.cpp index 49050b541..40da0950e 100644 --- a/src/CpintPlot.cpp +++ b/src/CpintPlot.cpp @@ -367,7 +367,12 @@ CpintPlot::plot_CP_curve(CpintPlot *thisPlot, // the plot we're currently di } #endif - if (series == RideFile::watts || series == RideFile::aPower || series == RideFile::wattsKg) curveTitle.setLabel(QwtText(curve_title, QwtText::PlainText)); + if (series == RideFile::watts || + series == RideFile::aPower || + series == RideFile::xPower || + series == RideFile::NP || + series == RideFile::wattsKg) + curveTitle.setLabel(QwtText(curve_title, QwtText::PlainText)); if (series == RideFile::wattsKg) curveTitle.setYValue(0.6); @@ -579,7 +584,9 @@ CpintPlot::calculate(RideItem *rideItem) // // CP curve only relevant for Energy or Watts (?) // - if (series == RideFile::aPower || series == RideFile::watts || series == RideFile::wattsKg || series == RideFile::none) { + if (series == RideFile::aPower || series == RideFile::NP || series == RideFile::xPower || + series == RideFile::watts || series == RideFile::wattsKg || series == RideFile::none) { + if (!CPCurve) plot_CP_curve(this, cp, tau, t0); else { // make sure color reflects latest config