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:
Joachim Kohlhammer
2025-10-06 08:27:56 +02:00
committed by GitHub
parent 98959d8d11
commit f7a2aede22

View File

@@ -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;