mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
Trainmode: ZWO-Files Cooldown (#4711)
For many ZWO-Workouts (e.g. 10-12wk FTP Builder) using the cooldown-tag, power increased over time. This PR ensures decreasing power if the cooldown indicates a gradient.
This commit is contained in:
committed by
GitHub
parent
98959d8d11
commit
f7a2aede22
@@ -73,6 +73,10 @@ ZwoParser::startElement(const QString &, const QString &, const QString &qName,
|
||||
int from = int(100.0 * PowerLow);
|
||||
int to = int(100.0 * PowerHigh);
|
||||
|
||||
if (qName == "Cooldown" && from < to) {
|
||||
std::swap(from, to);
|
||||
}
|
||||
|
||||
// some kind of old kludge, should be flat, but isn't always
|
||||
if (qName == "SteadyState") {
|
||||
int ap = (from+to) / 2;
|
||||
|
||||
Reference in New Issue
Block a user