mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Workout Wizard - Honor Use CP as FTP setting
Like Workout Editor does, it is confusing otherwise.
This commit is contained in:
@@ -406,10 +406,14 @@ RelWattagePage::RelWattagePage(QWidget *parent) : WorkoutPage(parent) {}
|
||||
void RelWattagePage::initializePage()
|
||||
{
|
||||
if (hackContext->athlete->zones("Bike") && hackContext->athlete->zones("Bike")->whichRange(QDate::currentDate()) >= 0) {
|
||||
// get ftp according to settings
|
||||
int zoneRange = hackContext->athlete->zones("Bike")->whichRange(QDate::currentDate());
|
||||
ftp = hackContext->athlete->zones("Bike")->getCP(zoneRange);
|
||||
bool useCPForFTP = (appsettings->cvalue(hackContext->athlete->cyclist,
|
||||
hackContext->athlete->zones("Bike")->useCPforFTPSetting(), 0).toInt() == 0);
|
||||
if (useCPForFTP) ftp = hackContext->athlete->zones("Bike")->getCP(zoneRange);
|
||||
else ftp = hackContext->athlete->zones("Bike")->getFTP(zoneRange);
|
||||
} else {
|
||||
ftp = 100; // if zones are not available let's make absolute watts match percentajes
|
||||
ftp = 100; // if zones are not available let's make absolute watts match percentages
|
||||
}
|
||||
|
||||
setTitle(tr("Workout Wizard"));
|
||||
|
||||
Reference in New Issue
Block a user