diff options
author | Chris Schlaeger <chris@linux.com> | 2014-08-05 22:37:10 +0200 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2014-08-05 22:37:10 +0200 |
commit | 46a2f9644735b27bfe90e5599de4f6ff32b4bdf9 (patch) | |
tree | 799ad70f199902dec222298048e43d41e03bbdd7 /lib | |
parent | 180144a4b3228018213a8cd25c667690e7f66d75 (diff) | |
download | postrunner-46a2f9644735b27bfe90e5599de4f6ff32b4bdf9.zip |
Adding vo2max and recovery time to summary report
Diffstat (limited to 'lib')
-rw-r--r-- | lib/postrunner/ActivityReport.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/postrunner/ActivityReport.rb b/lib/postrunner/ActivityReport.rb index 4c328c9..1369aec 100644 --- a/lib/postrunner/ActivityReport.rb +++ b/lib/postrunner/ActivityReport.rb @@ -49,6 +49,11 @@ module PostRunner t.row([ 'Avg. Stride Length:', session.avg_stride_length ? "#{'%.2f' % (session.avg_stride_length / 2)} m" : '-' ]) + rec_time = @activity.recovery_time + t.row([ 'Recovery Time:', rec_time ? secsToHMS(rec_time * 60) : '-' ]) + vo2max = @activity.vo2max + t.row([ 'VO2max:', vo2max ? vo2max : '-' ]) + t.to_s end @@ -56,11 +61,12 @@ module PostRunner def laps t = FlexiTable.new t.head - t.row([ 'Duration', 'Distance', 'Avg. Pace', 'Stride', 'Cadence', + t.row([ 'Lap', 'Duration', 'Distance', 'Avg. Pace', 'Stride', 'Cadence', 'Avg. HR', 'Max. HR' ]) - t.set_column_attributes(Array.new(7, { :halign => :right })) + t.set_column_attributes(Array.new(8, { :halign => :right })) t.body - @activity.sessions[0].laps.each do |lap| + @activity.sessions[0].laps.each.with_index do |lap, index| + t.cell(index + 1) t.cell(secsToHMS(lap.total_timer_time)) t.cell('%.2f' % (lap.total_distance / 1000.0)) t.cell(speedToPace(lap.avg_speed)) |