Skip to content

Commit

Permalink
Estimated FTP in email #1739
Browse files Browse the repository at this point in the history
  • Loading branch information
cagnulein committed Oct 30, 2023
1 parent 6e9a1ef commit 5f18620
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/homeform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6061,7 +6061,19 @@ void homeform::sendMail() {
QStringLiteral("W ") + QString::number(peak/weightKg, 'f', 1) + QStringLiteral("W/Kg\n");
peak = metric::powerPeak(&Session, 5 * 60);
textMessage += QStringLiteral("5 Minutes Power: ") + QString::number(peak, 'f', 0) +
QStringLiteral("W ") + QString::number(peak/weightKg, 'f', 1) + QStringLiteral("W/Kg\n");
QStringLiteral("W ") + QString::number(peak/weightKg, 'f', 1) + QStringLiteral("W/Kg\n");

// FTP
double ftpSetting = settings.value(QZSettings::ftp, QZSettings::default_ftp).toDouble();
peak = (metric::powerPeak(&Session, 20 * 60) * 0.95) * 0.95;
textMessage += QStringLiteral("Estimated FTP: ") + QString::number(peak, 'f', 0) +
QStringLiteral("W ");
if(peak > ftpSetting) {
textMessage += QStringLiteral(" FTP IMPROVED +") + QString::number(peak - ftpSetting, 'f', 0) +
QStringLiteral("W!");
}
textMessage += QStringLiteral("\n");

if (bluetoothManager->device()->deviceType() == bluetoothdevice::BIKE) {
textMessage += QStringLiteral("Average Cadence: ") +
QString::number(((bike *)bluetoothManager->device())->currentCadence().average(), 'f', 0) +
Expand Down

0 comments on commit 5f18620

Please sign in to comment.