From efe165e108689f917b96a238dcf621a0ab67c579 Mon Sep 17 00:00:00 2001 From: Chris Schlaeger Date: Sat, 29 Jul 2017 21:27:09 +0200 Subject: New: Support new anaerobic training effect --- lib/postrunner/ActivitySummary.rb | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'lib') 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:', -- cgit v1.2.3