Skip to content

Commit

Permalink
Updated HrZones fingerprint to include trimp factors
Browse files Browse the repository at this point in the history
Also fixed PaceZones fingerprint to consider 2 decimals
Fixes #2002
  • Loading branch information
amtriathlon committed Jun 23, 2016
1 parent 6c73ce6 commit 38a5822
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Metrics/HrZones.cpp
Expand Up @@ -883,7 +883,7 @@ HrZones::getFingerprint() const
// each zone definition (manual edit/default changed)
for (int j=0; j<ranges[i].zones.count(); j++) {
x += ranges[i].zones[j].lo;

x += int(double(100.0f * ranges[i].zones[j].trimp));
}
}
QByteArray ba = QByteArray::number(x);
Expand All @@ -906,6 +906,7 @@ HrZones::getFingerprint(QDate forDate) const
// each zone definition (manual edit/default changed)
for (int j=0; j<ranges[i].zones.count(); j++) {
x += ranges[i].zones[j].lo;
x += int(double(100.0f * ranges[i].zones[j].trimp));
}
}
QByteArray ba = QByteArray::number(x);
Expand Down
4 changes: 2 additions & 2 deletions src/Metrics/PaceZones.cpp
Expand Up @@ -950,11 +950,11 @@ PaceZones::getFingerprint() const
x += ranges[i].end.toJulianDay();

// CV
x += ranges[i].cv;
x += int(double(100.0f * ranges[i].cv));

// each zone definition (manual edit/default changed)
for (int j=0; j<ranges[i].zones.count(); j++) {
x += ranges[i].zones[j].lo;
x += int(double(100.0f * ranges[i].zones[j].lo));
}
}
QByteArray ba = QByteArray::number(x);
Expand Down

0 comments on commit 38a5822

Please sign in to comment.