summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Schlaeger <chris@linux.com>2017-07-29 21:27:09 +0200
committerChris Schlaeger <chris@linux.com>2017-07-29 21:27:09 +0200
commitefe165e108689f917b96a238dcf621a0ab67c579 (patch)
tree548997df59fda2b9c276e149e75f2fae66bab980 /lib
parentb5902d065b8661ea0f3c85535e619e3a62094d4c (diff)
downloadpostrunner-efe165e108689f917b96a238dcf621a0ab67c579.zip
New: Support new anaerobic training effect
Diffstat (limited to 'lib')
-rw-r--r--lib/postrunner/ActivitySummary.rb15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/postrunner/ActivitySummary.rb b/lib/postrunner/ActivitySummary.rb
index 8e698c7..70a9f80 100644
--- a/lib/postrunner/ActivitySummary.rb
+++ b/lib/postrunner/ActivitySummary.rb
@@ -131,8 +131,19 @@ module PostRunner
"#{(2 * session.avg_cadence).round} rpm" : '-' ])
end
- t.row([ 'Training Effect:', session.total_training_effect ?
- session.total_training_effect : '-' ])
+ if @fit_activity.physiological_metrics &&
+ (physiological_metrics = @fit_activity.physiological_metrics.last)
+ if physiological_metrics.anaerobic_training_effect
+ t.row([ 'Anaerobic Training Effect:',
+ physiological_metrics.anaerobic_training_effect ])
+ end
+ if physiological_metrics.aerobic_training_effect
+ t.row([ 'Aerobic Training Effect:',
+ physiological_metrics.aerobic_training_effect ])
+ end
+ elsif session.total_training_effect
+ t.row([ 'Aerobic Training Effect:', session.total_training_effect ])
+ end
rec_info = @fit_activity.recovery_info
t.row([ 'Ignored Recovery Time:',