diff options
author | Chris Schlaeger <chris@linux.com> | 2016-03-02 22:01:19 +0100 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2016-03-02 22:01:19 +0100 |
commit | 816931a37ab5803ee18c745b3b69ea03e522e667 (patch) | |
tree | 2831f76941476c5b8ea13bc2fb436f88a9a48cbf /lib | |
parent | d97ea905ff56f4737a05c83a04fa0c712ace889a (diff) | |
download | postrunner-816931a37ab5803ee18c745b3b69ea03e522e667.zip |
New: Always show average speed in activity summary.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/postrunner/ActivitySummary.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/postrunner/ActivitySummary.rb b/lib/postrunner/ActivitySummary.rb index 35e4ecc..97df15d 100644 --- a/lib/postrunner/ActivitySummary.rb +++ b/lib/postrunner/ActivitySummary.rb @@ -75,14 +75,12 @@ module PostRunner { :metric => 'km', :statute => 'mi'}) ]) end t.row([ 'Time:', secsToHMS(session.total_timer_time) ]) + t.row([ 'Avg. Speed:', + local_value(session, 'avg_speed', '%.1f %s', + { :metric => 'km/h', :statute => 'mph' }) ]) if @activity.sport == 'running' || @activity.sport == 'multisport' t.row([ 'Avg. Pace:', pace(session, 'avg_speed') ]) end - if @activity.sport != 'running' - t.row([ 'Avg. Speed:', - local_value(session, 'avg_speed', '%.1f %s', - { :metric => 'km/h', :statute => 'mph' }) ]) - end t.row([ 'Total Ascent:', local_value(session, 'total_ascent', '%.0f %s', { :metric => 'm', :statute => 'ft' }) ]) @@ -117,8 +115,8 @@ module PostRunner end if @activity.sport == 'cycling' t.row([ 'Avg. Cadence:', - session.avg_candence ? - "#{(2 * session.avg_candence).round} rpm" : '-' ]) + session.avg_cadence ? + "#{(2 * session.avg_cadence).round} rpm" : '-' ]) end t.row([ 'Training Effect:', session.total_training_effect ? |